Hi Jan,
> Aha, just now I realized, that Windows is most probably calling Ctrl-C to
> the console when I log off. It seems like all consoles will get Ctrl-C
> during log off...comments?
Windows will issue a CTRL_LOGOFF_EVENT signal to all console processes on
logging off, and this signal would be processed by your service's
HandlerRoutine, if your custom HandlerRoutine doesn't process this signal,
it would be passed to the default HandlerRoutine.
However, for a service application, it receives a modified default console
control handler. This modified handler does not call ExitProcess when
processing the CTRL_LOGOFF_EVENT signal...
For more detail information, you can refer to the following MSDN doc:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/bas
e/handlerroutine.asp
Thanks!
Best regards,
Gary Chang
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
Hi Jan,
Do you have any more concerns on this topic, please feel free to post here.
Thanks for your understanding!
Best regards,
Gary Chang
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------