Kernel32SetProcessDefaultCpuSets Method
Sets the default CPU Sets assignment for threads in the specified process.
Threads that are created, which don’t have CPU Sets explicitly set using
SetThreadSelectedCpuSets(IntPtr, UInt32, UInt32),
will inherit the sets specified by
SetProcessDefaultCpuSets(IntPtr, UInt32, UInt32) automatically.
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 SetProcessDefaultCpuSets(
IntPtr hProcess,
uint[] cpuSetIds,
uint cpuSetIdCound
)
<DllImportAttribute("Kernel32.dll", ExactSpelling := true>]
Public Shared Function SetProcessDefaultCpuSets (
hProcess As IntPtr,
cpuSetIds As UInteger(),
cpuSetIdCound As UInteger
) As Boolean
Dim hProcess As IntPtr
Dim cpuSetIds As UInteger()
Dim cpuSetIdCound As UInteger
Dim returnValue As Boolean
returnValue = Kernel32.SetProcessDefaultCpuSets(hProcess,
cpuSetIds, cpuSetIdCound)
public:
[DllImportAttribute(L"Kernel32.dll", ExactSpelling = true)]
static bool SetProcessDefaultCpuSets(
[InAttribute] IntPtr hProcess,
[InAttribute] array<unsigned int>^ cpuSetIds,
unsigned int cpuSetIdCound
)
[<DllImportAttribute("Kernel32.dll", ExactSpelling = true)>]
static member SetProcessDefaultCpuSets :
hProcess : IntPtr *
cpuSetIds : uint32[] *
cpuSetIdCound : uint32 -> bool
No code example is currently available or this language may not be supported.
- hProcess IntPtr
-
Specifies the process for which to set the default CPU Sets.
This handle must have the PROCESS_SET_LIMITED_INFORMATION access right.
The value returned by GetCurrentProcess can also be specified here
- cpuSetIds UInt32
-
Specifies the list of CPU Set IDs to set as the process default CPU set.
If this is NULL, the SetProcessDefaultCpuSets(IntPtr, UInt32, UInt32) clears out any assignment
- cpuSetIdCound UInt32
-
Specifies the number of IDs in the list passed in the cpuSetIds argument.
If that value is NULL, this should be 0.
Boolean
If the function succeeds, the return value is
.
If the function fails, the return value is
.