|
ProcessHelperGetProcessAffinityMask Method |
Namespace: Xcalibur.NativeMethods.V2.ProcessesAssembly: 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
)
<DllImportAttribute("kernel32.dll", CharSet := CharSet.Auto, SetLastError := true>]
Public Shared Function GetProcessAffinityMask (
processHandle As IntPtr,
<OutAttribute> ByRef processMask As IntPtr,
<OutAttribute> ByRef systemMask As IntPtr
) As Boolean
public:
[DllImportAttribute(L"kernel32.dll", CharSet = CharSet::Auto, SetLastError = true)]
static bool GetProcessAffinityMask(
IntPtr processHandle,
[OutAttribute] IntPtr% processMask,
[OutAttribute] IntPtr% systemMask
)
[<DllImportAttribute("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)>]
static member GetProcessAffinityMask :
processHandle : IntPtr *
processMask : IntPtr byref *
systemMask : IntPtr byref -> bool
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