KeQueryGroupAffinity - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// ntddk.h

KAFFINITY KeQueryGroupAffinity(
  [in] USHORT GroupNumber
);

View the official Windows Driver Kit DDI reference
// wdm.h

KAFFINITY KeQueryGroupAffinity(
  [in] USHORT GroupNumber
);

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-ntddk-kequerygroupaffinity)

KeQueryGroupAffinity function (ntddk.h)

Description

The KeQueryGroupAffinity routine returns an affinity mask that identifies the active logical processors in a specified group in a multiprocessor system.

Parameters

GroupNumber [in]

The group number. If a multiprocessor system contains n groups, the groups are numbered from 0 to n-1. To obtain the number of active groups in the system, call the KeQueryActiveGroupCount routine.

Return value

KeQueryGroupAffinity returns a KAFFINITY value that identifies the active logical processors in the specified group. If the GroupNumber parameter value is not a valid group number, the routine returns zero.

Remarks

A related routine, KeQueryActiveProcessors, returns an affinity mask that represents a set of active processors, but this routine, unlike KeQueryGroupAffinity, does not accept a group number as an input parameter. In Windows 7 and later versions of the Windows operating system, KeQueryActiveProcessors returns an affinity mask for the active processors in group 0, which is compatible with the behavior of this routine in earlier versions of Windows that do not support groups. This behavior ensures that existing drivers that call KeQueryActiveProcessors and that use no group-oriented features will run correctly in multiprocessor systems that have two or more groups. However, drivers that use any group-oriented features in Windows 7 and later versions of the Windows operating system should call KeQueryGroupAffinity instead of KeQueryActiveProcessors.

See also

KAFFINITY

KeQueryActiveProcessors


Windows Driver Kit DDI reference (nf-wdm-kequerygroupaffinity)

KeQueryGroupAffinity function (wdm.h)

Description

The KeQueryGroupAffinity routine returns an affinity mask that identifies the active logical processors in a specified group in a multiprocessor system.

Parameters

GroupNumber [in]

The group number. If a multiprocessor system contains n groups, the groups are numbered from 0 to n-1. To obtain the number of active groups in the system, call the KeQueryActiveGroupCount routine.

Return value

KeQueryGroupAffinity returns a KAFFINITY value that identifies the active logical processors in the specified group. If the GroupNumber parameter value is not a valid group number, the routine returns zero.

Remarks

A related routine, KeQueryActiveProcessors, returns an affinity mask that represents a set of active processors, but this routine, unlike KeQueryGroupAffinity, does not accept a group number as an input parameter. In Windows 7 and later versions of the Windows operating system, KeQueryActiveProcessors returns an affinity mask for the active processors in group 0, which is compatible with the behavior of this routine in earlier versions of Windows that do not support groups. This behavior ensures that existing drivers that call KeQueryActiveProcessors and that use no group-oriented features will run correctly in multiprocessor systems that have two or more groups. However, drivers that use any group-oriented features in Windows 7 and later versions of the Windows operating system should call KeQueryGroupAffinity instead of KeQueryActiveProcessors.

See also

KAFFINITY

KeQueryActiveProcessors