Move MS DDK files to DDK
[reactos.git] / reactos / w32api / include / dxdiag.h
1 /*
2 * Copyright (C) 2004 Raphael Junqueira
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18
19 #ifndef __WINE_DXDIAG_H
20 #define __WINE_DXDIAG_H
21
22 #include <ole2.h>
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif /* defined(__cplusplus) */
27
28 /*****************************************************************************
29 * #defines and error codes
30 */
31 #define DXDIAG_DX9_SDK_VERSION 111
32
33 #define _FACDXDIAG 0x007
34 #define MAKE_DXDIAGHRESULT( code ) MAKE_HRESULT( 1, _FACDXDIAG, code )
35
36 /*
37 * DXDiag Errors
38 */
39 #define DXDIAG_E_INSUFFICIENT_BUFFER MAKE_DXDIAGHRESULT(0x007A)
40
41
42 /*****************************************************************************
43 * DXDiag structures Typedefs
44 */
45 typedef struct _DXDIAG_INIT_PARAMS {
46 DWORD dwSize;
47 DWORD dwDxDiagHeaderVersion;
48 BOOL bAllowWHQLChecks;
49 VOID* pReserved;
50 } DXDIAG_INIT_PARAMS;
51
52
53 /*****************************************************************************
54 * Predeclare the interfaces
55 */
56 /* CLSIDs */
57 DEFINE_GUID(CLSID_DxDiagProvider, 0xA65B8071, 0x3BFE, 0x4213, 0x9A, 0x5B, 0x49, 0x1D, 0xA4, 0x46, 0x1C, 0xA7);
58
59 /* IIDs */
60 DEFINE_GUID(IID_IDxDiagProvider, 0x9C6B4CB0, 0x23F8, 0x49CC, 0xA3, 0xED, 0x45, 0xA5, 0x50, 0x00, 0xA6, 0xD2);
61 DEFINE_GUID(IID_IDxDiagContainer, 0x7D0F462F, 0x4064, 0x4862, 0xBC, 0x7F, 0x93, 0x3E, 0x50, 0x58, 0xC1, 0x0F);
62
63 /* typedef definitions */
64 //typedef struct IDxDiagProvider IDxDiagProvider, *LPDXDIAGPROVIDER, *PDXDIAGPROVIDER;
65 //typedef struct IDxDiagContainer IDxDiagContainer, *LPDXDIAGCONTAINER, *PDXDIAGCONTAINER;
66 typedef struct IDxDiagProvider *LPDXDIAGPROVIDER, *PDXDIAGPROVIDER;
67 typedef struct IDxDiagContainer *LPDXDIAGCONTAINER, *PDXDIAGCONTAINER;
68
69 /*****************************************************************************
70 * IDxDiagProvider interface
71 */
72 #define INTERFACE IDxDiagProvider
73 DECLARE_INTERFACE_(IDxDiagProvider,IUnknown)
74 {
75 /*** IUnknown methods ***/
76 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
77 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
78 STDMETHOD_(ULONG,Release)(THIS) PURE;
79 /*** IDxDiagProvider methods ***/
80 STDMETHOD(Initialize)(THIS_ DXDIAG_INIT_PARAMS* pParams) PURE;
81 STDMETHOD(GetRootContainer)(THIS_ LPDXDIAGCONTAINER* ppInstance) PURE;
82 };
83 #undef INTERFACE
84
85 #if !defined(__cplusplus) || defined(CINTERFACE)
86 /*** IUnknown methods ***/
87 #define IDxDiagProvider_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
88 #define IDxDiagProvider_AddRef(p) (p)->lpVtbl->AddRef(p)
89 #define IDxDiagProvider_Release(p) (p)->lpVtbl->Release(p)
90 /*** IDxDiagProvider methods ***/
91 #define IDxDiagProvider_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
92 #define IDxDiagProvider_GetRootContainer(p,a) (p)->lpVtbl->GetRootContainer(p,a)
93 #else
94 /*** IUnknown methods ***/
95 #define IDxDiagProvider_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
96 #define IDxDiagProvider_AddRef(p) (p)->AddRef()
97 #define IDxDiagProvider_Release(p) (p)->Release()
98 /*** IDxDiagProvider methods ***/
99 #define IDxDiagProvider_Initialize(p,a,b) (p)->Initialize(a,b)
100 #define IDxDiagProvider_GetRootContainer(p,a) (p)->GetRootContainer(a)
101 #endif
102
103 /*****************************************************************************
104 * IDxDiagContainer interface
105 */
106 #ifdef __WINESRC__
107 #undef GetProp
108 #endif
109
110 #define INTERFACE IDxDiagContainer
111 DECLARE_INTERFACE_(IDxDiagContainer,IUnknown)
112 {
113 /*** IUnknown methods ***/
114 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
115 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
116 STDMETHOD_(ULONG,Release)(THIS) PURE;
117 /*** IDxDiagContainer methods ***/
118 STDMETHOD(GetNumberOfChildContainers)(THIS_ DWORD* pdwCount) PURE;
119 STDMETHOD(EnumChildContainerNames)(THIS_ DWORD dwIndex, LPWSTR pwszContainer, DWORD cchContainer) PURE;
120 STDMETHOD(GetChildContainer)(THIS_ LPCWSTR pwszContainer, IDxDiagContainer** ppInstance) PURE;
121 STDMETHOD(GetNumberOfProps)(THIS_ DWORD* pdwCount) PURE;
122 STDMETHOD(EnumPropNames)(THIS_ DWORD dwIndex, LPWSTR pwszPropName, DWORD cchPropName) PURE;
123 STDMETHOD(GetProp)(THIS_ LPCWSTR pwszPropName, VARIANT* pvarProp) PURE;
124 };
125 #undef INTERFACE
126
127 #if !defined(__cplusplus) || defined(CINTERFACE)
128 /*** IUnknown methods ***/
129 #define IDxDiagContainer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
130 #define IDxDiagContainer_AddRef(p) (p)->lpVtbl->AddRef(p)
131 #define IDxDiagContainer_Release(p) (p)->lpVtbl->Release(p)
132 /*** IDxDiagContainer methods ***/
133 #define IDxDiagContainer_GetNumberOfChildContainers(p,a) (p)->lpVtbl->GetNumberOfChildContainers(p,a)
134 #define IDxDiagContainer_EnumChildContainerNames(p,a,b,c) (p)->lpVtbl->EnumChildContainerNames(p,a,b,c)
135 #define IDxDiagContainer_GetChildContainer(p,a,b) (p)->lpVtbl->GetChildContainer(p,a,b)
136 #define IDxDiagContainer_GetNumberOfProps(p,a) (p)->lpVtbl->GetNumberOfProps(p,a)
137 #define IDxDiagContainer_EnumProps(p,a,b) (p)->lpVtbl->EnumProps(p,a,b,c)
138 #define IDxDiagContainer_GetProp(p,a,b) (p)->lpVtbl->GetProp(p,a,b)
139 #else
140 /*** IUnknown methods ***/
141 #define IDxDiagContainer_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
142 #define IDxDiagContainer_AddRef(p) (p)->AddRef()
143 #define IDxDiagContainer_Release(p) (p)->Release()
144 /*** IDxDiagContainer methods ***/
145 #define IDxDiagContainer_GetNumberOfChildContainers(p,a) (p)->GetNumberOfChildContainers(a)
146 #define IDxDiagContainer_EnumChildContainerNames(p,a,b,c) (p)->EnumChildContainerNames(a,b,c)
147 #define IDxDiagContainer_GetChildContainer(p,a,b) (p)->GetChildContainer(a,b)
148 #define IDxDiagContainer_GetNumberOfProps(p,a) (p)->GetNumberOfProps(a)
149 #define IDxDiagContainer_EnumProps(p,a,b) (p)->EnumProps(a,b,c)
150 #define IDxDiagContainer_GetProp(p,a,b) (p)->GetProp(a,b)
151 #endif
152
153 #ifdef __cplusplus
154 }
155 #endif
156
157 #endif