Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email email@example.com
From: Steve Swartz (steveswMICROSOFT.COM)
Date: Thu Jan 10 2002 - 09:38:26 CST
In Windows 2000 and Windows XP, there is a product called SENS that
emits COM+ LCE events when interesting system events (like shutdown)
occur. On those operating systems, you can just register a subscription
through SENS with the appropriate underlying event, and your component
will be called at the right time. The nice thing about SENS is, if your
component doesn't take too long, you're called in a situation where you
can do normal processing without worrying about the operating system
shutting down beneath you.
From: Mark A. Rice [mailto:mriceCANARYLABS.COM]
Sent: Thursday, January 10, 2002 7:19 AM
Subject: Detecting Windows shutdown
I have DCOM server (written using ATL is that matters) that I want to
detect when NT/XP is shutting down so that it can close some files
properly. I have researched this for a few days and I cannot figure out
to do it.
I have created a hidden windows with WS_POPUP and have code to handle
WM_ENDSESSION message. I also have code to handle the
If the server is running as the interactive user, I get the endsession
message. If the server is running as a service under the local system
account and is checked to interact with the desktop I get the message.
the server is running as a specific user with "Run As" as a server or
service, or it is running as the local system account but cannot
with the desktop, then I do not get the message. Also, I never seem to
the SERVICE_CONTROL_SHUTDOWN event.
Can anyone tell me what I am doing wrong? Thanks,
Users Guide http://discuss.microsoft.com/archives/mailfaq.asp
contains important info. Save time, search the archives at
To unsubscribe, mailto:DCOM-signoff-requestDISCUSS.MICROSOFT.COM