🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Custom Shutdown

#10367
From: Malcolm Smith
Date: Tue, 20 Apr 2004 20:30
81 lines
3722 bytes
It is interesting to note that the example MSDN offers for a custom code is:

Example:

For a planned user-initiated shutdown that requires a comment with major
reason 2 and minor reason 2, type the following for the name:

PCS;2;2


when the documentation also states the major code must be no less than 64.

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


"Bob Gonder" <notbg@notmindspring.invalid> wrote in message
news:ebka805gn49677pvj44paassjq6gh360es@4ax.com...
> Malcolm Smith wrote:
>
> >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\Us
e
> >rDefined\<default_system_language_ID>
> >
> >I'll retry with <default_system_language_ID> added to my key.
>
> Just a couple dumb questions about this...
> You're not using <default_system_language_ID> are you?
>
> In another branch, Gambit said:
> >>You need to specify the locale.  Windows dialogs are usually
> >>locale-specific.  Try using GetSystemDefaultLangID() to get the locale
for
> >>the machine your program is currently running under at the time.
>
> That returns a word that you need to change to a string to add to the
> key.  Quite a few int to str functions add a space to the front of the
> string. Pretty sure you don't want the extra space.
>
> You've probably been to all these links, but for other lurkers....
>
> About System Shutdown Reason Codes:
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/system_shutdown_reason_codes.asp
>
> See this to add a Reason: (no locale needed?)
>
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/rrchowtoadd.mspx
>
> Enable Tracking:
>
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/rrcoverview.mspx
>
> How to test if XP is ready to handle your shutdown code:
>
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/rrchowtodisable.mspx
> Can you get shutdown.exe to log your event?
>
> Overview and how to view the log:
>
http://www.microsoft.com/resources/documentation/Windows/XP/all/reskit/en-us/prmb_tol_amgv.asp
>
> Tracker Registry keys:
>
http://www.microsoft.com/resources/documentation/WindowsServ/2003/all/techref/en-us/w2k3tr_set_tools.asp
>
>
>
Technical Details
Message-ID: <40858832$1@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> <ebka805gn49677pvj44paassjq6gh360es@4ax.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-20 13:40:08 PST
Reply-To: "Malcolm Smith" <mjfreelancing@optusnet.com.au>
From: "Malcolm Smith" <mjfreelancing@optusnet.com.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> <ebka805gn49677pvj44paassjq6gh360es@4ax.com>
Subject: Re: Custom Shutdown
Date: Wed, 21 Apr 2004 06:30:09 +1000
Lines: 83
Organization: MJ Freelancing
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: 211.30.147.112
Message-ID: <40858832$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1082492978 211.30.147.112 (20 Apr 2004 13:29:38 -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