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