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 145
下载积分: 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 个回复

  • h264编码源程序,将yuv视频序列编码为h264文件
    h264编码源程序,将yuv视频序列编码为h264文件-h264 encoder,encode yuv video series to h264 file
    2022-03-13 06:54:15下载
    积分:1
  • mpeg faq
    mpeg faq
    2022-01-31 07:13:57下载
    积分:1
  • It can show the toolstrip on the dialog.Please read it carefully because it is v...
    在 对话框 上 显示 工具条,好好看看吧,很好的-It can show the toolstrip on the dialog.Please read it carefully because it is very good.
    2023-07-05 22:25:04下载
    积分:1
  • WinCE5.0 based operating system, EVC4.0 development environment for the LCD rota...
    基于WinCE5.0操作系统,EVC4.0开发环境,用于LCD旋转的经典程序-WinCE5.0 based operating system, EVC4.0 development environment for the LCD rotate the classic procedure
    2022-05-26 15:18:57下载
    积分:1
  • 经典的C语言编程
    经典的C语言编程--如何计算C语言的关键字(作者是C语言开发者Kernighan和Ritchie)-classic C programming language-- how the C language keyword (The writer is a C-language development were Kernighan and Ritchie)
    2023-01-01 16:30:03下载
    积分:1
  • K r u s k a l算法每次选择n
    K r u s k a l算法每次选择n- 1条边,所使用的贪婪准则是:从剩下的 边中选择一条不会产生环路的具有最小耗费的边加入已选择的边的集合中。注意到所选 取的边若产生环路则不可能形成一棵生成树。K r u s k a l算法分e 步,其中e 是网络中 边的数目。按耗费递增的顺序来考虑这e 条边,每次考虑一条边。当考虑某条边时,若将其 加入到已选边的集合中会出现环路,则将其抛弃,否则,将它选入。-K ruskal algorithm for each choice of n-1 edges, the greed of the criteria used are: from the left edge select does not produce a loop with the smallest cost edge has been selected to join the edge of the collection. Taking note of the selected edges have a loop if it can not form a spanning tree. K ruskal algorithm sub-e-step, in which e is the number of network edge. According to the order of incremental cost to consider this e edges, each taking a side. When considering a certain edge when, if its added to a collection of selected edge loop will appear, will be its discarded, otherwise, it selected.
    2023-02-08 08:10:04下载
    积分:1
  • easyweb实例代码 可以做网络参考
    easyweb实例代码 可以做网络参考 -Easyweb examples of code can make the network reference
    2022-04-08 01:04:43下载
    积分:1
  • 3ds file format
    一个简单的控制台应用程序,实现3ds文件的读取。
    2022-03-25 06:03:48下载
    积分:1
  • jbookmaker
    jbookmaker use to make small book on handphone support txt only-jbookmaker use to make small book on handph only one support txt
    2022-02-03 04:17:46下载
    积分:1
  • COBF (aka C
    COBF (aka C-Obfuscator) is a program which manipulates C or C++ sourcefiles in a way that they aren t readable by human beings but they remain compilable. The benefit of COBF lies in the distribution of programs (freeware, shareware, commercial software etc.): The distribution as a executable binary is often too inflexible (especially for Unix or Windows NT, because it is normally not feasible to support all possible platforms) on the other side one might not give away the sourcecode (e. g. it looks poor [badly commented, Spaghetti code], or you just want to prevent plagiarism). Here COBF can play an important role: It removes all comments and sourcecode formattings and renames all variable and function identifiers. See files.txt for a complete list of the files provided with the cobf zip archive! See doc/ for the COBF manual!
    2022-07-21 12:34:20下载
    积分:1
  • 696518资源总数
  • 106215会员总数
  • 5今日下载