RetroArch
dxdiag.h
Go to the documentation of this file.
1 /*==========================================================================;
2  *
3  * Copyright (C) Microsoft Corporation. All Rights Reserved.
4  *
5  * File: dxdiag.h
6  * Content: DirectX Diagnostic Tool include file
7  *
8  ****************************************************************************/
9 
10 #ifndef _DXDIAG_H_
11 #define _DXDIAG_H_
12 #include <winapifamily.h>
13 
14 #pragma region Desktop Family
15 #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
16 
17 
18 #include <ole2.h> // for DECLARE_INTERFACE_ and HRESULT
19 
20 // This identifier is passed to IDxDiagProvider::Initialize in order to ensure that an
21 // application was built against the correct header files. This number is
22 // incremented whenever a header (or other) change would require applications
23 // to be rebuilt. If the version doesn't match, IDxDiagProvider::Initialize will fail.
24 // (The number itself has no meaning.)
25 #define DXDIAG_DX9_SDK_VERSION 111
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
31 
32 /****************************************************************************
33  *
34  * DxDiag Errors
35  *
36  ****************************************************************************/
37 #define DXDIAG_E_INSUFFICIENT_BUFFER ((HRESULT)0x8007007AL) // HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)
38 
39 
40 /****************************************************************************
41  *
42  * DxDiag CLSIDs
43  *
44  ****************************************************************************/
45 
46 // {A65B8071-3BFE-4213-9A5B-491DA4461CA7}
47 DEFINE_GUID(CLSID_DxDiagProvider,
48 0xA65B8071, 0x3BFE, 0x4213, 0x9A, 0x5B, 0x49, 0x1D, 0xA4, 0x46, 0x1C, 0xA7);
49 
50 
51 /****************************************************************************
52  *
53  * DxDiag Interface IIDs
54  *
55  ****************************************************************************/
56 
57 // {9C6B4CB0-23F8-49CC-A3ED-45A55000A6D2}
58 DEFINE_GUID(IID_IDxDiagProvider,
59 0x9C6B4CB0, 0x23F8, 0x49CC, 0xA3, 0xED, 0x45, 0xA5, 0x50, 0x00, 0xA6, 0xD2);
60 
61 // {0x7D0F462F-0x4064-0x4862-BC7F-933E5058C10F}
62 DEFINE_GUID(IID_IDxDiagContainer,
63 0x7D0F462F, 0x4064, 0x4862, 0xBC, 0x7F, 0x93, 0x3E, 0x50, 0x58, 0xC1, 0x0F);
64 
65 
66 /****************************************************************************
67  *
68  * DxDiag Interface Pointer definitions
69  *
70  ****************************************************************************/
71 
72 typedef struct IDxDiagProvider *LPDXDIAGPROVIDER, *PDXDIAGPROVIDER;
73 
74 typedef struct IDxDiagContainer *LPDXDIAGCONTAINER, *PDXDIAGCONTAINER;
75 
76 
77 /****************************************************************************
78  *
79  * DxDiag Structures
80  *
81  ****************************************************************************/
82 
83 typedef struct _DXDIAG_INIT_PARAMS
84 {
85  DWORD dwSize; // Size of this structure.
86  DWORD dwDxDiagHeaderVersion; // Pass in DXDIAG_DX9_SDK_VERSION. This verifies
87  // the header and dll are correctly matched.
88  BOOL bAllowWHQLChecks; // If true, allow dxdiag to check if drivers are
89  // digital signed as logo'd by WHQL which may
90  // connect via internet to update WHQL certificates.
91  VOID* pReserved; // Reserved. Must be NULL.
92 } DXDIAG_INIT_PARAMS;
93 
94 
95 /****************************************************************************
96  *
97  * DxDiag Application Interfaces
98  *
99  ****************************************************************************/
100 
101 //
102 // COM definition for IDxDiagProvider
103 //
104 #undef INTERFACE // External COM Implementation
105 #define INTERFACE IDxDiagProvider
106 DECLARE_INTERFACE_(IDxDiagProvider,IUnknown)
107 {
108  /*** IUnknown methods ***/
109  STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID *ppvObj) PURE;
110  STDMETHOD_(ULONG,AddRef) (THIS) PURE;
111  STDMETHOD_(ULONG,Release) (THIS) PURE;
112 
113  /*** IDxDiagProvider methods ***/
114  STDMETHOD(Initialize) (THIS_ DXDIAG_INIT_PARAMS* pParams) PURE;
115  STDMETHOD(GetRootContainer) (THIS_ IDxDiagContainer **ppInstance) PURE;
116 };
117 
118 
119 //
120 // COM definition for IDxDiagContainer
121 //
122 #undef INTERFACE // External COM Implementation
123 #define INTERFACE IDxDiagContainer
124 DECLARE_INTERFACE_(IDxDiagContainer,IUnknown)
125 {
126  /*** IUnknown methods ***/
127  STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID *ppvObj) PURE;
128  STDMETHOD_(ULONG,AddRef) (THIS) PURE;
129  STDMETHOD_(ULONG,Release) (THIS) PURE;
130 
131  /*** IDxDiagContainer methods ***/
132  STDMETHOD(GetNumberOfChildContainers) (THIS_ DWORD *pdwCount) PURE;
133  STDMETHOD(EnumChildContainerNames) (THIS_ DWORD dwIndex, LPWSTR pwszContainer, DWORD cchContainer) PURE;
134  STDMETHOD(GetChildContainer) (THIS_ LPCWSTR pwszContainer, IDxDiagContainer **ppInstance) PURE;
135  STDMETHOD(GetNumberOfProps) (THIS_ DWORD *pdwCount) PURE;
136  STDMETHOD(EnumPropNames) (THIS_ DWORD dwIndex, LPWSTR pwszPropName, DWORD cchPropName) PURE;
137  STDMETHOD(GetProp) (THIS_ LPCWSTR pwszPropName, VARIANT *pvarProp) PURE;
138 };
139 
140 
141 /****************************************************************************
142  *
143  * DxDiag application interface macros
144  *
145  ****************************************************************************/
146 
147 #if !defined(__cplusplus) || defined(CINTERFACE)
148 
149 #define IDxDiagProvider_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
150 #define IDxDiagProvider_AddRef(p) (p)->lpVtbl->AddRef(p)
151 #define IDxDiagProvider_Release(p) (p)->lpVtbl->Release(p)
152 #define IDxDiagProvider_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
153 #define IDxDiagProvider_GetRootContainer(p,a) (p)->lpVtbl->GetRootContainer(p,a)
154 
155 #define IDxDiagContainer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
156 #define IDxDiagContainer_AddRef(p) (p)->lpVtbl->AddRef(p)
157 #define IDxDiagContainer_Release(p) (p)->lpVtbl->Release(p)
158 #define IDxDiagContainer_GetNumberOfChildContainers(p,a) (p)->lpVtbl->GetNumberOfChildContainers(p,a)
159 #define IDxDiagContainer_EnumChildContainerNames(p,a,b,c) (p)->lpVtbl->EnumChildContainerNames(p,a,b,c)
160 #define IDxDiagContainer_GetChildContainer(p,a,b) (p)->lpVtbl->GetChildContainer(p,a,b)
161 #define IDxDiagContainer_GetNumberOfProps(p,a) (p)->lpVtbl->GetNumberOfProps(p,a)
162 #define IDxDiagContainer_EnumProps(p,a,b) (p)->lpVtbl->EnumProps(p,a,b,c)
163 #define IDxDiagContainer_GetProp(p,a,b) (p)->lpVtbl->GetProp(p,a,b)
164 
165 #else /* C++ */
166 
167 #define IDxDiagProvider_QueryInterface(p,a,b) (p)->QueryInterface(p,a,b)
168 #define IDxDiagProvider_AddRef(p) (p)->AddRef(p)
169 #define IDxDiagProvider_Release(p) (p)->Release(p)
170 #define IDxDiagProvider_Initialize(p,a,b) (p)->Initialize(p,a,b)
171 #define IDxDiagProvider_GetRootContainer(p,a) (p)->GetRootContainer(p,a)
172 
173 #define IDxDiagContainer_QueryInterface(p,a,b) (p)->QueryInterface(p,a,b)
174 #define IDxDiagContainer_AddRef(p) (p)->AddRef(p)
175 #define IDxDiagContainer_Release(p) (p)->Release(p)
176 #define IDxDiagContainer_GetNumberOfChildContainers(p,a) (p)->GetNumberOfChildContainers(p,a)
177 #define IDxDiagContainer_EnumChildContainerNames(p,a,b,c) (p)->EnumChildContainerNames(p,a,b,c)
178 #define IDxDiagContainer_GetChildContainer(p,a,b) (p)->GetChildContainer(p,a,b)
179 #define IDxDiagContainer_GetNumberOfProps(p,a) (p)->GetNumberOfProps(p,a)
180 #define IDxDiagContainer_EnumProps(p,a,b) (p)->EnumProps(p,a,b,c)
181 #define IDxDiagContainer_GetProp(p,a,b) (p)->GetProp(p,a,b)
182 
183 #endif
184 
185 
186 #ifdef __cplusplus
187 }
188 #endif
189 
190 
191 #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
192 #pragma endregion
193 
194 #endif /* _DXDIAG_H_ */
195 
196 
DEFINE_GUID(IID_ID3DXBuffer, 0x932e6a7e, 0xc68e, 0x45dd, 0xa7, 0xbf, 0x53, 0xd1, 0x9c, 0x86, 0xdb, 0x1f)
static INLINE ULONG Release(void *object)
Definition: dxgi_common.h:253
unsigned int BOOL
Definition: gctypes.h:51
DECLARE_INTERFACE_(IXAudio2MasteringVoice, IXAudio2Voice)
Definition: xaudio27.h:247
#define VOID(p)
Definition: luac.c:224