🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Application notification on Machine restart or shutdown

#12866
From: Conny H�kansson
Date: Tue, 11 Nov 2003 21:39
29 lines
2006 bytes
Hello everyone!

I have a question regarding windows messages. In fact i was looking for the
same information
as Sergey was looking for regading messages for login and logouts from
within a service.

Now that i know that this is a teadious task to accomplish I want to know
what messages to look
for when using a traditional application that is started when a user is
login in to the computer, and when he is login out.

Do I need to setup a system wide hook with the SetWindowsHookEx function,
which demands a DLL file to store the callback procedure or is there a much
simpler method to do this?

I want some work to be processed when the user is login in, aswell as when
he logout's.

When thinking of this approach, wouldn't the OS give me a timeout error when
it doesnt get any response from the application due to the work being
processed. Can i prevent such a message?

Any sugggestion, ideas or hints will be highly appreciated.

No hurry, i just have to be finished tomorrow :-)

Best regards
/Conny
Technical Details
Message-ID: <3fb15541@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!elnk-pas-nf1!elnk-nf2-pas!newsfeed.earthlink.net!newsfeed.news2me.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,c54773486c2a14af,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-11-11 13:36:34 PST
From: "Conny H�kansson" <conny@allimac.se>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Application notification on Machine restart or shutdown
Date: Tue, 11 Nov 2003 22:39:45 +0100
Lines: 32
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 217.215.164.250
Message-ID: <3fb15541@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1068586305 217.215.164.250 (11 Nov 2003 13:31:45 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!elnk-pas-nf1!elnk-nf2-pas!newsfeed.earthlink.net!newsfeed.news2me.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail