|
-
April 16th, 1999, 07:39 AM
#1
Porting From SUN????
I am currently porting some server C-code from a SUN machine to NT. This code in not a GUI and I would like to keep it as C-code. On the SUN machine it users signals to determine when the machine is being booted, and the program will stop gracefully! Looks like I should use the NT message queue, but I am having no luck. I tried peekmessage() but it doesn't seem to trap the boot message "wm_queryendsession". Is this the right approach?
Thanks,
Dan Gray
[email protected]
-
April 16th, 1999, 11:22 AM
#2
Re: Porting From SUN????
Use SetConsoleCtrlHandler(...) and you will be able to intercept CTRL_C_EVENT, CTRL_BREAK_EVENT, CTRL_CLOSE_EVENT, CTRL_LOGOFF_EVENT, and CTRL_SHUTDOWN_EVENT.
Success !
[email protected]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|