Platform SDK: DLLs, Processes, and Threads |
The QueryInformationJobObject function retrieves limit and job state information from the job object.
BOOL QueryInformationJobObject( HANDLE hJob, // handle to job JOBOBJECTINFOCLASS JobObjectInfoClass, // information class LPVOID lpJobObjectInfo, // limit information DWORD cbJobObjectInfoLength, // limit information size LPDWORD lpReturnLength // data written );
If this value is NULL and the calling process is associated with a job, the job associated with the calling process is used.
Value | Meaning |
---|---|
JobObjectBasicAccountingInformation | The lpJobObjectInfo parameter is a pointer to a JOBOBJECT_BASIC_ACCOUNTING_INFORMATION structure. |
JobObjectBasicAndIoAccountingInformation | The lpJobObjectInfo parameter is a pointer to a JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION structure. |
JobObjectBasicLimitInformation | The lpJobObjectInfo parameter is a pointer to a JOBOBJECT_BASIC_LIMIT_INFORMATION structure. |
JobObjectBasicProcessIdList | The lpJobObjectInfo parameter is a pointer to a JOBOBJECT_BASIC_PROCESS_ID_LIST structure. |
JobObjectBasicUIRestrictions | The lpJobObjectInfo parameter is a pointer to a JOBOBJECT_BASIC_UI_RESTRICTIONS structure. |
JobObjectExtendedLimitInformation | The lpJobObjectInfo parameter is a pointer to a JOBOBJECT_EXTENDED_LIMIT_INFORMATION structure. |
JobObjectSecurityLimitInformation | The lpJobObjectInfo 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 QueryInformationJobObject to obtain the current limits, modify them, then use the SetInformationJobObject function to set new limits.
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, JOBOBJECT_BASIC_ACCOUNTING_INFORMATION, JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION, JOBOBJECT_BASIC_LIMIT_INFORMATION, JOBOBJECT_BASIC_PROCESS_ID_LIST, JOBOBJECT_BASIC_UI_RESTRICTIONS, JOBOBJECT_EXTENDED_LIMIT_INFORMATION, JOBOBJECT_SECURITY_LIMIT_INFORMATION, SetInformationJobObject