Windows kernel global variables

Kernel global variables.

Variable Declaration Description
Mm64BitPhysicalAddress PBOOLEAN Mm64BitPhysicalAddress

Declared in Wdm.h

Specifies whether the hardware and operating system support 64-bit physical addresses. Points to a value that is TRUE if the hardware and operating system support 64-bit physical addresses, and is FALSE otherwise.

For more information about how to use this variable in your driver, see Performing DMA in 64-Bit Windows.

MmBadPointer PVOID MmBadPointer;

Declared in Wdm.h

A pointer to a memory location that is guaranteed to be invalid.

Note Starting with Windows 8.1, MmBadPointer is deprecated. Drivers should use the MM_BAD_POINTER macro instead.

The operating system generates a bug check if the memory address that is specified by the MmBadPointer variable is accessed.

You can use MmBadPointer to debug your driver code. Set any uninitialized pointer variables to MmBadPointer to find the first time that your code tries to dereference an invalid pointer.

All addresses within PAGE_SIZE of MmBadPointer are guaranteed to be invalid. For example, if Address is a pointer and if MmBadPointer <= Address < MmBadPointer + PAGE_SIZE, attempts to access *Address causes the operating system to generate a bug check. MmBadPointer + PAGE_SIZE is not guaranteed to be invalid.

PsInitialSystemProcess PEPROCESS PsInitialSystemProcess;

Declared in Ntddk.h

Points to the EPROCESS structure for the system process.

NLS_MB_CODE_PAGE_TAG extern BOOLEAN NLS_MB_CODE_PAGE_TAG;

Specifies whether a code page is a single-byte or multibyte code page.

NLS_MB_CODE_PAGE_TAG is TRUE for multibyte code pages and FALSE for single-byte code pages.

NLS_MB_CODE_PAGE_TAG is reserved for system use. From user mode, call GetCPInfoEx instead.

When possible, your application should use Unicode instead of code pages.

EPROCESS
GetCPInfoEx
MM_BAD_POINTER
Performing DMA in 64-Bit Windows


Send comments about this topic to Microsoft