DxApi Miniport Driver Initialization

To enable DxApi interface functionality, the DirectDraw driver must perform the following tasks at initialization time:

  1. The driver must specify a DdGetDriverInfo function in the DD_HALINFO structure that DirectDraw can call to get additional information.

  2. The DdGetDriverInfo callback is called with the GUID_KernelCallbacks GUID specified. The driver must fill in a DD_KERNELCALLBACKS structure with the appropriate callbacks and flags set. The driver then copies this structure to the lpvData member of the DD_GETDRIVERINFODATA structure.

  3. The DdGetDriverInfo callback is called with GUID_KernelCaps GUID specified. The driver must fill in a DDKERNELCAPS structure. The driver then copies this structure to the lpvData member of the DD_GETDRIVERINFODATA structure.

  4. The DirectDraw runtime calls the video port driver IOCTL handler with MajorFunction = IRP_MJ_PNP, MinorFunction = IRP_MN_QUERY_INTERFACE, and InterfaceType = GUID_DxApi. The video port driver then calls the video miniport driver's HwVidQueryInterface function to fill in the DXAPI_INTERFACE structure with pointers to the DxApi interface callback functions that DirectDraw can call. These callback functions are listed in Kernel-Mode Video Transport Callback Functions.

The video miniport driver can specify a value in the Context member of the DXAPI_INTERFACE structure that is passed to the video miniport driver each time one of these functions is called.