// wdfrequest.h
NTSTATUS WdfRequestImpersonate(
[in] WDFREQUEST Request,
[in] SECURITY_IMPERSONATION_LEVEL ImpersonationLevel,
[in] PFN_WDF_REQUEST_IMPERSONATE EvtRequestImpersonate,
[in, optional] PVOID Context
);
View the official Windows Driver Kit DDI referenceNo description available.
[Applies to UMDF only]
The WdfRequestImpersonate method registers a driver-supplied event callback function that the framework should call for impersonation.
Request [in]A handle to the framework request object that represents the I/O request that is being completed.
ImpersonationLevel [in]A SECURITY_IMPERSONATION_LEVEL-typed value that identifies the level of impersonation.
EvtRequestImpersonate [in]A pointer to the driver's EvtRequestImpersonate event callback function.
Context [in, optional]A pointer to a buffer that contains context information that is related to the impersonation call. The framework passes this context information in a call to the EvtRequestImpersonate event callback function. This parameter is optional and can be NULL
If the WdfRequestImpersonate method encounters no errors, it returns STATUS_SUCCESS.
The method might return other NTSTATUS values.
The WdfRequestImpersonate method does not return until the EvtRequestImpersonate event callback function completes.
For more information, see Handling Client Impersonation in UMDF Drivers.