MapCallerPtr

Other versions of this page are also available for the following:

Windows Mobile Not SupportedWindows Embedded CE Supported

8/28/2008

This function checks whether a region of memory is valid with respect to the caller process.

Note   This function is no longer supported as of CE 6.0.

Syntax

LPVOID MapCallerPtr(
  LPVOID ptr,
  DWORD dwLen
);

Parameters

  • ptr
    [in] Pointer to the region of memory.
  • dwLen
    [in] Length, in bytes, of the region of memory.

Return Value

The mapped version of ptr indicates that the region is valid. NULL indicates failure.

Remarks

MapCallerPtr is generally used in device driver I/O controls to validate the pointer parameters passed by the caller process. Because device drivers usually run with higher privileges and have access to more memory, if you do not call this function to validate the parameters, it could overwrite a process's memory. It could also overwrite the kernel memory if called from a malicious application.

Requirements

Header pkfuncs.h
Library coredll.lib
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

Kernel Functions
MapPtrToProcess

Concepts

Unsupported Kernel APIs

Other Resources

XXX_Init (Device Manager)