Home > Articles > Operating Systems, Server > Microsoft Servers

  • Print
  • + Share This
Like this article? We recommend

Like this article? We recommend

KMDF Object Model

KMDF defines an object-based programming model in which object types represent common driver constructs. Each object exports methods (functions) and properties (data) that drivers can access and is associated with object-specific events, which drivers can support by providing event callbacks. The objects themselves are opaque to the driver.

KMDF creates some objects on behalf of the driver, and the driver creates others depending on its specific requirements. The driver also provides callbacks for the events for which the KMDF defaults don't suit its device and calls methods on the object to get and set properties and perform any additional actions. Consequently, a KMDF driver is essentially a DriverEntry routine, a set of callback functions that perform device-specific tasks, and whatever utility functions the driver implementation requires.

Framework-base drivers never directly access instances of framework objects. Instead, they reference object instances by handles, which the driver passes as parameters to object methods, and KMDF passes as parameters to event callbacks. Framework objects are unique to the framework. They're not managed by the Windows Object Manager and cannot be manipulated by using the system's ObXxx function. Only the framework (and its drivers) can create and operate on them.

  • + Share This
  • 🔖 Save To Your Account