GetVDMPointer32W

Use GetVDMPointer32W in 16-bit code to translate a 16:16 pointer into a 32-bit pointer.

DWORD FAR PASCAL GetVDMPointer32W(
  LPVOID lpAddress,  // 16:16 address
  UINT fMode         // mode flag
);
 

Parameters

lpAddress
Valid protected or real mode 16:16 address.
fMode
One of the following flags:
1 The address is interpreted as a protected-mode address.
0 The address is interpreted as a real-mode address.

Return Values

Returns a 32-bit linear address if successful or NULL otherwise.

Remarks

On non-x86 platforms, real mode address 0:0 may not point to linear 0 in memory, so always use GetVDMPointer32W to avoid making assumptions about memory layout.

The memory manager moves segments in linear memory, but keeps the selectors the same. However, if you get the linear address of a block, it may not be valid if the 16-bit global memory manager moves the block the selector points to.

Windows 95 and Windows 98: You should assume that global compaction can occur any time that a generic thunk is entered, a Win32 function is called, or the current application yields.