Click to Rate and Give Feedback
MSDN
MSDN Library
Windows Driver Kit
Reference
 EvtDriverUnload
Windows Driver Kit: Kernel-Mode Driver Framework
EvtDriverUnload

A driver's EvtDriverUnload event callback function performs operations that must take place before the driver is unloaded.

EVT_WDF_DRIVER_UNLOAD EvtDriverUnload;

VOID
  EvtDriverUnload (
    IN WDFDRIVER  Driver
    )
  {…}

You must declare the function by using the EVT_WDF_DRIVER_UNLOAD type. For more information, see the following Example section.

Parameters

Driver
A handle to a framework driver object.

Return Value

None

Comments

The EvtDriverUnload callback function must deallocate any non-device–specific system resources that the driver's DriverEntry routine allocated.

Example

To define an EvtDriverUnload callback function that is named MyDriverUnload, you must first provide a function declaration that SDV and other verification tools require, as follows:

EVT_WDF_DRIVER_UNLOAD  MyDriverUnload;

Then, implement your callback function as follows:

VOID 
  MyDriverUnload (
    IN WDFDRIVER  Driver
    )
  {...}

Requirements

Versions: The EvtDriverUnload callback function is supported by version 1.0 and later versions of KMDF.

IRQL: PASSIVE_LEVEL

Headers: Defined in Wdfdriver.h, as follows:

typedef VOID
  (EVT_WDF_DRIVER_UNLOAD)(
    IN WDFDRIVER Driver
    );

Include Wdf.h.

See Also

DriverEntry


Send feedback on this topic
Built on November 19, 2009
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker