Killing a WinCE device process from a desktop app

帅比萌擦擦* 提交于 2019-11-30 19:29:48

问题


I'm copying files from the desktop to a WinCE device (via the RAPI API), and if the main WinCE program is running, I need to kill it, update and restart it again.

So far, I manage to copy the files and start the main program with no problem, but I cannot found a way to terminate a process via RAPI (there is a CeCreateProcess function but no CeTerminateProcess or similar)

Currently i'm spawning RapiProc.exe -k \MyDir\MyProcess.exe and it works, but I cannot find the way to do it via RAPI

Any ideas?

TIA


回答1:


RAPI doesn't provide a direct way to kill a process. You must create a custom RAPI DLL that provides that capability. As a good starting point, this blog article shows how to retrieve the device ID via a custom RAPI dll. Just modify it to broadcast a WM_CLOSE and then a TerminateProcess if that fails.



来源:https://stackoverflow.com/questions/3378509/killing-a-wince-device-process-from-a-desktop-app

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!