BOOL VDDAllocMem(hVdd, Address, Size)
IN HANDLE hVdd;
IN PVOID Address;
IN DWORD Size;
VDDAllocMem allocates memory at a given virtual address.
VDDAllocMem returns TRUE if successful. If the function fails then FALSE is returned and an error is logged.
The extended error codes are:
Value |
Meaning |
ERROR_OUTOFMEMORY |
Indicates insufficient memory error. |
ERROR_INVALID_ADDRESS |
Identifies invalid address error. |
VDDs must use this function instead of VirtualAlloc (see the Win32 SDK) to allocate memory.
Address is page-aligned downwards, and Size is stretched upward to be page-aligned.
Address is relative to DOS 0:0. GetVDMPointer should not be called on this address before calling VDDAllocMem.
This address is the same as that provided by the hook handler for memory-mapped I/O.
GetVDMPointer