64,636
社区成员
发帖
与我相关
我的任务
分享
BOOL WINAPI ConsoleCtrlHandler(DWORD dwEvent)
{
switch( dwEvent )
{
case CTRL_C_EVENT:
case CTRL_BREAK_EVENT:
case CTRL_CLOSE_EVENT:
case CTRL_LOGOFF_EVENT:
case CTRL_SHUTDOWN_EVENT:
printf("Plase waiting for server quit ...\n");
/*要做的推出处理*/
break;
default:
return(FALSE);
}
return(TRUE);
}