Initializing the Display Miniport Driver
After the operating system has loaded the display miniport driver, the following steps occur to initialize the display miniport driver:
The operating system calls the display miniport driver's DriverEntry function.
DriverEntry allocates a DRIVER_INITIALIZATION_DATA structure and populates the Version member of DRIVER_INITIALIZATION_DATA with DXGKDDI_INTERFACE_VERSION and the remaining members of DRIVER_INITIALIZATION_DATA with pointers to the display miniport driver's other entry point functions (that is, the functions that the display miniport driver implements).
DriverEntry calls the DxgkInitialize function to load the Microsoft DirectX graphics kernel subsystem (Dxgkrnl.sys) and to supply the DirectX graphics kernel subsystem with pointers to the display miniport driver's other entry point functions.
After DxgkInitialize returns, DriverEntry propagates the return value of DxgkInitialize back to the operating system. Display miniport driver writers should make no assumptions about the value that DxgkInitialize returns.