Compartir a través de


GetCallerVMProcessId (Windows Embedded CE 6.0)

1/6/2010

This function obtains the process identifier of the caller that originated the call to the function.

Syntax

DWORD GetCallerVMProcessId (void);

Parameters

None.

Return Value

The process identifier of the process that made the call into the driver, directly or indirectly, from another kernel component.

Remarks

Replace GetCallerProcess with GetDirectCallerProcessId or GetCallerVMProcessId.

Device drivers need to know who originates a call so that they can access the virtual memory and the handle of the caller. Device drivers also need to know if they were called from a trusted source, or directly called from a user process. For example, a driver can be called from a user application with WriteFile, which calls DeviceIoControl into the driver.

A driver can also be called with a DeviceIoControl directly. If the parameters are coming from the kernel, the driver knows they can be trusted. User parameters need to be validated. GetCallerVMProcessId and ForwardDeviceIoControl resolve these issues.

Requirements

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

See Also

Reference

Kernel Functions
ForwardDeviceIoControl
GetDirectCallerProcessId
Process ID Functions

Concepts

New Kernel APIs

Other Resources

DeviceIoControl
WriteFile