Skip to content

Latest commit

 

History

History
391 lines (286 loc) · 16.2 KB

nf-jobapi2-queryinformationjobobject.md

File metadata and controls

391 lines (286 loc) · 16.2 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:jobapi2.QueryInformationJobObject
QueryInformationJobObject function (jobapi2.h)
Retrieves limit and job state information from the job object.
JobObjectBasicAccountingInformation
JobObjectBasicAndIoAccountingInformation
JobObjectBasicLimitInformation
JobObjectBasicProcessIdList
JobObjectBasicUIRestrictions
JobObjectCpuRateControlInformation
JobObjectEndOfJobTimeInformation
JobObjectExtendedLimitInformation
JobObjectGroupInformation
JobObjectGroupInformationEx
JobObjectLimitViolationInformation
JobObjectLimitViolationInformation2
JobObjectNetRateControlInformation
JobObjectNotificationLimitInformation
JobObjectNotificationLimitInformation2
JobObjectSecurityLimitInformation
QueryInformationJobObject
QueryInformationJobObject function
_win32_queryinformationjobobject
base.queryinformationjobobject
jobapi2/QueryInformationJobObject
base\queryinformationjobobject.htm
backup
d843d578-fd67-4708-959f-00245ff70ec6
12/05/2018
JobObjectBasicAccountingInformation, JobObjectBasicAndIoAccountingInformation, JobObjectBasicLimitInformation, JobObjectBasicProcessIdList, JobObjectBasicUIRestrictions, JobObjectCpuRateControlInformation, JobObjectEndOfJobTimeInformation, JobObjectExtendedLimitInformation, JobObjectGroupInformation, JobObjectGroupInformationEx, JobObjectLimitViolationInformation, JobObjectLimitViolationInformation2, JobObjectNetRateControlInformation, JobObjectNotificationLimitInformation, JobObjectNotificationLimitInformation2, JobObjectSecurityLimitInformation, QueryInformationJobObject, QueryInformationJobObject function, _win32_queryinformationjobobject, base.queryinformationjobobject, jobapi2/QueryInformationJobObject
jobapi2.h
Windows.h
Windows
Windows XP [desktop apps only]
Windows Server 2003 [desktop apps only]
Kernel32.lib
Kernel32.dll
Windows
19H1
QueryInformationJobObject
jobapi2/QueryInformationJobObject
c++
APIRef
kbSyntax
DllExport
Kernel32.dll
API-MS-Win-Core-job-l2-1-0.dll
kernel32legacy.dll
API-MS-Win-Core-Job-L2-1-1.dll
QueryInformationJobObject

QueryInformationJobObject function

-description

Retrieves limit and job state information from the job object.

-parameters

-param hJob [in, optional]

A handle to the job whose information is being queried. The CreateJobObject or OpenJobObject function returns this handle. The handle must have the JOB_OBJECT_QUERY access right. For more information, see Job Object Security and Access Rights.

If this value is NULL and the calling process is associated with a job, the job associated with the calling process is used. If the job is nested, the immediate job of the calling process is used.

-param JobObjectInformationClass [in]

The information class for the limits to be queried. This parameter can be one of the following values.

Value Meaning
JobObjectBasicAccountingInformation
1
The lpJobObjectInfo parameter is a pointer to a JOBOBJECT_BASIC_ACCOUNTING_INFORMATION structure.
JobObjectBasicAndIoAccountingInformation
8
The lpJobObjectInfo parameter is a pointer to a JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION structure.
JobObjectBasicLimitInformation
2
The lpJobObjectInfo parameter is a pointer to a JOBOBJECT_BASIC_LIMIT_INFORMATION structure.
JobObjectBasicProcessIdList
3
The lpJobObjectInfo parameter is a pointer to a JOBOBJECT_BASIC_PROCESS_ID_LIST structure.
JobObjectBasicUIRestrictions
4
The lpJobObjectInfo parameter is a pointer to a JOBOBJECT_BASIC_UI_RESTRICTIONS structure.
JobObjectCpuRateControlInformation
15
The lpJobObjectInfo parameter is a pointer to a JOBOBJECT_CPU_RATE_CONTROL_INFORMATION structure.

Windows 7, Windows Server 2008 R2, Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP:  This flag is not supported.

JobObjectEndOfJobTimeInformation
6
The lpJobObjectInfo parameter is a pointer to a JOBOBJECT_END_OF_JOB_TIME_INFORMATION structure.
JobObjectExtendedLimitInformation
9
The lpJobObjectInfo parameter is a pointer to a JOBOBJECT_EXTENDED_LIMIT_INFORMATION structure.
JobObjectGroupInformation
11
The lpJobObjectInfo parameter is a pointer to a buffer that receives the list of processor groups to which the job is currently assigned. The variable pointed to by the lpReturnLength parameter is set to the size of the group data. Divide this value by sizeof(USHORT) to determine the number of groups.

Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP:  This flag is not supported.

JobObjectGroupInformationEx
14
The lpJobObjectInfo parameter is a pointer to a buffer that receives an array of GROUP_AFFINITY structures that indicate the affinity of the job in the processor groups to which the job is currently assigned. The variable pointed to by the lpReturnLength parameter is set to the size of the group affinity data. Divide this value by sizeof(GROUP_AFFINITY) to determine the number of groups.

Windows 7, Windows Server 2008 R2, Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP:  This flag is not supported.

JobObjectLimitViolationInformation
13
The lpJobObjectInfo parameter is a pointer to a JOBOBJECT_LIMIT_VIOLATION_INFORMATION structure.

Windows 7, Windows Server 2008 R2, Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP:  This flag is not supported.

JobObjectLimitViolationInformation2
34
The lpJobObjectInfo parameter is a pointer to a JOBOBJECT_LIMIT_VIOLATION_INFORMATION_2 structure.

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Server 2008 R2, Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP:  This flag is not supported.

JobObjectNetRateControlInformation
32
The lpJobObjectInfo parameter is a pointer to a JOBOBJECT_NET_RATE_CONTROL_INFORMATION structure.

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Server 2008 R2, Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP:  This flag is not supported.

JobObjectNotificationLimitInformation
12
The lpJobObjectInfo parameter is a pointer to a JOBOBJECT_NOTIFICATION_LIMIT_INFORMATION structure.

Windows 7, Windows Server 2008 R2, Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP:  This flag is not supported.

JobObjectNotificationLimitInformation2
33
The lpJobObjectInfo parameter is a pointer to a JOBOBJECT_NOTIFICATION_LIMIT_INFORMATION_2 structure.

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Server 2008 R2, Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP:  This flag is not supported.

JobObjectSecurityLimitInformation
5
This flag is not supported. Applications must set security limits individually for each process. Windows Server 2003 and Windows XP:  The lpJobObjectInfo parameter is a pointer to a JOBOBJECT_SECURITY_LIMIT_INFORMATION structure.

-param lpJobObjectInformation [out]

The limit or job state information. The format of this data depends on the value of the JobObjectInfoClass parameter.

-param cbJobObjectInformationLength [in]

The count of the job information being queried, in bytes. This value depends on the value of the JobObjectInfoClass parameter.

-param lpReturnLength [out, optional]

A pointer to a variable that receives the length of data written to the structure pointed to by the lpJobObjectInfo parameter. Specify NULL to not receive this information.

-returns

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.

-remarks

Use QueryInformationJobObject to obtain the current limits and modify them. Use the SetInformationJobObject function to set new limits.

To compile an application that uses this function, define _WIN32_WINNT as 0x0500 or later. For more information, see Using the Windows Headers.

-see-also

JOBOBJECT_BASIC_ACCOUNTING_INFORMATION

JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION

JOBOBJECT_BASIC_LIMIT_INFORMATION

JOBOBJECT_BASIC_PROCESS_ID_LIST

JOBOBJECT_BASIC_UI_RESTRICTIONS

JOBOBJECT_CPU_RATE_CONTROL_INFORMATION

JOBOBJECT_END_OF_JOB_TIME_INFORMATION

JOBOBJECT_EXTENDED_LIMIT_INFORMATION

JOBOBJECT_LIMIT_VIOLATION_INFORMATION

JOBOBJECT_LIMIT_VIOLATION_INFORMATION_2

JOBOBJECT_NET_RATE_CONTROL_INFORMATION

JOBOBJECT_NOTIFICATION_LIMIT_INFORMATION

JOBOBJECT_NOTIFICATION_LIMIT_INFORMATION_2

JOBOBJECT_SECURITY_LIMIT_INFORMATION

Job Objects

Process and Thread Functions

SetInformationJobObject