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]