Platform SDK: DLLs, Processes, and Threads |
The TerminateJobObject function terminates all processes currently associated with the job.
BOOL TerminateJobObject( HANDLE hJob, // handle to job UINT uExitCode // exit code );
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/2000: Requires Windows 2000.
Windows 95/98: Unsupported.
Header: Declared in Winbase.h; include Windows.h.
Library: Use Kernel32.lib.
Processes and Threads Overview, Process and Thread Functions, CreateJobObject, OpenJobObject, TerminateProcess