Group: Process and Thread - Library: kernel32
How to make application automatically close all documents it opened
HANDLE CreateJobObject(
LPSECURITY_ATTRIBUTES lpJobAttributes,
LPCTSTR lpName
);
DECLARE INTEGER CreateJobObject IN kernel32;
INTEGER lpJobAttributes,;
STRING lpName
lpJobAttributes [in] Pointer to a SECURITY_ATTRIBUTES structure, can be NULL.
lpName [in] Pointer to a null-terminated string specifying the name of the job. If lpName is NULL, the job is created without a name.
If the function succeeds, the return value is a handle to the job object.
To assign a process to a job object, use the AssignProcessToJobObject function. To close a job object handle, use the CloseHandle function.