Receiving Shutdown Notification Applications with a window and message queue receive shutdown notification through the WM_QUERYENDSESSION message. Console applications receive shutdown notification in their handler routines. To register a console handler, use the SetConsoleCtrlHandler function. Service applications receive shutdown notification in their handler routines. To register a service control handler, use the RegisterServiceCtrlHandlerEx function
Applications with a window and message queue receive shutdown notification through the WM_QUERYENDSESSION message. Console applications receive shutdown notification in their handler routines. To register a console handler, use the SetConsoleCtrlHandler function. Service applications receive shutdown notification in their handler routines. To register a service control handler, use the RegisterServiceCtrlHandlerEx function
各位朋友,请给答复!?
各位朋友,请给答复!?
if(lParam & ENDSESSION_LOGOFF)
//注销
else
//关机和重启我还不知道怎么区分
break;
WM_QUERYENDSESSION
是这两个吧??