This function maps an unmapped pointer to a process.
Note This function is no longer supported as of CE 6.0.
The OEM* functions typically do not call this function. This kernel function is primarily provided for use by device drivers. However, any application can call this function.
If the pointer is already mapped, MapPtrToProcess returns the original pointer if the application calling the function has the access necessary to dereference that pointer. Otherwise, NULL is returned.
If the pointer is unmapped, MapPtrToProcess first maps the pointer, and then returns the mapped pointer if the application calling the function can access it. Otherwise, NULL is returned.
This function should be called to map pointers that are passed to a protected server library where the pointer is not a parameter directly, but it is, rather, obtained from a structure and must be adjusted for the address space.
For example, to pass the pointer pPointer to another process, first make the following call:
pPointer_retval = MapPtrToProcess(pPointer, (HANDLE) GetCurrentProcessId());
Then pPointer_retval can be passed in calls to the other process.