Skip to content

Files

Latest commit

 

History

History
53 lines (35 loc) · 1.16 KB

CreateJobObject.md

File metadata and controls

53 lines (35 loc) · 1.16 KB

Home

Function name : CreateJobObject

Group: Process and Thread - Library: kernel32


Creates or opens a job object.


Code examples:

How to make application automatically close all documents it opened

Declaration:

HANDLE CreateJobObject(
	LPSECURITY_ATTRIBUTES lpJobAttributes,
	LPCTSTR lpName
);  

FoxPro declaration:

DECLARE INTEGER CreateJobObject IN kernel32;
	INTEGER lpJobAttributes,;
	STRING  lpName  

Parameters:

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.


Return value:

If the function succeeds, the return value is a handle to the job object.


Comments:

To assign a process to a job object, use the AssignProcessToJobObject function. To close a job object handle, use the CloseHandle function.