Kernel-Mode Driver Entry Points

All kernel-mode multimedia drivers must export a DriverEntry function. They must also fill in the Windows NT device object’s dispatch table.

DriverEntry in Kernel-Mode Multimedia Drivers

All kernel-mode multimedia drivers must export a DriverEntry function, which is the first function executed after the driver is loaded. (The driver is loaded as a result of being installed by a user-mode driver. See Installing a Kernel-Mode Multimedia Driver.)

DriverEntry for multimedia drivers should perform such installation-time operations as obtaining hardware configuration parameter values from the registry, reserving system resources, and verifying that device hardware is accessible.

For more information about the DriverEntry function, see the chapters discussing the various driver types. The chapters are listed in Types of Multimedia Devices.

The Driver Object’s Dispatch Table

Before Windows NT calls a kernel-mode driver’s DriverEntry function, it creates a driver object. It then passes the driver object’s address as an input argument to DriverEntry for multimedia drivers. The kernel-mode driver is responsible for filling in the driver object’s MajorFunction member, which is a dispatch table representing the various I/O control codes that a user-mode driver can send to a kernel-mode driver. For more information about driver objects, which are defined by the DRIVER_OBJECT structure, see the Kernel-Mode Drivers Reference.

Kernel-mode multimedia drivers do not always fill in the dispatch table directly. Sometimes, multimedia driver support libraries take care of this operation. The support libraries are described in the chapters discussing the various driver types. The chapters are listed in Types of Multimedia Devices.