純代碼殺指定進程或者查找指定進程純代碼殺指定進程或者查找指定進程 *-- Test *!* 賣房子lcNameProcess = "Outlook.exe" &&指定進程名*!* ? KillProcess(lcNameProcess) 褐藻醣膠*----------------------------------FUNCTION KillProcess(tcNameProcess) LOCAL ARRAY 澎湖民宿laPID(1) DECLARE INTEGER TerminateProcess IN kernel32; INTEGER hProcess,; 室內設計INTEGER uExitCode*----創建進程列表 CREATE CURSOR TProc (ID I, Name C(20))oProcess = 室內設計CREATEOBJECT("ProcessList") WITH oProcess FOR I = 1 TO .Count INSERT INTO 面膜TProc (ID, Name) VALUES(.Item(I).nPid, .Item(I).cName) ENDFOR ENDWITHBROWSE NORMAL 室內裝潢NOWAIT SELECT ID FROM TProc ; WHERE UPPER(Name) = UPPER(tcNameProcess) ; 買房子INTO ARRAY laPID lnProcessID = laPID(1) *-- Handle to the process to terminate 烤肉hProcess = OpenProcess(1, .F., lnProcessID) uExitCode = 4 lnRetVal = 酒店打工TerminateProcess(hProcess, uExitCode) RETURN lnRetValENDFUNC *-----類定義
創作者介紹

fj23fjubbi 發表在 痞客邦 PIXNET 留言(0) 人氣()