Bewerken

Delen via


Retrieving the OPM DDI

The following sequence shows how the Microsoft DirectX graphics kernel subsystem (Dxgkrnl.sys) retrieves the display miniport driver's OPM DDI:

  1. The DirectX graphics kernel subsystem calls the display miniport driver's DxgkDdiAddDevice function to create a context block for a graphics adapter and to return a handle to that graphics adapter.

  2. The DirectX graphics kernel subsystem initializes a QUERY_INTERFACE structure with the values in the following table.

    Member name Member type Value

    InterfaceType

    CONST PGUID

    A pointer to GUID_DEVINTERFACE_OPM

    (BF4672DE-6B4E-4BE4-A325-68A91EA49C09)

    Size

    USHORT

    sizeof(DXGK_OPM_INTERFACE)

    Version

    USHORT

    DXGK_OPM_INTERFACE_VERSION_1

    Interface

    PINTERFACE

    A pointer to a DXGK_OPM_INTERFACE structure

    InterfaceSpecificData

    PVOID

    NULL

  3. The DirectX graphics kernel subsystem passes the initialized QUERY_INTERFACE in a call to the display miniport driver's DxgkDdiQueryInterface function.

  4. If the display miniport driver does not support the OPM interface, DxgkDdiQueryInterface must return STATUS_NOT_SUPPORTED.

    If the display miniport driver supports OPM, DxgkDdiQueryInterface initializes the DXGK_OPM_INTERFACE structure that was received in the Interface member of QUERY_INTERFACE with the values in the following table.

    Member name, type, and value:

    Size
    Type USHORT

    sizeof(DXGK_OPM_INTERFACE)

    Version
    Type USHORT

    DXGK_OPM_INTERFACE_VERSION_1

    InterfaceReference
    Type PINTERFACE_REFERENCE

    A pointer to the display miniport driver's InterfaceReference routine (For information about InterfaceReference, see the Remarks section of the INTERFACE structure.)

    InterfaceDereference
    Type PINTERFACE_DEREFERENCE

    A pointer to the display miniport driver's InterfaceDereference routine (For information about InterfaceDereference, see the Remarks section of the INTERFACE structure.)

    DxgkDdiOPMGetCertificateSize
    Type DXGKDDI_OPM_GET_CERTIFICATE_SIZE

    A pointer to the display miniport driver's DxgkDdiOPMGetCertificateSize function

    DxgkDdiOPMGetCertificate
    Type DXGKDDI_OPM_GET_CERTIFICATE

    A pointer to the display miniport driver's DxgkDdiOPMGetCertificate function

    DxgkDdiOPMCreateProtectedOutput
    Type DXGKDDI_OPM_CREATE_PROTECTED_OUTPUT

    A pointer to the display miniport driver's DxgkDdiOPMCreateProtectedOutput function

    DxgkDdiOPMGetRandomNumber
    Type DXGKDDI_OPM_GET_RANDOM_NUMBER

    A pointer to the display miniport driver's DxgkDdiOPMGetRandomNumber function

    DxgkDdiOPMSetSigningKeyAndSequenceNumbers
    DXGKDDI_OPM_SET_SIGNING_KEY_AND_SEQUENCE_NUMBERS

    A pointer to the display miniport driver's DxgkDdiOPMSetSigningKeyAndSequenceNumbers function

    DxgkDdiOPMGetInformation
    DXGKDDI_OPM_GET_INFORMATION

    A pointer to the display miniport driver's DxgkDdiOPMGetInformation function

    DxgkDdiOPMGetCOPPCompatibleInformation
    DXGKDDI_OPM_GET_COPP_COMPATIBLE_INFORMATION

    A pointer to the display miniport driver's DxgkDdiOPMGetCOPPCompatibleInformation function

    DxgkDdiOPMConfigureProtectedOutput
    DXGKDDI_OPM_CONFIGURE_PROTECTED_OUTPUT

    A pointer to the display miniport driver's DxgkDdiOPMConfigureProtectedOutput function

    DxgkDdiOPMDestroyProtectedOutput
    DXGKDDI_OPM_DESTROY_PROTECTED_OUTPUT

    A pointer to the display miniport driver's DxgkDdiOPMDestroyProtectedOutput function

  5. When the display miniport driver is finished using the OPM interface, the driver calls its InterfaceDereference routine. The driver should call InterfaceDereference before its DxgkDdiRemoveDevice function is called.