D3DDDI_QUERYREGISTRY_INFO structure

This structure indicates how D3DKMT_QUERYADAPTERINFO::pDriverPrivateData should be reinterpreted when D3DKMT_QUERYADAPTERINFO::Type is KMTQAITYPE_QUERYREGISTRY. It 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.

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;
    UINT64 OutputQword;
    WCHAR  OutputString[1];
    BYTE   OutputBinary[1];
  };
} D3DDDI_QUERYREGISTRY_INFO;

Members

QueryType

[In] D3DDDI_QUERYREGISTRY_TYPE QueryType

QueryType is the most-significant field. 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] D3DDDI_QUERYREGISTRY_FLAGS QueryFlags

QueryFlags can do additional operations, like translate retrieved strings containing file paths to the guest environment.

ValueName

[In] WCHAR ValueName[ MAX_PATH ]

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

ValueType

[In] ULONG ValueType

When retrieving registry information, ValueType must specify the expected registry value type that corresponds to the registry value name. When retrieving file path information, ValueType must be 0 to succeed. See Registry Value Types for more detail.

PhysicalAdapterIndex

[In] ULONG PhysicalAdapterIndex

The physical adapter index in a LDA chain.

OutputValueSize

[Out] ULONG OutputValueSize

The size of the output data is retrieved to this field, even when there's wasn't enough room to retrieve that data. This field is most useful when variable-sized data is being retrieved.

Status

[Out] D3DDDI_QUERYREGISTRY_STATUS Status

The status of the query is returned seperately, to indicate varying amounts of data has been retrieved. The following three return states are most important to understand:

  • When QueryAdapterInfo returns STATUS_SUCCESS and Status is D3DDDI_QUERYREGISTRY_STATUS_SUCCESS, all fields starting with Output are valid.
  • When QueryAdapterInfo returns STATUS_SUCCESS and Status is D3DDDI_QUERYREGISTRY_STATUS_BUFFER_OVERFLOW, only OutputValueSize is valid.
  • When QueryAdapterInfo doesn't return STATUS_SUCCESS, all fields are left unmodified, except Status may be changed to D3DDDI_QUERYREGISTRY_STATUS_FAIL.

OutputDword

[Out] DWORD OutputDword

OutputDword is a convenience field for reinterpreting the successfully retrieved data. It is most useful when a registry dword is being read.

OutputQword

[Out] UINT64 OutputQword

OutputQword is a convenience field for reinterpreting the successfully retrieved data. It is most useful when a registry qword is being read.

OutputString

[Out] WCHAR OutputString[ ANYSIZE_ARRAY ]

OutputString is a convenience field for reinterpreting the successfully retrieved data. It is most useful for retreiving a registry string or a file path.

OutputBinary

[Out] BYTE OutputBinary[ ANYSIZE_ARRAY ]

OutputBinary is a convenience field for reinterpreting the successfully retrieved data. It is most useful when a registry binary blob is being read.

OutputDword

OutputQword

OutputString

OutputBinary

Requirements

   
Header d3dukmdt.h

See Also