VC++, 重启程序
TCHAR pBuf[MAX_PATH]; GetModuleFileName(NULL,pBuf,MAX_PATH); STARTUPINFO startupinfo; PROCESS_INFORMATION proc_info; memset(&startupinfo,0,sizeof(STARTUPINFO)); startupinfo.cb=sizeof(STARTUPINFO); PostQuitMessage(0); //结束自己 Sleep(500); //停500毫秒 ::CreateProcess(pBuf,NULL,NULL,NULL,FALSE, NORMAL_PRIORITY_CLASS,NULL,NULL,&startupinfo,&proc_info); //重启自己