-
TerminateProcess
鎖定
- 中文名
- TerminateProcess
- 外文名
- TerminateProcess
- 屬 性
- 一種數學函數
- 作 用
- 終止指定進程及其所有線程
- 應 用
- VC
TerminateProcess函數原型
BOOL TerminateProcess( HANDLE hProcess,//進程句柄 UINT uExitCode //進程終止碼 );
VB聲明
Declare Function TerminateProcess Lib "kernel32" Alias "TerminateProcess" (ByVal hProcess As Long, ByVal uExitCode As Long) As Long
説明
結束一個進程
在VB裏使用
可以使用,但儘量不用
返回值
Long,非零表示成功,零表示失敗。會設置GetLastError
參數表
參數 類型及説明
hProcess Long,指定要中斷的一個進程的句柄
uExitCode Long,進程的一個退出代碼
TerminateProcessVC
參數:
- hProcess
- [in] 指定要中斷進程的句柄. 該句柄可以由 OpenProcess得到.
- DWORD uExitCode
- [in] 進程和其所有線程的退出代碼
返回值:
返回非零值代表成功。0代表失敗。想要得到更多錯誤信息,請調用GetLastError.。
要求:
Header | winbase.h |
Library | coredll.lib |
Windows Embedded CE | Windows CE 1.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |
- 參考資料
-
- 1. TerminateProcess function .msdn.microsoft.com[引用日期2017-03-13]
- 詞條統計
-
- 瀏覽次數:次
- 編輯次數:17次歷史版本
- 最近更新: JD萤火虫003