Article View: borland.public.cppbuilder.nativeapi
Article #10362Re: Custom Shutdown
From: Bob Gonder
Date: Tue, 20 Apr 2004 17:49
Date: Tue, 20 Apr 2004 17:49
44 lines
3031 bytes
3031 bytes
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\Use >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:
<ebka805gn49677pvj44paassjq6gh360es@4ax.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-mailReferences:
<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-20 11:10:23 PST From: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Custom Shutdown Date: Tue, 20 Apr 2004 10:49:01 -0700 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <ebka805gn49677pvj44paassjq6gh360es@4ax.com> References: <4084732e@newsgroups.borland.com> <4084916b$1@newsgroups.borland.com> <4084b480$2@newsgroups.borland.com> <4084b95d@newsgroups.borland.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 65.41.127.251 X-Trace: newsgroups.borland.com 1082483340 65.41.127.251 (20 Apr 2004 10:49:00 -0700) Lines: 47 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