DriverEntry function of a display miniport driver

The DriverEntry function provides the DirectX graphics kernel subsystem (Dxgkrnl) with a set of pointers to functions that the display miniport driver (KMD) implements.

Syntax

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

Parameters

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

RegistryPath is a pointer to a UNICODE_STRING structure that supplies the path to the driver's registry key.

Return value

DriverEntry must return the value returned by the call to 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 DRIVER_INITIALIZATION_DATA with pointers to the functions that KMD implements.

  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 doesn't need to remain in memory after DriverEntry returns.

DriverEntry should be made pageable.

DriverEntry for a kernel-mode display-only driver

For the 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 (KMD). The KMDOD's DriverEntry function supplies function pointers to the display port driver by filling in all members of KMDDOD_INITIALIZATION_DATA and then passing that structure to the DxgkInitializeDisplayOnlyDriver function.

If a KMDOD doesn't support the VSync control feature, it shouldn't implement certain functions. See Saving Energy with VSync Control.

The following structures and enumeration are also used with KMDODs:

Requirements

Requirement Detail
Target platform Desktop
Minimum supported client Windows Vista
Library NtosKrnl.lib
DLL NtosKrnl.exe

See also

DxgkInitialize

DxgkDdiUnload