Click or drag to resize
Xcalibur Systems LLC Logo

ProcessHelperGetProcessAffinityMask Method

Retrieves the process affinity mask for the specified process and the system affinity mask for the system.

GetProcessAffinityMask function


Namespace: Xcalibur.NativeMethods.V2.Processes
Assembly: Xcalibur.NativeMethods.V2 (in Xcalibur.NativeMethods.V2.dll) Version: 1.0.1.0
Syntax
[DllImportAttribute("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
public static bool GetProcessAffinityMask(
	IntPtr processHandle,
	out IntPtr processMask,
	out IntPtr systemMask
)

Parameters

processHandle  IntPtr
A handle to the process whose affinity mask is desired. This handle must have the or access right.
processMask  IntPtr
A pointer to a variable that receives the affinity mask for the specified process.
systemMask  IntPtr
A pointer to a variable that receives the affinity mask for the system.

Return Value

Boolean
If the function succeeds, the return value is nonzero and the function sets the variables pointed to by processMask and systemMask to the appropriate affinity masks. On a system with more than 64 processors, if the threads of the calling process are in a single processor group, the function sets the variables pointed to by processMask and systemMask to the process affinity mask and the processor mask of active logical processors for that group.If the calling process contains threads in multiple groups, the function returns zero for both affinity masks. If the function fails, the return value is zero. To get extended error information, call .
See Also