[Compuware Corporation] [Compuware NuMega home page] [NuMega Lab] [teal] [DriverStudio] [Image][Image] · Home [Driver Products] Driver Technical Tips · DriverStudio WDM Device Interfaces · DriverBundle · Previews Win32 Driver Model introduces the concept of device · Compatibility interfaces. A device interface is an object that [Downloads] · provides a defined set of IRP-based services, and is instantiated in a particular device object. The Wizards abstract functionality of a device interface is · Utilities referred to as an interface class. For example, · NT source suppose an application needs the services of a examples Toaster, but doesn't know the name of a particular · VxD source device that provides the standard services that all examples Toaster devices support. On WDM systems, the · WDM source application can query the operating system for the examples names (actually, symbolic links) of all devices that [Resources] · have registered instances of the Toaster interface Technical papers class. In order to query for the devices that provide · Useful links a particular interface class, the application must · Technical tips know the GUID that identifies the class. Once an [Support] · application has obtained a symbolic link to a device that supports the interface class, it can then use Support CreateFile to gain access to the device. · Knowledge base · Problem At the driver level, there are new system services submission that enable drivers to declare that an interface · Product class is manifested in a particular device. When a registration WDM driver creates a device, it registers a device · Release notes interface for each interface class that the device [Shop NuMega] · provides. To register a device interface, the driver Buy it! calls IoRegisterDeviceInterface, passing the physical · Price list device object and the GUID that identifies the · How to buy interface class. This service creates and returns a · Sales offices symbolic link that uniquely identifies the device interface. The system composes the symbolic link from the class GUID and a serial number which it maintains [Y2K Compliance] in the registry and increments each time a new interface of that class is registered. [More information] The device object to which the symbolic link refers is the physical device object (PDO), not the functional device object (FDO) created by the driver that calls IoRegisterDeviceInterface. In order to receive IRPs sent by an application that opens the symbolic link, the driver must attach the FDO to the PDO, as is normal. Prior to WDM, drivers were responsible for naming the symbolic links of each device they created. In the WDM environment, the symbolic link is to the underlying PDO, and its name is determined by the system, based on the GUID of the interface class. When a device is activated (i.e., it receives IRP_MJ_PNP with minor function IRP_MN_START_DEVICE), it enables its interfaces by calling IoSetDeviceInterfaceState, passing TRUE to indicate enabling. Similarly, when the device is stopped or removed, it must call that service again, passing FALSE. In DriverWorks (version 2.0 and later), device interfaces are treated similarly to symbolic links. There is a constructor for class KPnpDevice that accepts a class GUID as a parameter and registers the corresponding device interface. There are also new member functions to support registration of additional interfaces, as well as support for automatically enabling and disabling interfaces as the device state changes. Click here for more information on WDM Device Interfaces. Back to technical tip start page. DriverCentral · DriverStudio · Free downloads · Resources · Support and Services · Shop NuMega Compuware NuMega · Tel: +1 603 578-8400 · Updated: 9 August 1999 · Problems? Contact our webmaster.