MapCallerPtr (Windows Embedded CE 6.0)

1/6/2010

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)