DXGKDDI_START_DEVICE callback function (dispmprt.h)
The DxgkDdiStartDevice function prepares a display adapter to receive I/O requests.
Syntax
DXGKDDI_START_DEVICE DxgkddiStartDevice;
NTSTATUS DxgkddiStartDevice(
[in] IN_CONST_PVOID MiniportDeviceContext,
[in] IN_PDXGK_START_INFO DxgkStartInfo,
[in] IN_PDXGKRNL_INTERFACE DxgkInterface,
[out] OUT_PULONG NumberOfVideoPresentSources,
[out] OUT_PULONG NumberOfChildren
)
{...}
Parameters
[in] MiniportDeviceContext
A handle to a context block associated with a display adapter. The display miniport driver's DxgkDdiAddDevice function previously provided this handle to the DirectX graphics kernel subsystem.
[in] DxgkStartInfo
A pointer to a DXGK_START_INFO structure that contains information that the display miniport driver needs for initialization.
[in] DxgkInterface
A pointer to a DXGKRNL_INTERFACE structure that contains pointers to functions, implemented by the DirectX graphics kernel subsystem, that the display miniport driver can call.
[out] NumberOfVideoPresentSources
A pointer to a ULONG variable that receives the number of video present sources supported by the display adapter. For more information about video present sources, see Multiple Monitors and Video Present Networks.
[out] NumberOfChildren
A pointer to a ULONG variable that receives the total number of devices that are children of the display adapter represented by MiniportDeviceContext. This count must include potential child devices as well as child devices that are currently present. For example, if docking a portable computer will make additional video outputs available, those video outputs must be counted regardless of whether the portable computer is currently docked. For more information about child devices, see Child Devices of the Display Adapter.
Return value
DxgkDdiStartDevice returns STATUS_SUCCESS if it succeeds; otherwise, it returns one of the error codes defined in Ntstatus.h.
Remarks
The DxgkDdiStartDevice function must perform the following actions:
- Save the function pointers supplied by the DXGKRNL_INTERFACE structure passed to the DxgkInterface parameter. Also save the DeviceHandle member of the DXGKRNL_INTERFACE structure; you will need that handle to call back into the DirectX graphics kernel subsystem.
- Allocate a DXGK_DEVICE_INFO structure, and call DxgkCbGetDeviceInformation to fill in the members of that structure, which include the registry path, the PDO, and a list of translated resources for the display adapter represented by MiniportDeviceContext. Save selected members (ones that the display miniport driver will need later) of the DXGK_DEVICE_INFO structure in the context block represented by MiniportDeviceContext.
- Map memory resources into system space by calling the DxgkCbMapMemory function.
- Initialize the context block represented by MiniportDeviceContext with any state that is required to prepare the hardware to receive I/O requests.
- Set NumberOfVideoPresentSources to the number of video present sources supported by the display adapter that is represented by MiniportDeviceContext.
- Set NumberOfChildren to the number of devices that are (or could become) children of the display adapter represented by MiniportDeviceContext.
- Enable interrupts for the display adapter represented by MiniportDeviceContext.
The DxgkDdiStartDevice function should be made pageable.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Available starting with Windows Vista. |
Target Platform | Desktop |
Header | dispmprt.h |
IRQL | PASSIVE_LEVEL |