Export (0) Print
Expand All
Expand Minimize

MmBadPointer

The MmBadPointer global variable is 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.

PVOID MmBadPointer;

Remarks

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.

Requirements

Version

Available starting with Windows Vista.

Header

Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)

Library

Ntoskrnl.lib

See also

MM_BAD_POINTER

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft