DXGKCB_QUERYVIDPNINTERFACE callback function

The DxgkCbQueryVidPnInterface function returns a pointer to a DXGK_VIDPN_INTERFACE structure. The structure contains pointers to functions that the display miniport driver can call to inspect and alter a VidPN object.

Syntax


DXGKCB_QUERYVIDPNINTERFACE DxgkCbQueryVidPnInterface;

NTSTATUS APIENTRY DxgkCbQueryVidPnInterface(
  _In_  const D3DKMDT_HVIDPN               hVidPn,
  _In_  const DXGK_VIDPN_INTERFACE_VERSION VidPnInterfaceVersion,
  _Out_ const DXGK_VIDPN_INTERFACE         **ppVidPnInterface
)
{ ... }

Parameters

hVidPn [in]

[in] A handle to a VidPN object. The VidPN manager previously provided the display miniport driver with this handle by calling DxgkDdiEnumVidPnCofuncModality, DxgkDdiIsSupportedVidPn, or DxgkDdiRecommendFunctionalVidPn.

VidPnInterfaceVersion [in]

[in] A DXGK_VIDPN_INTERFACE_VERSION enumerator that specifies the version of the VidPN interface being requested. Callers must set this parameter to DXGK_VIDPN_INTERFACE_VERSION_V1.

ppVidPnInterface [out]

[out] A pointer to a variable that receives a pointer to the DXGK_VIDPN_INTERFACE structure.

Return value

DxgkCbQueryVidPnInterface returns one of the following values:

Return codeDescription
STATUS_SUCCESS

The function succeeded.

STATUS_INVALID_PARAMETER

The value passed to ppVidPnInterface is not valid.

STATUS_GRAPHICS_INVALID_VIDPN

The handle passed to hVidPn is not valid.

STATUS_NOT_SUPPORTED

The interface version specified by VidPnInterfaceVersion is not supported.

 

Examples

The following code example shows how to acquire the VidPN-object-management interface from the Microsoft DirectX graphics kernel subsystem (Dxgkrnl.sys).


NTSTATUS
TestDMMInterface
(
    VOID*  i_InterfaceContext,
    D3DKMDT_HVIDPN  i_hVidPn
 )
{
    NTSTATUS  ntStatus = STATUS_SUCCESS;
    HW_DEVICE_EXTENSION  *pAdapter = NULL;
    DXGKRNL_INTERFACE  *pDxgKrnlCallback = NULL;
    CONST DXGK_VIDPN_INTERFACE*  pVidPnInterface = NULL;
    CONST DXGK_MONITOR_INTERFACE  *pMonitorInterface = NULL;
    HANDLE  hAdapter;
 
    pAdapter  = ((PHW_DEVICE_EXTENSION *)i_InterfaceContext)[0];
    pDxgKrnlCallback = &(pAdapter->ddiCallback);
 
    /* Acquire version 1.0 of the VidPN-object-management interface from the graphics kernel. */
 ntStatus = pDxgKrnlCallback->DxgkCbQueryVidPnInterface(i_hVidPn,
 DXGK_VIDPN_INTERFACE_VERSION_V1,
 &pVidPnInterface);
 if(!NT_SUCCESS(ntStatus) ) {
  return ntStatus;
 }

    hAdapter = (HANDLE)i_InterfaceContext;
 ntStatus = pDxgKrnlCallback->DxgkCbQueryMonitorInterface(pDxgKrnlCallback->DeviceHandle,
 DXGK_MONITOR_INTERFACE_VERSION_V1,
  &pMonitorInterface);
 if(!NT_SUCCESS(ntStatus) ) {
 return ntStatus;
 }

    ntStatus = TestVidPnInterface(pDxgKrnlCallback->DeviceHandle, i_hVidPn, pVidPnInterface, pMonitorInterface);
    if(!NT_SUCCESS(ntStatus) ) {
        return ntStatus;
    }

    return ntStatus;
}

Requirements

Target platform

Desktop

Version

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

Header

D3dkmddi.h (include D3dkmddi.h)

IRQL

<= APC_LEVEL

See also

VidPN Interface
VidPN Topology Interface
VidPN Source Mode Set Interface
VidPN Target Mode Set Interface
Monitor Source Mode Set Interface

 

 

Send comments about this topic to Microsoft

Show: