Kernel32GetProcessHeaps Method
Returns the number of active heaps and retrieves handles to all of the active heaps for the calling process.
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", SetLastError = true)]
public static uint GetProcessHeaps(
[OptionalAttribute] uint numberOfHeaps,
[OptionalAttribute] IntPtr[] processHeaps
)
<DllImportAttribute("Kernel32.dll", SetLastError := true>]
Public Shared Function GetProcessHeaps (
<OptionalAttribute> numberOfHeaps As UInteger,
<OptionalAttribute> processHeaps As IntPtr()
) As UInteger
Dim numberOfHeaps As UInteger
Dim processHeaps As IntPtr()
Dim returnValue As UInteger
returnValue = Kernel32.GetProcessHeaps(numberOfHeaps,
processHeaps)
public:
[DllImportAttribute(L"Kernel32.dll", SetLastError = true)]
static unsigned int GetProcessHeaps(
[OptionalAttribute] unsigned int numberOfHeaps,
[OptionalAttribute] array<IntPtr>^ processHeaps
)
[<DllImportAttribute("Kernel32.dll", SetLastError = true)>]
static member GetProcessHeaps :
[<OptionalAttribute>] numberOfHeaps : uint32 *
[<OptionalAttribute>] processHeaps : IntPtr[] -> uint32
No code example is currently available or this language may not be supported.
- numberOfHeaps UInt32 (Optional)
-
The maximum number of heap handles that can be stored into the buffer pointed to by ProcessHeaps.
- processHeaps IntPtr (Optional)
-
A pointer to a buffer that receives an array of heap handles.
UInt32
The return value is the number of handles to heaps that are active for the calling process.
If the return value is less than or equal to
numberOfHeaps,
the function has stored that number of heap handles in the buffer pointed to by
processHeaps.
If the return value is greater than
numberOfHeaps,
the buffer pointed to by
processHeaps is too small to hold all the
heap handles for the calling process, and the function stores
numberOfHeaps handles in the buffer.
Use the return value to allocate a buffer that is large enough to receive all of the handles,
and call the function again.
If the return value is zero, the function has failed because every process has at least one active heap,
the default heap for the process.