网站首页  词典首页

请输入您要查询的函数:

 

术语 terminatejobobject
释义 TerminateJobObject
语法:
C++
BOOL WINAPI TerminateJobObject(
__in HANDLE hJob,
__in UINT uExitCode
);
TerminateJobObject功能
终止所有进程目前与这项工作。
参数
hJob [in]
一个句柄,的进程将被终止工作。在CreateJobObject或OpenJobObject函数返回此句柄。这种处理必须有JOB_OBJECT_TERMINATE访问权限。有关更多信息,请参见作业对象的安全和访问权限。
在处理工作中的每个对象的过程必须有PROCESS_TERMINATE访问权限。有关更多信息,请参见过程的安全性和访问权限。
uExitCode [in]
退出代码可以被所有程序和工作对象的线程。使用GetExitCodeProcess函数来检索每个进程的退出值。使用GetExitCodeThread函数来检索每个线程的退出值。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
这是不可能的与工作有关推迟或终止处理过程的。这是因为如果TerminateProcess是与工作有关的每个进程调用。
要编译的应用程序使用此功能,定义_WIN32_WINNT为0x0500或更高版本。有关详细信息,请参阅使用Windows头。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
参见
CreateJobObject
招聘对象
OpenJobObject
进程和线程函数
TerminateProcess
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==TerminateJobObject Function
Terminates all processes currently associated with the job.
Syntax
C++
BOOL WINAPI TerminateJobObject(
__in HANDLE hJob,
__in UINT uExitCode
);
Parameters
hJob [in]
A handle to the job whose processes will be terminated. The CreateJobObject or OpenJobObject function returns this handle. This handle must have the JOB_OBJECT_TERMINATE access right. For more information, see Job Object Security and Access Rights .
The handle for each process in the job object 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 all processes and threads in the job object. Use the GetExitCodeProcess function to retrieve each process's exit value. Use the GetExitCodeThread function to retrieve each 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
It is not possible for any of the processes associated with the job to postpone or handle the termination. It is as if TerminateProcess were called for each process associated with the job.
To compile an application that uses this function, define _WIN32_WINNT as 0x0500 or later. For more information, see Using the Windows Headers .
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
See Also
CreateJobObject
Job Objects
OpenJobObject
Process and Thread Functions
TerminateProcess
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms686709(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:15:28