[This is preliminary documentation and subject to change.]
The TerminateJobObject function terminates all processes currently associated with the job.
BOOL TerminateJobObject(
HANDLE hJob,
UINT uExitCode
);
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.
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.
Windows NT: Requires version 5.0 or later.
Windows: Unsupported.
Windows CE: Unsupported.
Header: Declared in winbase.h.
Import Library: Use kernel32.lib.
Processes and Threads Overview, Process and Thread Functions, CreateJobObject, OpenJobObject, TerminateProcess