Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

GetThreadGroupAffinity function

Retrieves the processor group affinity of the specified thread.

Syntax


BOOL GetThreadGroupAffinity(
  _In_  HANDLE          hThread,
  _Out_ PGROUP_AFFINITY GroupAffinity
);

Parameters

hThread [in]

A handle to the thread for which the processor group affinity is desired.

The handle must have the THREAD_QUERY_INFORMATION or THREAD_QUERY_LIMITED_INFORMATION access right. For more information, see Thread Security and Access Rights.

GroupAffinity [out]

A pointer to a GROUP_AFFINITY structure to receive the group affinity of the thread.

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, use GetLastError.

Remarks

To compile an application that uses this function, set _WIN32_WINNT >= 0x0601. For more information, see Using the Windows Headers.

Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

WinBase.h on Windows 7 and Windows Server 2008 R2 (include Windows.h);
Processtopologyapi.h on Windows 8 and Windows Server 2012

Library

Kernel32.lib

DLL

Kernel32.dll

See also

GetProcessGroupAffinity
Processor Groups

 

 

Show:
© 2017 Microsoft