Kernel32AllocateUserPhysicalPages(IntPtr, IntPtr, IntPtr) Method
Allocates physical memory pages to be mapped and unmapped within any Address Windowing Extensions (AWE) region
of a specified 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 bool AllocateUserPhysicalPages(
IntPtr hProcess,
ref IntPtr refNumberOfPages,
IntPtr pageArray
)
<DllImportAttribute("Kernel32.dll", SetLastError := true>]
Public Shared Function AllocateUserPhysicalPages (
hProcess As IntPtr,
ByRef refNumberOfPages As IntPtr,
pageArray As IntPtr
) As Boolean
Dim hProcess As IntPtr
Dim refNumberOfPages As IntPtr
Dim pageArray As IntPtr
Dim returnValue As Boolean
returnValue = Kernel32.AllocateUserPhysicalPages(hProcess,
refNumberOfPages, pageArray)
public:
[DllImportAttribute(L"Kernel32.dll", SetLastError = true)]
static bool AllocateUserPhysicalPages(
IntPtr hProcess,
IntPtr% refNumberOfPages,
IntPtr pageArray
)
[<DllImportAttribute("Kernel32.dll", SetLastError = true)>]
static member AllocateUserPhysicalPages :
hProcess : IntPtr *
refNumberOfPages : IntPtr byref *
pageArray : IntPtr -> bool
No code example is currently available or this language may not be supported.
- hProcess IntPtr
-
A handle to a process.
The function allocates memory that can later be mapped within the virtual address space of this process.
The handle must have the VirtualMemoryOperation access right.
- refNumberOfPages IntPtr
-
The size of the physical memory to allocate, in pages.
To determine the page size of the computer, use the GetSystemInfo function.
On output, this parameter receives the number of pages that are actually allocated,
which might be less than the number requested.
- pageArray IntPtr
-
A pointer to an array to store the page frame numbers of the allocated memory.
The size of the array that is allocated should be at least the refNumberOfPages times the size of the ULONG_PTR data type.
Caution: Do not attempt to modify this buffer. It contains operating system data, and corruption could be catastrophic.
The information in the buffer is not useful to an application.
Boolean
If the function succeeds, the return value is
.
If the function fails, the return value is
.
To get extended error information, call
GetLastWin32Error.