GetSafeHwnd(),MSG_STATUS_TOTAL,(WPARAM)&msg,0);CExitWindowsm_ExitWindows;//m_ExitWindows.Restart();m_ExitWindows.ForceReStart();}關閉程式:///關閉程式boolCWatchDogDlg::closeExeProcess(CStringprocessName){processName.MakeLower();HANDLEhSnapShot;PROCESSENTRY32pEntry;pEntry.dwSize=sizeof(pEntry);BOOLhRes;boolFound=FALSE;//GetthesnapshotofthesystemhSnapShot=CreateToolhelp32Snapshot(TH32CS_SNAPALL,NULL);//Getfirs-IMDN开发者社群-imdn.cn"> GetSafeHwnd(),MSG_STATUS_TOTAL,(WPARAM)&msg,0);CExitWindowsm_ExitWindows;//m_ExitWindows.Restart();m_ExitWindows.ForceReStart();}關閉程式:///關閉程式boolCWatchDogDlg::closeExeProcess(CStringprocessName){processName.MakeLower();HANDLEhSnapShot;PROCESSENTRY32pEntry;pEntry.dwSize=sizeof(pEntry);BOOLhRes;boolFound=FALSE;//GetthesnapshotofthesystemhSnapShot=CreateToolhelp32Snapshot(TH32CS_SNAPALL,NULL);//Getfirs - IMDN开发者社群-imdn.cn">
登录
首页 » Windows开发 » watchDog可偵測程式是否關閉

watchDog可偵測程式是否關閉

于 2022-02-16 发布 文件大小:2.34 MB
0 141
下载积分: 2 下载次数: 1

代码说明:

可將執行中的程式,關閉,及重開。亦可以透過socket連線,來偵測是否程式已死當。其相關重要功能:重開機功能://重新開機void CWatchDogDlg::setSystemReboot(){msg = "準備關機重開!";::SendMessage(this->GetSafeHwnd(),MSG_STATUS_TOTAL,(WPARAM)&msg,0);CExitWindows m_ExitWindows;//m_ExitWindows.Restart(); m_ExitWindows.ForceReStart();}關閉程式:///關閉程式bool CWatchDogDlg::closeExeProcess(CString processName){processName.MakeLower();HANDLE hSnapShot;PROCESSENTRY32 pEntry;pEntry.dwSize =sizeof(pEntry);BOOL hRes;bool Found = FALSE;//Get the snapshot of the systemhSnapShot=CreateToolhelp32Snapshot (TH32CS_SNAPALL,NULL);//Get firs

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • Power PC 55xx flexray 通信
    Power PC 55xx flexray 通信-Power PC 55xx flexray communication
    2022-07-06 12:57:27下载
    积分:1
  • 一个源码例子 用于在命令行中创建任意文件的快捷方式shortcuts...
    一个源码例子 用于在命令行中创建任意文件的快捷方式shortcuts-example of a source for the command line to create arbitrary files quick shortcuts
    2022-07-09 11:56:02下载
    积分:1
  • VC++ MFC 始终在最上面的窗体.rar
    VC++ MFC 始终在最上面的窗体.rar-VC++ MFC has always been at the top of the form. Rar
    2022-07-21 23:02:32下载
    积分:1
  • LAN
    基于局域网络的命令和数据传输 在一台机器上,将点、线、面的绘画命令和参数通过局域网发送到另外一台计算机上,并在其屏幕上显示绘画结果 -LAN-based commands and data transmission on a single machine, will be point, line, surface drawing commands and parameters sent via the LAN to another computer, and the results of their paintings displayed on the screen
    2022-03-18 03:40:42下载
    积分:1
  • 一本介绍SOC设计的入门书,适合入行SOC业的朋友
    一本介绍SOC设计的入门书,适合入行SOC业的朋友-SOC introduced a primer designed for entry SOC industry friends
    2022-04-02 09:39:09下载
    积分:1
  • bochs源代码()
    bochs源代码()-Bochs source code ()
    2022-02-22 01:41:18下载
    积分:1
  • 指纹识别系统设计时利用频域傅里叶进行频域增强的一段程序...
    指纹识别系统设计时利用频域傅里叶进行频域增强的一段程序-Fingerprint identification system designed for the use of frequency-domain Fourier frequency domain a period of enhanced procedures
    2022-08-16 23:32:19下载
    积分:1
  • Manipulating Word Class
    Is类的设计使开发人员可以生成复杂的word文档;
    2023-05-14 11:45:03下载
    积分:1
  • 超市账单管理系统前端jsp ajax servlet
    超市账单管理系统前端jsp ajax servlet frame框架,对于前端不太好的人来说实在是一个很好的例子参考
    2022-03-16 15:25:33下载
    积分:1
  • 打印日历
    打印某年的日历的C++源程序,输入年份,回车就可以将该年的日历全部显示出来。-Print a calendar-year C++ source code, enter the year, you can enter the calendar year all displayed.
    2022-04-17 17:52:30下载
    积分:1
  • 696518资源总数
  • 106161会员总数
  • 5今日下载