Kernel32SetThreadSelectedCpuSets Method
Sets the selected CPU Sets assignment for the specified thread.
This assignment overrides the process default assignment, if one is set.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("Kernel32.dll", ExactSpelling = true)]
public static bool SetThreadSelectedCpuSets(
IntPtr hThread,
uint[] cpuSetIds,
uint cpuSetIdCount
)
<DllImportAttribute("Kernel32.dll", ExactSpelling := true>]
Public Shared Function SetThreadSelectedCpuSets (
hThread As IntPtr,
cpuSetIds As UInteger(),
cpuSetIdCount As UInteger
) As Boolean
Dim hThread As IntPtr
Dim cpuSetIds As UInteger()
Dim cpuSetIdCount As UInteger
Dim returnValue As Boolean
returnValue = Kernel32.SetThreadSelectedCpuSets(hThread,
cpuSetIds, cpuSetIdCount)
public:
[DllImportAttribute(L"Kernel32.dll", ExactSpelling = true)]
static bool SetThreadSelectedCpuSets(
[InAttribute] IntPtr hThread,
array<unsigned int>^ cpuSetIds,
unsigned int cpuSetIdCount
)
[<DllImportAttribute("Kernel32.dll", ExactSpelling = true)>]
static member SetThreadSelectedCpuSets :
hThread : IntPtr *
cpuSetIds : uint32[] *
cpuSetIdCount : uint32 -> bool
No code example is currently available or this language may not be supported.
- hThread IntPtr
-
Specifies the thread on which to set the CPU Set assignment.
This handle must have the SetLimitedInformation access right.
The value returned by GetCurrentThread can also be used.
- cpuSetIds UInt32
-
Specifies the list of CPU Set IDs to set as the thread selected CPU set.
If this parameter is NULL, the function clears out any assignment, reverting to process default assignment if one is set.
- cpuSetIdCount UInt32
-
Specifies the number of IDs in the list passed in the cpuSetIds argument.
If that value is NULL, this should be 0.
Boolean
This function cannot fail when passed valid parameters.