Rediger

Del via


D3DDDI_QUERYREGISTRY_INFO structure (d3dukmdt.h)

The D3DDDI_QUERYREGISTRY_INFO structure indicates how D3DDDICB_QUERYADAPTERINFO2::pDriverPrivateData should be reinterpreted when D3DDDICB_QUERYADAPTERINFO2::QueryType is D3DDDI_QUERYADAPTERTYPE_QUERYREGISTRY.

Syntax

typedef struct _D3DDDI_QUERYREGISTRY_INFO {
  D3DDDI_QUERYREGISTRY_TYPE   QueryType;
  D3DDDI_QUERYREGISTRY_FLAGS  QueryFlags;
  WCHAR                       ValueName[MAX_PATH];
  ULONG                       ValueType;
  ULONG                       PhysicalAdapterIndex;
  ULONG                       OutputValueSize;
  D3DDDI_QUERYREGISTRY_STATUS Status;
  union {
    DWORD                 OutputDword;
    D3DKMT_ALIGN64 UINT64 OutputQword;
    WCHAR                 OutputString[1];
    BYTE                  OutputBinary[1];
  };
} D3DDDI_QUERYREGISTRY_INFO;

Members

QueryType

[in] A D3DDDI_QUERYREGISTRY_TYPE value that indicates which data to retrieve.

D3DDDI_QUERYREGISTRY_INFO::QueryType is the most significant field of this structure. It indicates whether the registry or file paths are being retrieved, as well as which specific registry hive and file path.

Registry Key Enums:

  • D3DDDI_QUERYREGISTRY_SERVICEKEY
  • D3DDDI_QUERYREGISTRY_ADAPTERKEY

File Path Enums:

  • D3DDDI_QUERYREGISTRY_DRIVERSTOREPATH
  • D3DDDI_QUERYREGISTRY_DRIVERIMAGEPATH

QueryFlags

[in] A D3DDDI_QUERYREGISTRY_FLAGS structure with flags that control how strings are retrieved. QueryFlags can do additional operations, like translate retrieved strings containing file paths to the guest environment.

ValueName[MAX_PATH]

[in] Zero-terminated UNICODE string that can contain a sub-key name, which is separated from the actual value name by backslash. For example, ValueName could be SubKey1\ SubKey2\NameOfTheValue. In this case, SubKey1\ SubKey2 are the subkeys of the service or software keys.

When retrieving registry information, ValueName must specify the registry value name to retrieve. When retrieving file path information, ValueName is ignored.

ValueType

[in] When retrieving registry information, ValueType must specify the expected registry value type that corresponds to the registry value name. It must be REG_SZ, REG_MULTI_SZ, REG_EXPAND_SZ, REG_BINARY, REG_QWORD, or REG_DWORD.

When retrieving file path information, ValueType must be 0 to succeed.

See Registry Value Types for more detail.

PhysicalAdapterIndex

[in] The physical adapter index in a LDA chain.

OutputValueSize

[out] Size in bytes of the written output if pfnQueryAdapterInfoCb2 succeeds (Status is D3DDDI_QUERYREGISTRY_STATUS_SUCCESS). When Status is D3DDDI_QUERYREGISTRY_STATUS_BUFFER_OVERFLOW, OutputValueSize is the number of bytes required to hold the output value.

Status

[out] A D3DDDI_QUERYREGISTRY_STATUS value that indicates the status of the query.

When a user-mode display driver calls the runtime's pfnQueryAdapterInfoCb2 function, a call to the DxgkDdiQueryAdapterInfo function is initiated.

The status of the query is returned separately from the return value in order to indicate that varying amounts of data have been retrieved. The following three return states are the most important to understand:

  • When pfnQueryAdapterInfoCb2 returns STATUS_SUCCESS:
    • If Status is D3DDDI_QUERYREGISTRY_STATUS_SUCCESS, all fields starting with OutputXxx are valid.
    • If Status is D3DDDI_QUERYREGISTRY_STATUS_BUFFER_OVERFLOW, there isn't enough space in the private data to hold the registry value. Only OutputValueSize is valid.
  • When pfnQueryAdapterInfoCb2 doesn't return STATUS_SUCCESS, all fields are left unmodified, except Status might be changed to D3DDDI_QUERYREGISTRY_STATUS_FAIL.

OutputDword

[out] A part of the union that holds the output value. OutputDword is a convenience field for reinterpreting the successfully retrieved data when a registry DWORD is being read.

OutputQword

[out] A part of the union that holds the output value. OutputQword is a convenience field for reinterpreting the successfully retrieved data when a registry QWORD is being read.

OutputString[1]

OutputBinary[1]

Remarks

D3DDDI_QUERYREGISTRY_INFO is used to read the registry for information that is commonly cached during driver installation.

Instead of using raw OS methods, user-mode drivers and other components must ubiquitously use this technique on the OS versions where it is supported. This enables the OS to maximize user-mode compatibility with dependency changes and scenarios like virtualized environments. For more information, see GPU paravirtualization.

Requirements

Requirement Value
Minimum supported client Windows 10, version 1803 (WDDM 2.4)
Header d3dukmdt.h

See also

D3DDDI_QUERYREGISTRY_TYPE

D3DDDI_QUERYREGISTRY_FLAGS

D3DDDI_QUERYREGISTRY_STATUS

KMTQUERYADAPTERINFOTYPE

D3DKMT_QUERYADAPTERINFO

pfnQueryAdapterInfoCb2