网站首页  词典首页

请输入您要查询的函数:

 

术语 terminateprocess
释义 TerminateProcess
语法:
C++
BOOL WINAPI TerminateProcess(
__in HANDLE hProcess,
__in UINT uExitCode
);
TerminateProcess函数
终止指定的进程及其所有线程。
参数
hProcess [in]
句柄的进程被终止。
句柄必须有PROCESS_TERMINATE访问权限。有关更多信息,请参见过程的安全性和访问权限。
uExitCode [in]
退出代码要使用的进程和作为这一号召而终止线程。使用GetExitCodeProcess函数检索一个进程的退出值。使用GetExitCodeThread函数检索线程的退出值。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
TerminateProcess函数是用来无条件导致进程退出。由动态链接库(DLL)全球数据保持状态可能会受到影响,如果使用TerminateProcess,而不是PRB:ExitProcess期间。
TerminateProcess启动终止并立即返回。此站的所有线程在执行过程,并要求取消对所有悬而未决的I / O在终止的进程不能退出,直到所有悬而未决的I / O已经完成或取消。
一个进程无法阻止自己被终止。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
参见
PRB:ExitProcess期间
OpenProcess
GetExitCodeProcess
GetExitCodeThread
进程和线程函数
过程
终止一个进程
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==TerminateProcess Function
Terminates the specified process and all of its threads.
Syntax
C++
BOOL WINAPI TerminateProcess(
__in HANDLE hProcess,
__in UINT uExitCode
);
Parameters
hProcess [in]
A handle to the process to be terminated.
The handle must have the PROCESS_TERMINATE access right. For more information, see Process Security and Access Rights .
uExitCode [in]
The exit code to be used by the process and threads terminated as a result of this call. Use the GetExitCodeProcess function to retrieve a process's exit value. Use the GetExitCodeThread function to retrieve a thread's exit value.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError .
Remarks
The TerminateProcess function is used to unconditionally cause a process to exit. The state of global data maintained by dynamic-link libraries (DLLs) may be compromised if TerminateProcess is used rather than ExitProcess .
TerminateProcess initiates termination and returns immediately. This stops execution of all threads within the process and requests cancellation of all pending I/O. The terminated process cannot exit until all pending I/O has been completed or canceled.
A process cannot prevent itself from being terminated.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
See Also
ExitProcess
OpenProcess
GetExitCodeProcess
GetExitCodeThread
Process and Thread Functions
Processes
Terminating a Process
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms686714(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 13:22:11