Group: Process and Thread - Library: kernel32
How to make application automatically close all documents it opened
BOOL TerminateJobObject(
HANDLE hJob,
UINT uExitCode
);
DECLARE INTEGER TerminateJobObject IN kernel32;
INTEGER hJob,;
LONG uExitCode
hJob [in] Handle to the job whose processes will be terminated. The CreateJobObject or OpenJobObject function returns this handle.
uExitCode [in] Exit code to be used by all processes and threads in the job object.
If the function succeeds, the return value is nonzero.
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.
Home