Freigeben über


MapCallerPtr (Windows CE 5.0)

Send Feedback

This function validates whether a region of memory pointed to by the ptr parameter is valid with respect to the caller process.

LPVOID MapCallerPtr(  LPVOID ptr,   DWORD dwLen);

Parameters

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

Return Values

Returns the mapped version of ptr if it is valid; otherwise, this function returns NULL.

Remarks

MapCallerPtr is generally used in device drivers' IOCTLs, where you can validate the pointer parameters passed by the caller process. Because device drivers usually run with a higher privilege and have access to more memory, if you do not call this function to validate the parameters, it could overwrite a processes' memory. It could also overwrite the kernel memory if called from a malicious application.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Pkfuncs.h.
Link Library: Coredll.lib.

See Also

MapPtrToProcess | XXX_Init

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.