DriverEntry of Display Miniport Driver function

The DriverEntry function provides the Microsoft DirectX graphics kernel subsystem with a set of pointers to functions implemented by the display miniport driver.

Syntax

NTSTATUS DriverEntry(
  _In_ PDRIVER_OBJECT  DriverObject,
  _In_ PUNICODE_STRING RegistryPath
);

Parameters

DriverObject [in] A pointer to a DRIVER_OBJECT structure that represents the driver formed by the (display miniport, display port) driver pair.

RegistryPath [in] A pointer to a UNICODE_STRING structure that supplies the path to the driver's registry key.

Return value

DriverEntry calls DxgkInitialize and must return the value returned by DxgkInitialize.

Remarks

DriverEntry must perform the following steps:

  1. Allocate a DRIVER_INITIALIZATION_DATA structure, and set its Version member to DXGKDDI_INTERFACE_VERSION, which is defined in Dispmprt.h.

  2. Fill in the remaining members of the DRIVER_INITIALIZATION_DATA structure with pointers to the following functions, which are implemented by the display miniport driver.

  3. Pass DriverObject, RegistryPath, and the filled in DRIVER_INITIALIZATION_DATA structure to DxgkInitialize.

  4. Return the value returned by DxgkInitialize.

The DRIVER_INITIALIZATION_DATA structure does not need to remain in memory after DriverEntry returns.

DriverEntry should be made pageable.

For kernel mode display-only driver (KMDOD) interface, the KMDDOD_INITIALIZATION_DATA structure lists all functions that can be implemented by a KMDOD. All of these functions, except for the DxgkDdiPresentDisplayOnly function, can also be implemented by a full display miniport driver. The DriverEntry function of the kernel mode display-only driver (KMDOD) supplies function pointers to the display port driver by filling in all members of a KMDDOD_INITIALIZATION_DATA structure and then passing that structure to the DxgkInitializeDisplayOnlyDriver function.

Note that if a KMDOD does not support the VSync control feature, it should not implement certain functions—see Saving Energy with VSync Control.

The following structures and enumeration are also used with kernel mode display-only drivers:

Note

A KMDOD does not support the sleep power state. If it is placed in the sleep state, the driver will cause a system bugcheck to occur. There is no workaround available, by design.
If the current display driver is not a Windows Display Driver Model (WDDM) 1.2 compliant driver, a KMDOD might fail to install, with error code 43 displayed. The KMDOD driver is actually installed, but it cannot be started. The workaround for this issue is to switch to the Microsoft Basic Display Adapter Driver before installing the KMDOD, or simply to reboot your system after installing the KMDOD.

Requirements

Target platform

Desktop

Version

Available in Windows Vista and later versions of the Windows operating systems.

Library

NtosKrnl.lib

DLL

NtosKrnl.exe

See also

DxgkInitialize

DxgkDdiUnload