GetProcessAffinityMask

GetProcessAffinityMask retrieves the process affinity mask for the specified process and the system affinity mask for Real-Time Subsystem (RTSS).

Syntax

BOOL GetProcessAffinityMask(
    HANDLE hProcess,
    PDWORD PTR lpProcessAffinityMask,
    PDWORD PTR lpSystemAffinityMask
);

Parameters

hProcess

A handle to the process whose affinity mask is desired.

lpProcessAffinityMask

A pointer to a variable that receives the affinity mask for the specified process.

lpSystemAffinityMask

A pointer to a variable that receives the affinity mask for Real-Time Subsystem (RTSS).

Return Value

A non-zero value if the function succeeds. The function sets the variables pointed to by lpProcessAffinityMask and lpSystemAffinityMask to the appropriate affinity masks.

0 (zero) if the function fails. The values of the variables pointed to by lpProcessAffinityMask and lpSystemAffinityMask are undefined.

To get extended error information, call GetLastError.

Remarks

A process affinity mask is a bit vector in which each bit represents the processors that a process is allowed to run on. A system affinity mask is a bit vector in which each bit represents the processors that are configured for the Real-Time Subsystem (RTSS). See Specifying a Processor Affinity Bitmask for more details.

Requirements

Minimum Supported Version RTX64 2013
Header windows.h
Library Rtx_Rtss.lib

See Also:

SetProcessAffinityMask

SetThreadAffinityMask