🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #10356

Re: Custom Shutdown

#10356
From: Malcolm Smith
Date: Tue, 20 Apr 2004 06:20
97 lines
3619 bytes
Nope, made no difference.  I modified my code to iterate over all available
locales and add the registry entry into each required branch.

My reboot still doesn't show the dialog.

Remy, I can send my component to you if you have time to look.

-- 
Malcolm Smith
MJ Freelancing
http://www.mjfreelancing.com



"Malcolm Smith" <m.smith@comvision.net.au> wrote in message
news:4084b95d@newsgroups.borland.com...
> I just realized the text was truncated on my print out - from MSDN it has
> this:
>
> You can also define your own shutdown reasons and add them to the
registry.
> Each reason code should be stored as a registry value in the following
key:
>
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Reliability\Use
> rDefined\<default_system_language_ID>
>
> I'll retry with <default_system_language_ID> added to my key.
>
> -- 
> Malcolm Smith
> MJ Freelancing
> http://www.mjfreelancing.com
>
>
>
> "Malcolm Smith" <m.smith@comvision.net.au> wrote in message
> news:4084b480$2@newsgroups.borland.com...
> > This still isn't working:
> >
> > Just for the benefit of others, the windows defines are already <<24 so
> > this:
> >
> > >     #define MAKE_REASON_FLAGS(flags) \
> > >         (((DWORD)((BYTE)(flags))) << 24)
> > >
> >
> > is not required and this is corrected:
> >
> > >
> > >     #define MAKE_REASON_CODE(flags, major, minor)    \
> > >         (flags | \
> > >         MAKE_REASON_MAJOR(major) | \
> > >         MAKE_REASON_MINOR(minor))
> >
> > Now, I've traced my code and have captured these values being sent to
> > ExitWindowsEx(Flags, Reason) where:
> >
> > Flags = 2 (Reboot)
> > Reason = 3225419776 (C040000000)
> >
> >
> > Where C0 = a combination of the values:
> >
> >   #define SHTDN_REASON_FLAG_USER_DEFINED  0x40000000
> >   #define SHTDN_REASON_FLAG_PLANNED            0x80000000
> >
> > and 4000000 = 64 for the major ID and 0 for the minor ID
> >
> > The event log shows a reboot with minor ID 0x00 but I didn't get the
> dialog
> > showing as expected.
> >
> > I've checked my registry and I definitely have this defined:
> >
> > PCS;64;0
> >
> > The only other thing is whether the registry location is correct.  I'm
> > using:
> >
> >
>
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Reliability\Use
> > rDefined
> >
> >
> > Is the locale information required ?
> >
> > Any other ideas ?
> >
> > -- 
> > Malcolm Smith
> > MJ Freelancing
> > http://www.mjfreelancing.com
> >
>
>
Technical Details
Message-ID: <4084bc41@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4084732e@newsgroups.borland.com> <4084916b$1@newsgroups.borland.com> <4084b480$2@newsgroups.borland.com> <4084b95d@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,362cd189c238eed0
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-04-19 23:09:31 PST
Reply-To: "Malcolm Smith" <m.smith@comvision.net.au>
From: "Malcolm Smith" <m.smith@comvision.net.au>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <4084732e@newsgroups.borland.com> <4084916b$1@newsgroups.borland.com> <4084b480$2@newsgroups.borland.com> <4084b95d@newsgroups.borland.com>
Subject: Re: Custom Shutdown
Date: Tue, 20 Apr 2004 16:20:38 +1000
Lines: 99
Organization: Comvision Pty Ltd
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 144.137.108.190
Message-ID: <4084bc41@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1082440769 144.137.108.190 (19 Apr 2004 22:59:29 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail