// wdffileobject.h
ULONG WdfFileObjectGetInitiatorProcessId(
[in] WDFFILEOBJECT FileObject
);
View the official Windows Driver Kit DDI referenceNo description available.
[Applies to KMDF and UMDF]
The WdfFileObjectGetInitiatorProcessId function retrieves the initiator process ID that is associated with a specified framework file object.
FileObject [in]A handle to a framework file object.
Returns the initiator process identifier associated with the file, if any exists. Otherwise, the function returns zero.
Starting in Windows 8, a system component may issue a create on behalf of an application. The driver can call WdfFileObjectGetInitiatorProcessId to determine which process the create operation is ultimately intended for.
WdfFileObjectGetInitiatorProcessId returns zero if no initiator process is associated with the create operation.
IWDFDevice3::GetInitiatorProcessId
WdfRequestGetRequestorProcessId