Table of contents
Collapse the table of content
Expand the table of content

Creating Callback Objects

Last Updated: 1/24/2017

[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:

© 2017 Microsoft