[This is preliminary documentation and subject to change.]
The SetInformationJobObject function is used to set limits for a job object.
BOOL SetInformationJobObject(
HANDLE hJob,
JOBOBJECTINFOCLASS JobObjectInformationClass,
LPVOID lpJobObjectInformation,
DWORD cbJobObjectInformationLength
);
Value | Meaning |
---|---|
JobObjectAssociateCompletionPortInformation | The lpJobObjectInformation parameter is a pointer to a JOBOBJECT_ASSOCIATE_COMPLETION_PORT structure. |
JobObjectBasicLimitInformation | The lpJobObjectInformation parameter is a pointer to a JOBOBJECT_BASIC_LIMIT_INFORMATION structure. |
JobObjectBasicUIRestrictions | The lpJobObjectInformation parameter is a pointer to a JOBOBJECT_BASIC_UI_RESTRICTIONS structure. |
JobObjectEndOfJobTimeInformation | The lpJobObjectInformation parameter is a pointer to a JOBOBJECT_END_OF_JOB_TIME_INFORMATION structure. |
JobObjectSecurityLimitInformation | The lpJobObjectInformation parameter is a pointer to a JOBOBJECT_SECURITY_LIMIT_INFORMATION structure. |
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.
You can use the SetInformationJobObject function to set several limits in a single call. If you want to establish the limits one at a time or change a subset of the limits, call the QueryInformationJobObject function to obtain the current limits, modify these limits, and then call SetInformationJobObject.
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, JOBOBJECT_ASSOCIATE_COMPLETION_PORT, JOBOBJECT_BASIC_LIMIT_INFORMATION, JOBOBJECT_BASIC_UI_RESTRICTIONS, JOBOBJECT_END_OF_JOB_TIME_INFORMATION, JOBOBJECT_SECURITY_LIMIT_INFORMATION , QueryInformationJobObject