Creating Callback Objects

[This topic applies to UMDF 1.x.]

A UMDF driver can create callback objects, which consist of context data and interface methods. The framework accesses the driver's callback objects through the driver's callback interface methods.

The following figure shows how driver-implemented callback objects correspond to framework objects.

Framework objects and vendor-supplied callback objects

A UMDF driver can create several types of callback objects, including the following:

  • Driver callback object

    The framework uses the driver callback object to initialize the driver and notify the driver of the arrival of a new device.

  • Device callback object

    The driver uses the device callback object to store device context and to handle the cleanup and closing of file objects and Plug and Play (PnP) and power management (PM) events.

  • Queue callback object

    The driver uses the queue callback object to process I/O.

The following figure shows how a UMDF driver creates a device callback object.

Call sequence for creating a UMDF device callback object

The following topics contain code examples that show how to create a callback object:

Creating Callback Objects Example

Defining Callback Objects Example

Associating Callback Interfaces Example

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft