This topic has not yet been rated - Rate this topic

IImpersonateCallback::OnImpersonate method

The OnImpersonate method handles impersonation.

Syntax


void OnImpersonate(
  [in, optional]  void *Context
);

Parameters

Context [in, optional]

A pointer to a context that was previously supplied in the IWDFIoRequest::Impersonate method. This parameter is optional and can be NULL if a context is not required.

Return value

None

Remarks

Typically, the driver uses this callback to call a Win32 function directly. For example, if the driver must open a data file on behalf of an application that sent an I/O operation, the driver requires impersonation only to open the file handle.

To ensure that impersonation does not leak across driver callback functions or between device drivers, OnImpersonate should not call any framework methods.

A driver registers the IImpersonateCallback interface when the driver calls the IWDFIoRequest::Impersonate method.

For more information about how UMDF and UMDF drivers handle impersonation, see Handling Impersonation.

Requirements

Header

Wudfddi.h (include Wudfddi.h)

See also

IImpersonateCallback
IWDFIoRequest::Impersonate

 

 

Send comments about this topic to Microsoft

Build date: 4/1/2013

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.