Blt
Espandi Riduci a icona

QueryAuthenticatedChannel routine

The QueryAuthenticatedChannel function queries an authenticated channel for capability and state information.

Syntax


PFND3DDDI_QUERYAUTHENTICATEDCHANNEL QueryAuthenticatedChannel;

__checkReturn HRESULT APIENTRY QueryAuthenticatedChannel(
  _In_     HANDLE hDevice,
  _Inout_  const D3DDDIARG_QUERYAUTHENTICATEDCHANNEL *pData
)
{ ... }

Parameters

hDevice [in]

A handle to the display device (graphics context).

pData [in, out]

A pointer to a D3DDDIARG_QUERYAUTHENTICATEDCHANNEL structure that describes authenticated-channel information to query. This structure contains an input buffer that describes the query and an output buffer to return the queried information.

Return value

QueryAuthenticatedChannel returns one of the following values:

Return codeDescription
S_OK

The authenticated channel is successfully queried.

E_OUTOFMEMORY

QueryAuthenticatedChannel could not allocate the required memory for it to complete.

 

Remarks

The input buffer contains the driver's handle to the authenticated channel, a sequence number, and a GUID that indicates the type of query. The driver should fail all queries if the driver did not previously initialize the sequence number through a call to its ConfigureAuthenticatedChannel function. The driver should also fail the query if the sequence number is not greater than the sequence number of the previous query call.

The driver should duplicate the input data in the structure of the output buffer and should sign the output structure identically to how it currently handles Output Protection Manager (OPM) queries.

Except for those situations in which the application incorrectly specifies an output buffer that is too small, the driver should always place the return code in the output structure. Therefore, the application has a secure mechanism to determine the return code.

QueryAuthenticatedChannel performs different operations depending on each of following GUIDs that is specified in the input structure. The driver should fail if the input and output buffer sizes do not match the sizes that are defined for the specified GUID.

D3DAUTHENTICATEDQUERY_PROTECTION

The driver returns the current protection level for the device. This query can be used for both software and hardware channels, However, frequently polling the protection level is not required for a DDIAUTHENTICATEDCHANNEL_DRIVER_HARDWARE channel.

The input buffer points to a D3DAUTHENTICATEDCHANNEL_QUERY_INPUT structure.

The output buffer points to a D3DAUTHENTICATEDCHANNEL_QUERYPROTECTION_OUTPUT structure.

D3DAUTHENTICATEDQUERY_CHANNELTYPE

The driver returns the channel type. This query can be made for all channel types.

The input buffer points to a D3DAUTHENTICATEDCHANNEL_QUERY_INPUT structure.

The output buffer points to a D3DAUTHENTICATEDCHANNEL_QUERYCHANNELTYPE_OUTPUT structure.

D3DAUTHENTICATEDQUERY_DEVICEHANDLE

The driver returns a device identifier that the calling application can use to verify that multiple authenticated channels are indeed communicating with the same device. This query can be made for all channel types.

The input buffer points to a D3DAUTHENTICATEDCHANNEL_QUERY_INPUT structure.

The output buffer points to a D3DAUTHENTICATEDCHANNEL_QUERYDEVICEHANDLE_OUTPUT structure.

D3DAUTHENTICATEDQUERY_CRYPTOSESSION

The driver returns the crypto session handle (the same handle that the driver's CreateCryptoSession function returned in the hCryptoSession member of the D3DDDIARG_CREATECRYPTOSESSION structure) and the display device handle (the same handle that the driver's QueryAuthenticatedChannel function returned with the D3DAUTHENTICATEDQUERY_DEVICEHANDLE query) that are currently associated with the DirectX Video Acceleration (DirectX VA) decode device. The handle to the DirectX VA decode device is the same handle that the driver returned in response to the new DXVA2_DECODE_GET_DRIVER_HANDLE decode extension. For more information about DXVA2_DECODE_GET_DRIVER_HANDLE, see Using Crypto Session with DirectX Video Accelerator 2.0 Decoder.

This query can be made for all channel types.

The input buffer points to a D3DAUTHENTICATEDCHANNEL_QUERYCRYPTOSESSION_INPUT structure.

The output buffer points to a D3DAUTHENTICATEDCHANNEL_ QUERYCRYPTOSESSION_OUTPUT structure.

D3DAUTHENTICATEDQUERY_RESTRICTEDSHAREDRESOURCEPROCESSCOUNT

While the operating system has a mechanism to restrict access to shared resources, the operating system protections are not robust against harmful code within the process or within the kernel. Therefore, this query exists to allow drivers to provide protections for extra level of robustness. Note that the driver cannot determine for sure which process is the Desktop Windows Manager (DWM) process; therefore, the driver must pick the most appropriate process.

These driver protections are only required for channel type DDIAUTHENTICATEDCHANNEL_DRIVER_SOFTWARE because hardware protection can prevent resource data from being stolen more securely than these driver protections.

The driver returns the number of processes that are allowed to open the shared resources that were created with restricted access.

The input buffer points to a D3DAUTHENTICATEDCHANNEL_QUERY_INPUT structure.

The output buffer points to a D3DAUTHENTICATEDCHANNEL_ QUERY RESTRICTEDSHAREDRESOURCEPROCESSCOUNT_OUTPUT structure.

D3DAUTHENTICATEDQUERY_RESTRICTEDSHAREDRESOURCEPROCESS

The driver returns one of the processes that are allowed to open shared resources that were created with restricted access. The total number of these processes is returned with the D3DAUTHENTICATEDQUERY_RESTRICTEDSHAREDRESOURCEPROCESSCOUNT query. The DWM process is referenced by type rather than by process handle because applications cannot obtain a process handle for the DWM.

The input buffer points to a D3DAUTHENTICATEDCHANNEL_ QUERYRESTRICTEDSHAREDRESOURCEPROCESS_INPUT structure.

The output buffer points to a D3DAUTHENTICATEDCHANNEL_ QUERYRESTRICTEDSHAREDRESOURCEPROCESS_OUTPUT structure.

D3DAUTHENTICATEDQUERY_UNRESRICTTEDPROTECTEDSHAREDRESOURCECOUNT

The driver returns the number of shared resources that were created as protected but are allowed to be opened by any process without restrictions.

This query can only be made for channel type D3DAUTHENTICATEDCHANNEL_DRIVER_SOFTWARE.

The input buffer points to a D3DAUTHENTICATEDCHANNEL_QUERY_INPUT structure.

The output buffer points to a D3DAUTHENTICATEDCHANNEL_ QUERYUNRESRICTTEDPROTECTEDSHAREDRESOURCECOUNT_OUTPUT structure.

D3DAUTHENTICATEDQUERY_OUTPUTIDCOUNT

The driver uses the OPM interface to enable protections on an individual output. However, OPM gives no assurance that the output that is controlled is the output that contains the protected content.

This query requests that the driver indicate the number of outputs on which the device presents its content.

The driver should fail if the crypto session handle that is specified (the same handle that the driver's CreateCryptoSession function returned in the hCryptoSession member of the D3DDDIARG_CREATECRYPTOSESSION structure) is associated with a different display device than the one that is specified.

The driver returns the number of output identifiers that is associated with the device and the crypto session.

This query can be made for all channel types.

The input buffer points to a D3DAUTHENTICATEDCHANNEL_QUERYOUTPUTIDCOUNT_INPUT structure.

The output buffer points to a D3DAUTHENTICATEDCHANNEL_QUERYOUTPUTIDCOUNT_OUTPUT structure.

D3DAUTHENTICATEDQUERY_OUTPUTID

This query requests the driver to return an identifier for each output on which the device presents its content. The number of these outputs is returned with the D3DAUTHENTICATEDQUERY_OUTPUTIDCOUNT query.

A new OPM query (DXGKMDT_OPM_GET_OUTPUT_ID) requests the driver to return the identifier for the output that the driver controls. The application can then ensure that the correct outputs are being managed.

The driver should fail if the crypto session handle that is specified (the same handle that the driver's CreateCryptoSession function returned in the hCryptoSession member of the D3DDDIARG_CREATECRYPTOSESSION structure) is associated with a different display device than the one that is specified.

This query can be made for all channel types.

The input buffer points to a D3DAUTHENTICATEDCHANNEL_QUERYOUTPUTID_INPUT structure.

The output buffer points to a D3DAUTHENTICATEDCHANNEL_QUERYROUTPUTID_OUTPUT structure.

D3DAUTHENTICATEDQUERY_ACCESSIBILITYATTRIBUTES
D3DAUTHENTICATEDQUERY_ENCRYPTIONWHENACCESSIBLEGUIDCOUNT
D3DAUTHENTICATEDQUERY_ENCRYPTIONWHENACCESSIBLEGUID
D3DAUTHENTICATEDQUERY_CURRENTENCRYPTIONWHENACCESIBLE

Requirements

Version

QueryAuthenticatedChannel is supported beginning with the Windows 7 operating system.

Header

D3dumddi.h (include D3dumddi.h)

See also

ConfigureAuthenticatedChannel
D3DDDIARG_QUERYAUTHENTICATEDCHANNEL

 

 

Send comments about this topic to Microsoft

Mostra:
© 2015 Microsoft