OSDN Git Service

Insert removed author attribution.
[mingw/mingw-org-wsl.git] / include / directx / d3d9.h
1 /**
2  * @file d3d9.h
3  * @copy 2012 MinGW.org project
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a
6  * copy of this software and associated documentation files (the "Software"),
7  * to deal in the Software without restriction, including without limitation
8  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9  * and/or sell copies of the Software, and to permit persons to whom the
10  * Software is furnished to do so, subject to the following conditions:
11  * 
12  * The above copyright notice and this permission notice (including the next
13  * paragraph) shall be included in all copies or substantial portions of the
14  * Software.
15  * 
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  * DEALINGS IN THE SOFTWARE.
23  */
24 /* Written by Filip Navara <xnavara@volny.cz> */
25 #ifndef _D3D9_H
26 #define _D3D9_H
27 #pragma GCC system_header
28 #include <_mingw.h>
29
30 #ifndef DIRECT3D_VERSION
31 #define DIRECT3D_VERSION  0x0900
32 #endif
33
34 #if (DIRECT3D_VERSION >= 0x0900)
35
36 #include <objbase.h>
37 #include "d3d9types.h"
38 #include "d3d9caps.h"
39
40 #define D3D_SDK_VERSION 31
41 #define D3DCREATE_FPU_PRESERVE  0x02
42 #define D3DCREATE_MULTITHREADED 0x04
43 #define D3DCREATE_PUREDEVICE    0x10
44 #define D3DCREATE_SOFTWARE_VERTEXPROCESSING     0x20
45 #define D3DCREATE_HARDWARE_VERTEXPROCESSING     0x40
46 #define D3DCREATE_MIXED_VERTEXPROCESSING        0x80
47 #define D3DSPD_IUNKNOWN 1
48 #define D3DSGR_NO_CALIBRATION   0
49 #define D3DSGR_CALIBRATE        1
50 #define MAKE_D3DHRESULT(code)   MAKE_HRESULT(1,0x876,code)
51 #define MAKE_D3DSTATUS(code)    MAKE_HRESULT(0,0x876,code)
52 #define D3D_OK  0
53 #define D3DOK_NOAUTOGEN MAKE_D3DSTATUS(2159)
54 #define D3DERR_WRONGTEXTUREFORMAT       MAKE_D3DHRESULT(2072)
55 #define D3DERR_UNSUPPORTEDCOLOROPERATION        MAKE_D3DHRESULT(2073)
56 #define D3DERR_UNSUPPORTEDCOLORARG      MAKE_D3DHRESULT(2074)
57 #define D3DERR_UNSUPPORTEDALPHAOPERATION        MAKE_D3DHRESULT(2075)
58 #define D3DERR_UNSUPPORTEDALPHAARG      MAKE_D3DHRESULT(2076)
59 #define D3DERR_TOOMANYOPERATIONS        MAKE_D3DHRESULT(2077)
60 #define D3DERR_CONFLICTINGTEXTUREFILTER MAKE_D3DHRESULT(2078)
61 #define D3DERR_UNSUPPORTEDFACTORVALUE   MAKE_D3DHRESULT(2079)
62 #define D3DERR_CONFLICTINGRENDERSTATE   MAKE_D3DHRESULT(2081)
63 #define D3DERR_UNSUPPORTEDTEXTUREFILTER MAKE_D3DHRESULT(2082)
64 #define D3DERR_CONFLICTINGTEXTUREPALETTE        MAKE_D3DHRESULT(2086)
65 #define D3DERR_DRIVERINTERNALERROR      MAKE_D3DHRESULT(2087)
66 #define D3DERR_NOTFOUND MAKE_D3DHRESULT(2150)
67 #define D3DERR_MOREDATA MAKE_D3DHRESULT(2151)
68 #define D3DERR_DEVICELOST       MAKE_D3DHRESULT(2152)
69 #define D3DERR_DEVICENOTRESET   MAKE_D3DHRESULT(2153)
70 #define D3DERR_NOTAVAILABLE     MAKE_D3DHRESULT(2154)
71 #define D3DERR_OUTOFVIDEOMEMORY MAKE_D3DHRESULT(380)
72 #define D3DERR_INVALIDDEVICE    MAKE_D3DHRESULT(2155)
73 #define D3DERR_INVALIDCALL      MAKE_D3DHRESULT(2156)
74 #define D3DERR_DRIVERINVALIDCALL        MAKE_D3DHRESULT(2157)
75 #define D3DERR_WASSTILLDRAWING  MAKE_D3DHRESULT(540)
76 #define D3DADAPTER_DEFAULT      0
77 #define D3DCURSOR_IMMEDIATE_UPDATE      1
78 #define D3DENUM_HOST_ADAPTER    1
79 #define D3DPRESENTFLAG_LOCKABLE_BACKBUFFER      1
80 #define D3DPV_DONOTCOPYDATA     1
81 #define D3DENUM_NO_WHQL_LEVEL   2
82 #define D3DPRESENT_BACK_BUFFERS_MAX     3
83 #define VALID_D3DENUM_FLAGS     3
84 #define D3DMAXNUMPRIMITIVES     0xFFFF
85 #define D3DMAXNUMVERTICES       0xFFFF
86 #define D3DCURRENT_DISPLAY_MODE 0xEFFFFF
87
88 #ifdef __cplusplus
89 extern "C" {
90 #endif
91
92 extern const GUID IID_IDirect3D9;
93 extern const GUID IID_IDirect3DDevice9;
94 extern const GUID IID_IDirect3DVolume9;
95 extern const GUID IID_IDirect3DSwapChain9;
96 extern const GUID IID_IDirect3DResource9;
97 extern const GUID IID_IDirect3DSurface9;
98 extern const GUID IID_IDirect3DVertexBuffer9;
99 extern const GUID IID_IDirect3DIndexBuffer9;
100 extern const GUID IID_IDirect3DBaseTexture9;
101 extern const GUID IID_IDirect3DCubeTexture9;
102 extern const GUID IID_IDirect3DTexture9;
103 extern const GUID IID_IDirect3DVolumeTexture9;
104 extern const GUID IID_IDirect3DVertexDeclaration9;
105 extern const GUID IID_IDirect3DVertexShader9;
106 extern const GUID IID_IDirect3DPixelShader9;
107 extern const GUID IID_IDirect3DStateBlock9;
108 extern const GUID IID_IDirect3DQuery9;
109
110 #ifdef __cplusplus
111 };
112 #endif
113
114 typedef _COM_interface IDirect3D9 IDirect3D9;
115 typedef _COM_interface IDirect3DDevice9 IDirect3DDevice9;
116 typedef _COM_interface IDirect3DVolume9 IDirect3DVolume9;
117 typedef _COM_interface IDirect3DSwapChain9 IDirect3DSwapChain9;
118 typedef _COM_interface IDirect3DResource9 IDirect3DResource9;
119 typedef _COM_interface IDirect3DSurface9 IDirect3DSurface9;
120 typedef _COM_interface IDirect3DVertexBuffer9 IDirect3DVertexBuffer9;
121 typedef _COM_interface IDirect3DIndexBuffer9 IDirect3DIndexBuffer9;
122 typedef _COM_interface IDirect3DBaseTexture9 IDirect3DBaseTexture9;
123 typedef _COM_interface IDirect3DCubeTexture9 IDirect3DCubeTexture9;
124 typedef _COM_interface IDirect3DTexture9 IDirect3DTexture9;
125 typedef _COM_interface IDirect3DVolumeTexture9 IDirect3DVolumeTexture9;
126 typedef _COM_interface IDirect3DVertexDeclaration9 IDirect3DVertexDeclaration9;
127 typedef _COM_interface IDirect3DVertexShader9 IDirect3DVertexShader9;
128 typedef _COM_interface IDirect3DPixelShader9 IDirect3DPixelShader9;
129 typedef _COM_interface IDirect3DStateBlock9 IDirect3DStateBlock9;
130 typedef _COM_interface IDirect3DQuery9 IDirect3DQuery9;
131
132 #undef INTERFACE
133 #define INTERFACE IDirect3D9
134 DECLARE_INTERFACE_(IDirect3D9,IUnknown)
135 {
136         STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
137         STDMETHOD_(ULONG,AddRef)(THIS) PURE;
138         STDMETHOD_(ULONG,Release)(THIS) PURE;
139         STDMETHOD(RegisterSoftwareDevice)(THIS_ void* pInitializeFunction) PURE;
140         STDMETHOD_(UINT,GetAdapterCount)(THIS) PURE;
141         STDMETHOD(GetAdapterIdentifier)(THIS_ UINT,DWORD,D3DADAPTER_IDENTIFIER9*) PURE;
142         STDMETHOD_(UINT,GetAdapterModeCount)(THIS_ UINT,D3DFORMAT) PURE;
143         STDMETHOD(EnumAdapterModes)(THIS_ UINT,D3DFORMAT,UINT,D3DDISPLAYMODE*) PURE;
144         STDMETHOD(GetAdapterDisplayMode)(THIS_ UINT,D3DDISPLAYMODE*) PURE;
145         STDMETHOD(CheckDeviceType)(THIS_ UINT,D3DDEVTYPE,D3DFORMAT,D3DFORMAT,BOOL) PURE;
146         STDMETHOD(CheckDeviceFormat)(THIS_ UINT,D3DDEVTYPE,D3DFORMAT,DWORD,D3DRESOURCETYPE,D3DFORMAT) PURE;
147         STDMETHOD(CheckDeviceMultiSampleType)(THIS_ UINT,D3DDEVTYPE,D3DFORMAT,BOOL,D3DMULTISAMPLE_TYPE,DWORD*) PURE;
148         STDMETHOD(CheckDepthStencilMatch)(THIS_ UINT,D3DDEVTYPE,D3DFORMAT,D3DFORMAT,D3DFORMAT) PURE;
149         STDMETHOD(CheckDeviceFormatConversion)(THIS_ UINT,D3DDEVTYPE,D3DFORMAT,D3DFORMAT) PURE;
150         STDMETHOD(GetDeviceCaps)(THIS_ UINT,D3DDEVTYPE,D3DCAPS9*) PURE;
151         STDMETHOD_(HMONITOR,GetAdapterMonitor)(THIS_ UINT) PURE;
152         STDMETHOD(CreateDevice)(THIS_ UINT,D3DDEVTYPE,HWND,DWORD,D3DPRESENT_PARAMETERS*,IDirect3DDevice9**) PURE;
153 };
154 typedef struct IDirect3D9 *LPDIRECT3D9, *PDIRECT3D9;
155
156 #if !defined(__cplusplus) || defined(CINTERFACE)
157 #define IDirect3D9_QueryInterface(p,a,b)        (p)->lpVtbl->QueryInterface(p,a,b)
158 #define IDirect3D9_AddRef(p)    (p)->lpVtbl->AddRef(p)
159 #define IDirect3D9_Release(p)   (p)->lpVtbl->Release(p)
160 #define IDirect3D9_RegisterSoftwareDevice(p,a)  (p)->lpVtbl->RegisterSoftwareDevice(p,a)
161 #define IDirect3D9_GetAdapterCount(p)   (p)->lpVtbl->GetAdapterCount(p)
162 #define IDirect3D9_GetAdapterIdentifier(p,a,b,c)        (p)->lpVtbl->GetAdapterIdentifier(p,a,b,c)
163 #define IDirect3D9_GetAdapterModeCount(p,a,b)   (p)->lpVtbl->GetAdapterModeCount(p,a,b)
164 #define IDirect3D9_EnumAdapterModes(p,a,b,c,d)  (p)->lpVtbl->EnumAdapterModes(p,a,b,c,d)
165 #define IDirect3D9_GetAdapterDisplayMode(p,a,b) (p)->lpVtbl->GetAdapterDisplayMode(p,a,b)
166 #define IDirect3D9_CheckDeviceType(p,a,b,c,d,e) (p)->lpVtbl->CheckDeviceType(p,a,b,c,d,e)
167 #define IDirect3D9_CheckDeviceFormat(p,a,b,c,d,e,f)     (p)->lpVtbl->CheckDeviceFormat(p,a,b,c,d,e,f)
168 #define IDirect3D9_CheckDeviceMultiSampleType(p,a,b,c,d,e,f)    (p)->lpVtbl->CheckDeviceMultiSampleType(p,a,b,c,d,e,f)
169 #define IDirect3D9_CheckDepthStencilMatch(p,a,b,c,d,e)  (p)->lpVtbl->CheckDepthStencilMatch(p,a,b,c,d,e)
170 #define IDirect3D9_CheckDeviceFormatConversion(p,a,b,c,d)       (p)->lpVtbl->CheckDeviceFormatConversion(p,a,b,c,d)
171 #define IDirect3D9_GetDeviceCaps(p,a,b,c)       (p)->lpVtbl->GetDeviceCaps(p,a,b,c)
172 #define IDirect3D9_GetAdapterMonitor(p,a)       (p)->lpVtbl->GetAdapterMonitor(p,a)
173 #define IDirect3D9_CreateDevice(p,a,b,c,d,e,f)  (p)->lpVtbl->CreateDevice(p,a,b,c,d,e,f)
174 #else
175 #define IDirect3D9_QueryInterface(p,a,b)        (p)->QueryInterface(a,b)
176 #define IDirect3D9_AddRef(p)    (p)->AddRef()
177 #define IDirect3D9_Release(p)   (p)->Release()
178 #define IDirect3D9_RegisterSoftwareDevice(p,a)  (p)->RegisterSoftwareDevice(a)
179 #define IDirect3D9_GetAdapterCount(p)   (p)->GetAdapterCount()
180 #define IDirect3D9_GetAdapterIdentifier(p,a,b,c)        (p)->GetAdapterIdentifier(a,b,c)
181 #define IDirect3D9_GetAdapterModeCount(p,a,b)   (p)->GetAdapterModeCount(a,b)
182 #define IDirect3D9_EnumAdapterModes(p,a,b,c,d)  (p)->EnumAdapterModes(a,b,c,d)
183 #define IDirect3D9_GetAdapterDisplayMode(p,a,b) (p)->GetAdapterDisplayMode(a,b)
184 #define IDirect3D9_CheckDeviceType(p,a,b,c,d,e) (p)->CheckDeviceType(a,b,c,d,e)
185 #define IDirect3D9_CheckDeviceFormat(p,a,b,c,d,e,f)     (p)->CheckDeviceFormat(a,b,c,d,e,f)
186 #define IDirect3D9_CheckDeviceMultiSampleType(p,a,b,c,d,e,f)    (p)->CheckDeviceMultiSampleType(a,b,c,d,e,f)
187 #define IDirect3D9_CheckDepthStencilMatch(p,a,b,c,d,e)  (p)->CheckDepthStencilMatch(a,b,c,d,e)
188 #define IDirect3D9_CheckDeviceFormatConversion(p,a,b,c,d)       (p)->CheckDeviceFormatConversion(a,b,c,d)
189 #define IDirect3D9_GetDeviceCaps(p,a,b,c)       (p)->GetDeviceCaps(a,b,c)
190 #define IDirect3D9_GetAdapterMonitor(p,a)       (p)->GetAdapterMonitor(a)
191 #define IDirect3D9_CreateDevice(p,a,b,c,d,e,f)  (p)->CreateDevice(a,b,c,d,e,f)
192 #endif
193
194 #undef INTERFACE
195 #define INTERFACE IDirect3DDevice9
196 DECLARE_INTERFACE_(IDirect3DDevice9,IUnknown)
197 {
198         STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
199         STDMETHOD_(ULONG,AddRef)(THIS) PURE;
200         STDMETHOD_(ULONG,Release)(THIS) PURE;
201         STDMETHOD(TestCooperativeLevel)(THIS) PURE;
202         STDMETHOD_(UINT,GetAvailableTextureMem)(THIS) PURE;
203         STDMETHOD(EvictManagedResources)(THIS) PURE;
204         STDMETHOD(GetDirect3D)(THIS_ IDirect3D9**) PURE;
205         STDMETHOD(GetDeviceCaps)(THIS_ D3DCAPS9*) PURE;
206         STDMETHOD(GetDisplayMode)(THIS_ UINT,D3DDISPLAYMODE*) PURE;
207         STDMETHOD(GetCreationParameters)(THIS_ D3DDEVICE_CREATION_PARAMETERS*) PURE;
208         STDMETHOD(SetCursorProperties)(THIS_ UINT,UINT,IDirect3DSurface9*) PURE;
209         STDMETHOD_(void,SetCursorPosition)(THIS_ int,int,DWORD) PURE;
210         STDMETHOD_(BOOL,ShowCursor)(THIS_ BOOL) PURE;
211         STDMETHOD(CreateAdditionalSwapChain)(THIS_ D3DPRESENT_PARAMETERS*,IDirect3DSwapChain9**) PURE;
212         STDMETHOD(GetSwapChain)(THIS_ UINT,IDirect3DSwapChain9**) PURE;
213         STDMETHOD_(UINT,GetNumberOfSwapChains)(THIS) PURE;
214         STDMETHOD(Reset)(THIS_ D3DPRESENT_PARAMETERS*) PURE;
215         STDMETHOD(Present)(THIS_ CONST RECT*,CONST RECT*,HWND,CONST RGNDATA*) PURE;
216         STDMETHOD(GetBackBuffer)(THIS_ UINT,UINT,D3DBACKBUFFER_TYPE,IDirect3DSurface9**) PURE;
217         STDMETHOD(GetRasterStatus)(THIS_ UINT,D3DRASTER_STATUS*) PURE;
218         STDMETHOD(SetDialogBoxMode)(THIS_ BOOL) PURE;
219         STDMETHOD_(void,SetGammaRamp)(THIS_ UINT,DWORD,CONST D3DGAMMARAMP*) PURE;
220         STDMETHOD_(void,GetGammaRamp)(THIS_ UINT,D3DGAMMARAMP*) PURE;
221         STDMETHOD(CreateTexture)(THIS_ UINT,UINT,UINT,DWORD,D3DFORMAT,D3DPOOL,IDirect3DTexture9**,HANDLE*) PURE;
222         STDMETHOD(CreateVolumeTexture)(THIS_ UINT,UINT,UINT,UINT,DWORD,D3DFORMAT,D3DPOOL,IDirect3DVolumeTexture9**,HANDLE*) PURE;
223         STDMETHOD(CreateCubeTexture)(THIS_ UINT,UINT,DWORD,D3DFORMAT,D3DPOOL,IDirect3DCubeTexture9**, HANDLE*) PURE;
224         STDMETHOD(CreateVertexBuffer)(THIS_ UINT,DWORD,DWORD,D3DPOOL,IDirect3DVertexBuffer9**, HANDLE*) PURE;
225         STDMETHOD(CreateIndexBuffer)(THIS_ UINT,DWORD,D3DFORMAT,D3DPOOL,IDirect3DIndexBuffer9**,HANDLE*) PURE;
226         STDMETHOD(CreateRenderTarget)(THIS_ UINT,UINT,D3DFORMAT,D3DMULTISAMPLE_TYPE,DWORD,BOOL,IDirect3DSurface9**,HANDLE*) PURE;
227         STDMETHOD(CreateDepthStencilSurface)(THIS_ UINT,UINT,D3DFORMAT,D3DMULTISAMPLE_TYPE,DWORD,BOOL,IDirect3DSurface9**,HANDLE*) PURE;
228         STDMETHOD(UpdateSurface)(THIS_ IDirect3DSurface9*,CONST RECT*,IDirect3DSurface9*,CONST POINT*) PURE;
229         STDMETHOD(UpdateTexture)(THIS_ IDirect3DBaseTexture9*,IDirect3DBaseTexture9*) PURE;
230         STDMETHOD(GetRenderTargetData)(THIS_ IDirect3DSurface9*,IDirect3DSurface9*) PURE;
231         STDMETHOD(GetFrontBufferData)(THIS_ UINT,IDirect3DSurface9*) PURE;
232         STDMETHOD(StretchRect)(THIS_ IDirect3DSurface9*,CONST RECT*,IDirect3DSurface9*,CONST RECT*,D3DTEXTUREFILTERTYPE) PURE;
233         STDMETHOD(ColorFill)(THIS_ IDirect3DSurface9*,CONST RECT*,D3DCOLOR) PURE;
234         STDMETHOD(CreateOffscreenPlainSurface)(THIS_ UINT,UINT,D3DFORMAT,D3DPOOL,IDirect3DSurface9**,HANDLE*) PURE;
235         STDMETHOD(SetRenderTarget)(THIS_ DWORD,IDirect3DSurface9*) PURE;
236         STDMETHOD(GetRenderTarget)(THIS_ DWORD,IDirect3DSurface9**) PURE;
237         STDMETHOD(SetDepthStencilSurface)(THIS_ IDirect3DSurface9*) PURE;
238         STDMETHOD(GetDepthStencilSurface)(THIS_ IDirect3DSurface9**) PURE;
239         STDMETHOD(BeginScene)(THIS) PURE;
240         STDMETHOD(EndScene)(THIS) PURE;
241         STDMETHOD(Clear)(THIS_ DWORD,CONST D3DRECT*,DWORD,D3DCOLOR,float,DWORD) PURE;
242         STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE,CONST D3DMATRIX*) PURE;
243         STDMETHOD(GetTransform)(THIS_ D3DTRANSFORMSTATETYPE,D3DMATRIX*) PURE;
244         STDMETHOD(MultiplyTransform)(THIS_ D3DTRANSFORMSTATETYPE,CONST D3DMATRIX*) PURE;
245         STDMETHOD(SetViewport)(THIS_ CONST D3DVIEWPORT9*) PURE;
246         STDMETHOD(GetViewport)(THIS_ D3DVIEWPORT9*) PURE;
247         STDMETHOD(SetMaterial)(THIS_ CONST D3DMATERIAL9*) PURE;
248         STDMETHOD(GetMaterial)(THIS_ D3DMATERIAL9*) PURE;
249         STDMETHOD(SetLight)(THIS_ DWORD,CONST D3DLIGHT9*) PURE;
250         STDMETHOD(GetLight)(THIS_ DWORD,D3DLIGHT9*) PURE;
251         STDMETHOD(LightEnable)(THIS_ DWORD,BOOL) PURE;
252         STDMETHOD(GetLightEnable)(THIS_ DWORD,BOOL*) PURE;
253         STDMETHOD(SetClipPlane)(THIS_ DWORD,CONST float*) PURE;
254         STDMETHOD(GetClipPlane)(THIS_ DWORD,float*) PURE;
255         STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE,DWORD) PURE;
256         STDMETHOD(GetRenderState)(THIS_ D3DRENDERSTATETYPE,DWORD*) PURE;
257         STDMETHOD(CreateStateBlock)(THIS_ D3DSTATEBLOCKTYPE,IDirect3DStateBlock9**) PURE;
258         STDMETHOD(BeginStateBlock)(THIS) PURE;
259         STDMETHOD(EndStateBlock)(THIS_ IDirect3DStateBlock9**) PURE;
260         STDMETHOD(SetClipStatus)(THIS_ CONST D3DCLIPSTATUS9*) PURE;
261         STDMETHOD(GetClipStatus)(THIS_ D3DCLIPSTATUS9*) PURE;
262         STDMETHOD(GetTexture)(THIS_ DWORD,IDirect3DBaseTexture9**) PURE;
263         STDMETHOD(SetTexture)(THIS_ DWORD,IDirect3DBaseTexture9*) PURE;
264         STDMETHOD(GetTextureStageState)(THIS_ DWORD,D3DTEXTURESTAGESTATETYPE,DWORD*) PURE;
265         STDMETHOD(SetTextureStageState)(THIS_ DWORD,D3DTEXTURESTAGESTATETYPE,DWORD) PURE;
266         STDMETHOD(GetSamplerState)(THIS_ DWORD,D3DSAMPLERSTATETYPE,DWORD*) PURE;
267         STDMETHOD(SetSamplerState)(THIS_ DWORD,D3DSAMPLERSTATETYPE,DWORD) PURE;
268         STDMETHOD(ValidateDevice)(THIS_ DWORD*) PURE;
269         STDMETHOD(SetPaletteEntries)(THIS_ UINT,CONST PALETTEENTRY*) PURE;
270         STDMETHOD(GetPaletteEntries)(THIS_ UINT,PALETTEENTRY*) PURE;
271         STDMETHOD(SetCurrentTexturePalette)(THIS_ UINT) PURE;
272         STDMETHOD(GetCurrentTexturePalette)(THIS_ UINT*) PURE;
273         STDMETHOD(SetScissorRect)(THIS_ CONST RECT*) PURE;
274         STDMETHOD(GetScissorRect)(THIS_ RECT*) PURE;
275         STDMETHOD(SetSoftwareVertexProcessing)(THIS_ BOOL) PURE;
276         STDMETHOD_(BOOL,GetSoftwareVertexProcessing)(THIS) PURE;
277         STDMETHOD(SetNPatchMode)(THIS_ float) PURE;
278         STDMETHOD_(float,GetNPatchMode)(THIS) PURE;
279         STDMETHOD(DrawPrimitive)(THIS_ D3DPRIMITIVETYPE,UINT,UINT) PURE;
280         STDMETHOD(DrawIndexedPrimitive)(THIS_ D3DPRIMITIVETYPE,INT,UINT,UINT,UINT,UINT) PURE;
281         STDMETHOD(DrawPrimitiveUP)(THIS_ D3DPRIMITIVETYPE,UINT,CONST void*,UINT) PURE;
282         STDMETHOD(DrawIndexedPrimitiveUP)(THIS_ D3DPRIMITIVETYPE,UINT,UINT,UINT,CONST void*,D3DFORMAT,CONST void*,UINT) PURE;
283         STDMETHOD(ProcessVertices)(THIS_ UINT,UINT,UINT,IDirect3DVertexBuffer9*,IDirect3DVertexDeclaration9*,DWORD) PURE;
284         STDMETHOD(CreateVertexDeclaration)(THIS_ CONST D3DVERTEXELEMENT9*,IDirect3DVertexDeclaration9**) PURE;
285         STDMETHOD(SetVertexDeclaration)(THIS_ IDirect3DVertexDeclaration9*) PURE;
286         STDMETHOD(GetVertexDeclaration)(THIS_ IDirect3DVertexDeclaration9**) PURE;
287         STDMETHOD(SetFVF)(THIS_ DWORD) PURE;
288         STDMETHOD(GetFVF)(THIS_ DWORD*) PURE;
289         STDMETHOD(CreateVertexShader)(THIS_ CONST DWORD*,IDirect3DVertexShader9**) PURE;
290         STDMETHOD(SetVertexShader)(THIS_ IDirect3DVertexShader9*) PURE;
291         STDMETHOD(GetVertexShader)(THIS_ IDirect3DVertexShader9**) PURE;
292         STDMETHOD(SetVertexShaderConstantF)(THIS_ UINT,CONST float*,UINT) PURE;
293         STDMETHOD(GetVertexShaderConstantF)(THIS_ UINT,float*,UINT) PURE;
294         STDMETHOD(SetVertexShaderConstantI)(THIS_ UINT,CONST int*,UINT) PURE;
295         STDMETHOD(GetVertexShaderConstantI)(THIS_ UINT,int*,UINT) PURE;
296         STDMETHOD(SetVertexShaderConstantB)(THIS_ UINT,CONST BOOL*,UINT) PURE;
297         STDMETHOD(GetVertexShaderConstantB)(THIS_ UINT,BOOL*,UINT) PURE;
298         STDMETHOD(SetStreamSource)(THIS_ UINT,IDirect3DVertexBuffer9*,UINT,UINT) PURE;
299         STDMETHOD(GetStreamSource)(THIS_ UINT,IDirect3DVertexBuffer9**,UINT*,UINT*) PURE;
300         STDMETHOD(SetStreamSourceFreq)(THIS_ UINT,UINT) PURE;
301         STDMETHOD(GetStreamSourceFreq)(THIS_ UINT,UINT*) PURE;
302         STDMETHOD(SetIndices)(THIS_ IDirect3DIndexBuffer9*) PURE;
303         STDMETHOD(GetIndices)(THIS_ IDirect3DIndexBuffer9**) PURE;
304         STDMETHOD(CreatePixelShader)(THIS_ CONST DWORD*,IDirect3DPixelShader9**) PURE;
305         STDMETHOD(SetPixelShader)(THIS_ IDirect3DPixelShader9*) PURE;
306         STDMETHOD(GetPixelShader)(THIS_ IDirect3DPixelShader9**) PURE;
307         STDMETHOD(SetPixelShaderConstantF)(THIS_ UINT,CONST float*,UINT) PURE;
308         STDMETHOD(GetPixelShaderConstantF)(THIS_ UINT,float*,UINT) PURE;
309         STDMETHOD(SetPixelShaderConstantI)(THIS_ UINT,CONST int*,UINT) PURE;
310         STDMETHOD(GetPixelShaderConstantI)(THIS_ UINT,int*,UINT) PURE;
311         STDMETHOD(SetPixelShaderConstantB)(THIS_ UINT,CONST BOOL*,UINT) PURE;
312         STDMETHOD(GetPixelShaderConstantB)(THIS_ UINT,BOOL*,UINT) PURE;
313         STDMETHOD(DrawRectPatch)(THIS_ UINT,CONST float*,CONST D3DRECTPATCH_INFO*) PURE;
314         STDMETHOD(DrawTriPatch)(THIS_ UINT,CONST float*,CONST D3DTRIPATCH_INFO*) PURE;
315         STDMETHOD(DeletePatch)(THIS_ UINT) PURE;
316         STDMETHOD(CreateQuery)(THIS_ D3DQUERYTYPE,IDirect3DQuery9**) PURE;
317 };
318 typedef struct IDirect3DDevice9 *LPDIRECT3DDEVICE9, *PDIRECT3DDEVICE9;
319
320 #if !defined(__cplusplus) || defined(CINTERFACE)
321 #define IDirect3DDevice9_QueryInterface(p,a,b)  (p)->lpVtbl->QueryInterface(p,a,b)
322 #define IDirect3DDevice9_AddRef(p)      (p)->lpVtbl->AddRef(p)
323 #define IDirect3DDevice9_Release(p)     (p)->lpVtbl->Release(p)
324 #define IDirect3DDevice9_TestCooperativeLevel(p)        (p)->lpVtbl->TestCooperativeLevel(p)
325 #define IDirect3DDevice9_GetAvailableTextureMem(p)      (p)->lpVtbl->GetAvailableTextureMem(p)
326 #define IDirect3DDevice9_EvictManagedResources(p)       (p)->lpVtbl->EvictManagedResources(p)
327 #define IDirect3DDevice9_GetDirect3D(p,a)       (p)->lpVtbl->GetDirect3D(p,a)
328 #define IDirect3DDevice9_GetDeviceCaps(p,a)     (p)->lpVtbl->GetDeviceCaps(p,a)
329 #define IDirect3DDevice9_GetDisplayMode(p,a,b)  (p)->lpVtbl->GetDisplayMode(p,a,b)
330 #define IDirect3DDevice9_GetCreationParameters(p,a)     (p)->lpVtbl->GetCreationParameters(p,a)
331 #define IDirect3DDevice9_SetCursorProperties(p,a,b,c)   (p)->lpVtbl->SetCursorProperties(p,a,b,c)
332 #define IDirect3DDevice9_SetCursorPosition(p,a,b,c)     (p)->lpVtbl->SetCursorPosition(p,a,b,c)
333 #define IDirect3DDevice9_ShowCursor(p,a)        (p)->lpVtbl->ShowCursor(p,a)
334 #define IDirect3DDevice9_CreateAdditionalSwapChain(p,a,b)       (p)->lpVtbl->CreateAdditionalSwapChain(p,a,b)
335 #define IDirect3DDevice9_GetSwapChain(p,a,b)    (p)->lpVtbl->GetSwapChain(p,a,b)
336 #define IDirect3DDevice9_GetNumberOfSwapChains(p)       (p)->lpVtbl->GetNumberOfSwapChains(p)
337 #define IDirect3DDevice9_Reset(p,a)     (p)->lpVtbl->Reset(p,a)
338 #define IDirect3DDevice9_Present(p,a,b,c,d)     (p)->lpVtbl->Present(p,a,b,c,d)
339 #define IDirect3DDevice9_GetBackBuffer(p,a,b,c,d)       (p)->lpVtbl->GetBackBuffer(p,a,b,c,d)
340 #define IDirect3DDevice9_GetRasterStatus(p,a,b) (p)->lpVtbl->GetRasterStatus(p,a,b)
341 #define IDirect3DDevice9_SetDialogBoxMode(p,a)  (p)->lpVtbl->SetDialogBoxMode(p,a)
342 #define IDirect3DDevice9_SetGammaRamp(p,a,b,c)  (p)->lpVtbl->SetGammaRamp(p,a,b,c)
343 #define IDirect3DDevice9_GetGammaRamp(p,a,b)    (p)->lpVtbl->GetGammaRamp(p,a,b)
344 #define IDirect3DDevice9_CreateTexture(p,a,b,c,d,e,f,g,h)       (p)->lpVtbl->CreateTexture(p,a,b,c,d,e,f,g,h)
345 #define IDirect3DDevice9_CreateVolumeTexture(p,a,b,c,d,e,f,g,h,i)       (p)->lpVtbl->CreateVolumeTexture(p,a,b,c,d,e,f,g,h,i)
346 #define IDirect3DDevice9_CreateCubeTexture(p,a,b,c,d,e,f,g)     (p)->lpVtbl->CreateCubeTexture(p,a,b,c,d,e,f,g)
347 #define IDirect3DDevice9_CreateVertexBuffer(p,a,b,c,d,e,f)      (p)->lpVtbl->CreateVertexBuffer(p,a,b,c,d,e,f)
348 #define IDirect3DDevice9_CreateIndexBuffer(p,a,b,c,d,e,f)       (p)->lpVtbl->CreateIndexBuffer(p,a,b,c,d,e,f)
349 #define IDirect3DDevice9_CreateRenderTarget(p,a,b,c,d,e,f,g,h)  (p)->lpVtbl->CreateRenderTarget(p,a,b,c,d,e,f,g,h)
350 #define IDirect3DDevice9_CreateDepthStencilSurface(p,a,b,c,d,e,f,g,h)   (p)->lpVtbl->CreateDepthStencilSurface(p,a,b,c,d,e,f,g,h)
351 #define IDirect3DDevice9_UpdateSurface(p,a,b,c,d)       (p)->lpVtbl->UpdateSurface(p,a,b,c,d)
352 #define IDirect3DDevice9_UpdateTexture(p,a,b)   (p)->lpVtbl->UpdateTexture(p,a,b)
353 #define IDirect3DDevice9_GetRenderTargetData(p,a,b)     (p)->lpVtbl->GetRenderTargetData(p,a,b)
354 #define IDirect3DDevice9_GetFrontBufferData(p,a,b)      (p)->lpVtbl->GetFrontBufferData(p,a,b)
355 #define IDirect3DDevice9_StretchRect(p,a,b,c,d,e)       (p)->lpVtbl->StretchRect(p,a,b,c,d,e)
356 #define IDirect3DDevice9_ColorFill(p,a,b,c)     (p)->lpVtbl->ColorFill(p,a,b,c)
357 #define IDirect3DDevice9_CreateOffscreenPlainSurface(p,a,b,c,d,e,f)     (p)->lpVtbl->CreateOffscreenPlainSurface(p,a,b,c,d,e,f)
358 #define IDirect3DDevice9_SetRenderTarget(p,a,b) (p)->lpVtbl->SetRenderTarget(p,a,b)
359 #define IDirect3DDevice9_GetRenderTarget(p,a,b) (p)->lpVtbl->GetRenderTarget(p,a,b)
360 #define IDirect3DDevice9_SetDepthStencilSurface(p,a)    (p)->lpVtbl->SetDepthStencilSurface(p,a)
361 #define IDirect3DDevice9_GetDepthStencilSurface(p,a)    (p)->lpVtbl->GetDepthStencilSurface(p,a)
362 #define IDirect3DDevice9_BeginScene(p)  (p)->lpVtbl->BeginScene(p)
363 #define IDirect3DDevice9_EndScene(p)    (p)->lpVtbl->EndScene(p)
364 #define IDirect3DDevice9_Clear(p,a,b,c,d,e,f)   (p)->lpVtbl->Clear(p,a,b,c,d,e,f)
365 #define IDirect3DDevice9_SetTransform(p,a,b)    (p)->lpVtbl->SetTransform(p,a,b)
366 #define IDirect3DDevice9_GetTransform(p,a,b)    (p)->lpVtbl->GetTransform(p,a,b)
367 #define IDirect3DDevice9_MultiplyTransform(p,a,b)       (p)->lpVtbl->MultiplyTransform(p,a,b)
368 #define IDirect3DDevice9_SetViewport(p,a)       (p)->lpVtbl->SetViewport(p,a)
369 #define IDirect3DDevice9_GetViewport(p,a)       (p)->lpVtbl->GetViewport(p,a)
370 #define IDirect3DDevice9_SetMaterial(p,a)       (p)->lpVtbl->SetMaterial(p,a)
371 #define IDirect3DDevice9_GetMaterial(p,a)       (p)->lpVtbl->GetMaterial(p,a)
372 #define IDirect3DDevice9_SetLight(p,a,b)        (p)->lpVtbl->SetLight(p,a,b)
373 #define IDirect3DDevice9_GetLight(p,a,b)        (p)->lpVtbl->GetLight(p,a,b)
374 #define IDirect3DDevice9_LightEnable(p,a,b)     (p)->lpVtbl->LightEnable(p,a,b)
375 #define IDirect3DDevice9_GetLightEnable(p,a,b)  (p)->lpVtbl->GetLightEnable(p,a,b)
376 #define IDirect3DDevice9_SetClipPlane(p,a,b)    (p)->lpVtbl->SetClipPlane(p,a,b)
377 #define IDirect3DDevice9_GetClipPlane(p,a,b)    (p)->lpVtbl->GetClipPlane(p,a,b)
378 #define IDirect3DDevice9_SetRenderState(p,a,b)  (p)->lpVtbl->SetRenderState(p,a,b)
379 #define IDirect3DDevice9_GetRenderState(p,a,b)  (p)->lpVtbl->GetRenderState(p,a,b)
380 #define IDirect3DDevice9_CreateStateBlock(p,a,b)        (p)->lpVtbl->CreateStateBlock(p,a,b)
381 #define IDirect3DDevice9_BeginStateBlock(p)     (p)->lpVtbl->BeginStateBlock(p)
382 #define IDirect3DDevice9_EndStateBlock(p,a)     (p)->lpVtbl->EndStateBlock(p,a)
383 #define IDirect3DDevice9_SetClipStatus(p,a)     (p)->lpVtbl->SetClipStatus(p,a)
384 #define IDirect3DDevice9_GetClipStatus(p,a)     (p)->lpVtbl->GetClipStatus(p,a)
385 #define IDirect3DDevice9_GetTexture(p,a,b)      (p)->lpVtbl->GetTexture(p,a,b)
386 #define IDirect3DDevice9_SetTexture(p,a,b)      (p)->lpVtbl->SetTexture(p,a,b)
387 #define IDirect3DDevice9_GetTextureStageState(p,a,b,c)  (p)->lpVtbl->GetTextureStageState(p,a,b,c)
388 #define IDirect3DDevice9_SetTextureStageState(p,a,b,c)  (p)->lpVtbl->SetTextureStageState(p,a,b,c)
389 #define IDirect3DDevice9_GetSamplerState(p,a,b,c)       (p)->lpVtbl->GetSamplerState(p,a,b,c)
390 #define IDirect3DDevice9_SetSamplerState(p,a,b,c)       (p)->lpVtbl->SetSamplerState(p,a,b,c)
391 #define IDirect3DDevice9_ValidateDevice(p,a)    (p)->lpVtbl->ValidateDevice(p,a)
392 #define IDirect3DDevice9_SetPaletteEntries(p,a,b)       (p)->lpVtbl->SetPaletteEntries(p,a,b)
393 #define IDirect3DDevice9_GetPaletteEntries(p,a,b)       (p)->lpVtbl->GetPaletteEntries(p,a,b)
394 #define IDirect3DDevice9_SetCurrentTexturePalette(p,a)  (p)->lpVtbl->SetCurrentTexturePalette(p,a)
395 #define IDirect3DDevice9_GetCurrentTexturePalette(p,a)  (p)->lpVtbl->GetCurrentTexturePalette(p,a)
396 #define IDirect3DDevice9_SetScissorRect(p,a)    (p)->lpVtbl->SetScissorRect(p,a)
397 #define IDirect3DDevice9_GetScissorRect(p,a)    (p)->lpVtbl->GetScissorRect(p,a)
398 #define IDirect3DDevice9_SetSoftwareVertexProcessing(p,a)       (p)->lpVtbl->SetSoftwareVertexProcessing(p,a)
399 #define IDirect3DDevice9_GetSoftwareVertexProcessing(p) (p)->lpVtbl->GetSoftwareVertexProcessing(p)
400 #define IDirect3DDevice9_SetNPatchMode(p,a)     (p)->lpVtbl->SetNPatchMode(p,a)
401 #define IDirect3DDevice9_GetNPatchMode(p)       (p)->lpVtbl->GetNPatchMode(p)
402 #define IDirect3DDevice9_DrawPrimitive(p,a,b,c) (p)->lpVtbl->DrawPrimitive(p,a,b,c)
403 #define IDirect3DDevice9_DrawIndexedPrimitive(p,a,b,c,d,e,f)    (p)->lpVtbl->DrawIndexedPrimitive(p,a,b,c,d,e,f)
404 #define IDirect3DDevice9_DrawPrimitiveUP(p,a,b,c,d)     (p)->lpVtbl->DrawPrimitiveUP(p,a,b,c,d)
405 #define IDirect3DDevice9_DrawIndexedPrimitiveUP(p,a,b,c,d,e,f,g,h)      (p)->lpVtbl->DrawIndexedPrimitiveUP(p,a,b,c,d,e,f,g,h)
406 #define IDirect3DDevice9_ProcessVertices(p,a,b,c,d,e,f) (p)->lpVtbl->ProcessVertices(p,a,b,c,d,e,f)
407 #define IDirect3DDevice9_CreateVertexDeclaration(p,a,b) (p)->lpVtbl->CreateVertexDeclaration(p,a,b)
408 #define IDirect3DDevice9_SetVertexDeclaration(p,a)      (p)->lpVtbl->SetVertexDeclaration(p,a)
409 #define IDirect3DDevice9_GetVertexDeclaration(p,a)      (p)->lpVtbl->GetVertexDeclaration(p,a)
410 #define IDirect3DDevice9_SetFVF(p,a)    (p)->lpVtbl->SetFVF(p,a)
411 #define IDirect3DDevice9_GetFVF(p,a)    (p)->lpVtbl->GetFVF(p,a)
412 #define IDirect3DDevice9_CreateVertexShader(p,a,b)      (p)->lpVtbl->CreateVertexShader(p,a,b)
413 #define IDirect3DDevice9_SetVertexShader(p,a)   (p)->lpVtbl->SetVertexShader(p,a)
414 #define IDirect3DDevice9_GetVertexShader(p,a)   (p)->lpVtbl->GetVertexShader(p,a)
415 #define IDirect3DDevice9_SetVertexShaderConstantF(p,a,b,c)      (p)->lpVtbl->SetVertexShaderConstantF(p,a,b,c)
416 #define IDirect3DDevice9_GetVertexShaderConstantF(p,a,b,c)      (p)->lpVtbl->GetVertexShaderConstantF(p,a,b,c)
417 #define IDirect3DDevice9_SetVertexShaderConstantI(p,a,b,c)      (p)->lpVtbl->SetVertexShaderConstantI(p,a,b,c)
418 #define IDirect3DDevice9_GetVertexShaderConstantI(p,a,b,c)      (p)->lpVtbl->GetVertexShaderConstantI(p,a,b,c)
419 #define IDirect3DDevice9_SetVertexShaderConstantB(p,a,b,c)      (p)->lpVtbl->SetVertexShaderConstantB(p,a,b,c)
420 #define IDirect3DDevice9_GetVertexShaderConstantB(p,a,b,c)      (p)->lpVtbl->GetVertexShaderConstantB(p,a,b,c)
421 #define IDirect3DDevice9_SetStreamSource(p,a,b,c,d)     (p)->lpVtbl->SetStreamSource(p,a,b,c,d)
422 #define IDirect3DDevice9_GetStreamSource(p,a,b,c,d)     (p)->lpVtbl->GetStreamSource(p,a,b,c,d)
423 #define IDirect3DDevice9_SetStreamSourceFreq(p,a,b)     (p)->lpVtbl->SetStreamSourceFreq(p,a,b)
424 #define IDirect3DDevice9_GetStreamSourceFreq(p,a,b)     (p)->lpVtbl->GetStreamSourceFreq(p,a,b)
425 #define IDirect3DDevice9_SetIndices(p,a)        (p)->lpVtbl->SetIndices(p,a)
426 #define IDirect3DDevice9_GetIndices(p,a)        (p)->lpVtbl->GetIndices(p,a)
427 #define IDirect3DDevice9_CreatePixelShader(p,a,b)       (p)->lpVtbl->CreatePixelShader(p,a,b)
428 #define IDirect3DDevice9_SetPixelShader(p,a)    (p)->lpVtbl->SetPixelShader(p,a)
429 #define IDirect3DDevice9_GetPixelShader(p,a)    (p)->lpVtbl->GetPixelShader(p,a)
430 #define IDirect3DDevice9_SetPixelShaderConstantF(p,a,b,c)       (p)->lpVtbl->SetPixelShaderConstantF(p,a,b,c)
431 #define IDirect3DDevice9_GetPixelShaderConstantF(p,a,b,c)       (p)->lpVtbl->GetPixelShaderConstantF(p,a,b,c)
432 #define IDirect3DDevice9_SetPixelShaderConstantI(p,a,b,c)       (p)->lpVtbl->SetPixelShaderConstantI(p,a,b,c)
433 #define IDirect3DDevice9_GetPixelShaderConstantI(p,a,b,c)       (p)->lpVtbl->GetPixelShaderConstantI(p,a,b,c)
434 #define IDirect3DDevice9_SetPixelShaderConstantB(p,a,b,c)       (p)->lpVtbl->SetPixelShaderConstantB(p,a,b,c)
435 #define IDirect3DDevice9_GetPixelShaderConstantB(p,a,b,c)       (p)->lpVtbl->GetPixelShaderConstantB(p,a,b,c)
436 #define IDirect3DDevice9_DrawRectPatch(p,a,b,c) (p)->lpVtbl->DrawRectPatch(p,a,b,c)
437 #define IDirect3DDevice9_DrawTriPatch(p,a,b,c)  (p)->lpVtbl->DrawTriPatch(p,a,b,c)
438 #define IDirect3DDevice9_DeletePatch(p,a)       (p)->lpVtbl->DeletePatch(p,a)
439 #define IDirect3DDevice9_CreateQuery(p,a,b)     (p)->lpVtbl->CreateQuery(p,a,b)
440 #else
441 #define IDirect3DDevice9_QueryInterface(p,a,b)  (p)->QueryInterface(a,b)
442 #define IDirect3DDevice9_AddRef(p)      (p)->AddRef()
443 #define IDirect3DDevice9_Release(p)     (p)->Release()
444 #define IDirect3DDevice9_TestCooperativeLevel(p)        (p)->TestCooperativeLevel()
445 #define IDirect3DDevice9_GetAvailableTextureMem(p)      (p)->GetAvailableTextureMem()
446 #define IDirect3DDevice9_EvictManagedResources(p)       (p)->EvictManagedResources()
447 #define IDirect3DDevice9_GetDirect3D(p,a)       (p)->GetDirect3D(a)
448 #define IDirect3DDevice9_GetDeviceCaps(p,a)     (p)->GetDeviceCaps(a)
449 #define IDirect3DDevice9_GetDisplayMode(p,a,b)  (p)->GetDisplayMode(a,b)
450 #define IDirect3DDevice9_GetCreationParameters(p,a)     (p)->GetCreationParameters(a)
451 #define IDirect3DDevice9_SetCursorProperties(p,a,b,c)   (p)->SetCursorProperties(a,b,c)
452 #define IDirect3DDevice9_SetCursorPosition(p,a,b,c)     (p)->SetCursorPosition(a,b,c)
453 #define IDirect3DDevice9_ShowCursor(p,a)        (p)->ShowCursor(a)
454 #define IDirect3DDevice9_CreateAdditionalSwapChain(p,a,b)       (p)->CreateAdditionalSwapChain(a,b)
455 #define IDirect3DDevice9_GetSwapChain(p,a,b)    (p)->GetSwapChain(a,b)
456 #define IDirect3DDevice9_GetNumberOfSwapChains(p)       (p)->GetNumberOfSwapChains()
457 #define IDirect3DDevice9_Reset(p,a)     (p)->Reset(a)
458 #define IDirect3DDevice9_Present(p,a,b,c,d)     (p)->Present(a,b,c,d)
459 #define IDirect3DDevice9_GetBackBuffer(p,a,b,c,d)       (p)->GetBackBuffer(a,b,c,d)
460 #define IDirect3DDevice9_GetRasterStatus(p,a,b) (p)->GetRasterStatus(a,b)
461 #define IDirect3DDevice9_SetDialogBoxMode(p,a)  (p)->SetDialogBoxMode(a)
462 #define IDirect3DDevice9_SetGammaRamp(p,a,b,c)  (p)->SetGammaRamp(a,b,c)
463 #define IDirect3DDevice9_GetGammaRamp(p,a,b)    (p)->GetGammaRamp(a,b)
464 #define IDirect3DDevice9_CreateTexture(p,a,b,c,d,e,f,g,h)       (p)->CreateTexture(a,b,c,d,e,f,g,h)
465 #define IDirect3DDevice9_CreateVolumeTexture(p,a,b,c,d,e,f,g,h,i)       (p)->CreateVolumeTexture(a,b,c,d,e,f,g,h,i)
466 #define IDirect3DDevice9_CreateCubeTexture(p,a,b,c,d,e,f,g)     (p)->CreateCubeTexture(a,b,c,d,e,f,g)
467 #define IDirect3DDevice9_CreateVertexBuffer(p,a,b,c,d,e,f)      (p)->CreateVertexBuffer(a,b,c,d,e,f)
468 #define IDirect3DDevice9_CreateIndexBuffer(p,a,b,c,d,e,f)       (p)->CreateIndexBuffer(a,b,c,d,e,f)
469 #define IDirect3DDevice9_CreateRenderTarget(p,a,b,c,d,e,f,g,h)  (p)->CreateRenderTarget(a,b,c,d,e,f,g,h)
470 #define IDirect3DDevice9_CreateDepthStencilSurface(p,a,b,c,d,e,f,g,h)   (p)->CreateDepthStencilSurface(a,b,c,d,e,f,g,h)
471 #define IDirect3DDevice9_UpdateSurface(p,a,b,c,d)       (p)->UpdateSurface(a,b,c,d)
472 #define IDirect3DDevice9_UpdateTexture(p,a,b)   (p)->UpdateTexture(a,b)
473 #define IDirect3DDevice9_GetRenderTargetData(p,a,b)     (p)->GetRenderTargetData(a,b)
474 #define IDirect3DDevice9_GetFrontBufferData(p,a,b)      (p)->GetFrontBufferData(a,b)
475 #define IDirect3DDevice9_StretchRect(p,a,b,c,d,e)       (p)->StretchRect(a,b,c,d,e)
476 #define IDirect3DDevice9_ColorFill(p,a,b,c)     (p)->ColorFill(a,b,c)
477 #define IDirect3DDevice9_CreateOffscreenPlainSurface(p,a,b,c,d,e,f)     (p)->CreateOffscreenPlainSurface(a,b,c,d,e,f)
478 #define IDirect3DDevice9_SetRenderTarget(p,a,b) (p)->SetRenderTarget(a,b)
479 #define IDirect3DDevice9_GetRenderTarget(p,a,b) (p)->GetRenderTarget(a,b)
480 #define IDirect3DDevice9_SetDepthStencilSurface(p,a)    (p)->SetDepthStencilSurface(a)
481 #define IDirect3DDevice9_GetDepthStencilSurface(p,a)    (p)->GetDepthStencilSurface(a)
482 #define IDirect3DDevice9_BeginScene(p)  (p)->BeginScene()
483 #define IDirect3DDevice9_EndScene(p)    (p)->EndScene()
484 #define IDirect3DDevice9_Clear(p,a,b,c,d,e,f)   (p)->Clear(a,b,c,d,e,f)
485 #define IDirect3DDevice9_SetTransform(p,a,b)    (p)->SetTransform(a,b)
486 #define IDirect3DDevice9_GetTransform(p,a,b)    (p)->GetTransform(a,b)
487 #define IDirect3DDevice9_MultiplyTransform(p,a,b)       (p)->MultiplyTransform(a,b)
488 #define IDirect3DDevice9_SetViewport(p,a)       (p)->SetViewport(a)
489 #define IDirect3DDevice9_GetViewport(p,a)       (p)->GetViewport(a)
490 #define IDirect3DDevice9_SetMaterial(p,a)       (p)->SetMaterial(a)
491 #define IDirect3DDevice9_GetMaterial(p,a)       (p)->GetMaterial(a)
492 #define IDirect3DDevice9_SetLight(p,a,b)        (p)->SetLight(a,b)
493 #define IDirect3DDevice9_GetLight(p,a,b)        (p)->GetLight(a,b)
494 #define IDirect3DDevice9_LightEnable(p,a,b)     (p)->LightEnable(a,b)
495 #define IDirect3DDevice9_GetLightEnable(p,a,b)  (p)->GetLightEnable(a,b)
496 #define IDirect3DDevice9_SetClipPlane(p,a,b)    (p)->SetClipPlane(a,b)
497 #define IDirect3DDevice9_GetClipPlane(p,a,b)    (p)->GetClipPlane(a,b)
498 #define IDirect3DDevice9_SetRenderState(p,a,b)  (p)->SetRenderState(a,b)
499 #define IDirect3DDevice9_GetRenderState(p,a,b)  (p)->GetRenderState(a,b)
500 #define IDirect3DDevice9_CreateStateBlock(p,a,b)        (p)->CreateStateBlock(a,b)
501 #define IDirect3DDevice9_BeginStateBlock(p)     (p)->BeginStateBlock()
502 #define IDirect3DDevice9_EndStateBlock(p,a)     (p)->EndStateBlock(a)
503 #define IDirect3DDevice9_SetClipStatus(p,a)     (p)->SetClipStatus(a)
504 #define IDirect3DDevice9_GetClipStatus(p,a)     (p)->GetClipStatus(a)
505 #define IDirect3DDevice9_GetTexture(p,a,b)      (p)->GetTexture(a,b)
506 #define IDirect3DDevice9_SetTexture(p,a,b)      (p)->SetTexture(a,b)
507 #define IDirect3DDevice9_GetTextureStageState(p,a,b,c)  (p)->GetTextureStageState(a,b,c)
508 #define IDirect3DDevice9_SetTextureStageState(p,a,b,c)  (p)->SetTextureStageState(a,b,c)
509 #define IDirect3DDevice9_GetSamplerState(p,a,b,c)       (p)->GetSamplerState(a,b,c)
510 #define IDirect3DDevice9_SetSamplerState(p,a,b,c)       (p)->SetSamplerState(a,b,c)
511 #define IDirect3DDevice9_ValidateDevice(p,a)    (p)->ValidateDevice(a)
512 #define IDirect3DDevice9_SetPaletteEntries(p,a,b)       (p)->SetPaletteEntries(a,b)
513 #define IDirect3DDevice9_GetPaletteEntries(p,a,b)       (p)->GetPaletteEntries(a,b)
514 #define IDirect3DDevice9_SetCurrentTexturePalette(p,a)  (p)->SetCurrentTexturePalette(a)
515 #define IDirect3DDevice9_GetCurrentTexturePalette(p,a)  (p)->GetCurrentTexturePalette(a)
516 #define IDirect3DDevice9_SetScissorRect(p,a)    (p)->SetScissorRect(a)
517 #define IDirect3DDevice9_GetScissorRect(p,a)    (p)->GetScissorRect(a)
518 #define IDirect3DDevice9_SetSoftwareVertexProcessing(p,a)       (p)->SetSoftwareVertexProcessing(a)
519 #define IDirect3DDevice9_GetSoftwareVertexProcessing(p) (p)->GetSoftwareVertexProcessing()
520 #define IDirect3DDevice9_SetNPatchMode(p,a)     (p)->SetNPatchMode(a)
521 #define IDirect3DDevice9_GetNPatchMode(p)       (p)->GetNPatchMode()
522 #define IDirect3DDevice9_DrawPrimitive(p,a,b,c) (p)->DrawPrimitive(a,b,c)
523 #define IDirect3DDevice9_DrawIndexedPrimitive(p,a,b,c,d,e,f)    (p)->DrawIndexedPrimitive(a,b,c,d,e,f)
524 #define IDirect3DDevice9_DrawPrimitiveUP(p,a,b,c,d)     (p)->DrawPrimitiveUP(a,b,c,d)
525 #define IDirect3DDevice9_DrawIndexedPrimitiveUP(p,a,b,c,d,e,f,g,h)      (p)->DrawIndexedPrimitiveUP(a,b,c,d,e,f,g,h)
526 #define IDirect3DDevice9_ProcessVertices(p,a,b,c,d,e,f) (p)->ProcessVertices(a,b,c,d,e,f)
527 #define IDirect3DDevice9_CreateVertexDeclaration(p,a,b) (p)->CreateVertexDeclaration(a,b)
528 #define IDirect3DDevice9_SetVertexDeclaration(p,a)      (p)->SetVertexDeclaration(a)
529 #define IDirect3DDevice9_GetVertexDeclaration(p,a)      (p)->GetVertexDeclaration(a)
530 #define IDirect3DDevice9_SetFVF(p,a)    (p)->SetFVF(a)
531 #define IDirect3DDevice9_GetFVF(p,a)    (p)->GetFVF(a)
532 #define IDirect3DDevice9_CreateVertexShader(p,a,b)      (p)->CreateVertexShader(a,b)
533 #define IDirect3DDevice9_SetVertexShader(p,a)   (p)->SetVertexShader(a)
534 #define IDirect3DDevice9_GetVertexShader(p,a)   (p)->GetVertexShader(a)
535 #define IDirect3DDevice9_SetVertexShaderConstantF(p,a,b,c)      (p)->SetVertexShaderConstantF(a,b,c)
536 #define IDirect3DDevice9_GetVertexShaderConstantF(p,a,b,c)      (p)->GetVertexShaderConstantF(a,b,c)
537 #define IDirect3DDevice9_SetVertexShaderConstantI(p,a,b,c)      (p)->SetVertexShaderConstantI(a,b,c)
538 #define IDirect3DDevice9_GetVertexShaderConstantI(p,a,b,c)      (p)->GetVertexShaderConstantI(a,b,c)
539 #define IDirect3DDevice9_SetVertexShaderConstantB(p,a,b,c)      (p)->SetVertexShaderConstantB(a,b,c)
540 #define IDirect3DDevice9_GetVertexShaderConstantB(p,a,b,c)      (p)->GetVertexShaderConstantB(a,b,c)
541 #define IDirect3DDevice9_SetStreamSource(p,a,b,c,d)     (p)->SetStreamSource(a,b,c,d)
542 #define IDirect3DDevice9_GetStreamSource(p,a,b,c,d)     (p)->GetStreamSource(a,b,c,d)
543 #define IDirect3DDevice9_SetStreamSourceFreq(p,a,b)     (p)->SetStreamSourceFreq(a,b)
544 #define IDirect3DDevice9_GetStreamSourceFreq(p,a,b)     (p)->GetStreamSourceFreq(a,b)
545 #define IDirect3DDevice9_SetIndices(p,a)        (p)->SetIndices(a)
546 #define IDirect3DDevice9_GetIndices(p,a)        (p)->GetIndices(a)
547 #define IDirect3DDevice9_CreatePixelShader(p,a,b)       (p)->CreatePixelShader(a,b)
548 #define IDirect3DDevice9_SetPixelShader(p,a)    (p)->SetPixelShader(a)
549 #define IDirect3DDevice9_GetPixelShader(p,a)    (p)->GetPixelShader(a)
550 #define IDirect3DDevice9_SetPixelShaderConstantF(p,a,b,c)       (p)->SetPixelShaderConstantF(a,b,c)
551 #define IDirect3DDevice9_GetPixelShaderConstantF(p,a,b,c)       (p)->GetPixelShaderConstantF(a,b,c)
552 #define IDirect3DDevice9_SetPixelShaderConstantI(p,a,b,c)       (p)->SetPixelShaderConstantI(a,b,c)
553 #define IDirect3DDevice9_GetPixelShaderConstantI(p,a,b,c)       (p)->GetPixelShaderConstantI(a,b,c)
554 #define IDirect3DDevice9_SetPixelShaderConstantB(p,a,b,c)       (p)->SetPixelShaderConstantB(a,b,c)
555 #define IDirect3DDevice9_GetPixelShaderConstantB(p,a,b,c)       (p)->GetPixelShaderConstantB(a,b,c)
556 #define IDirect3DDevice9_DrawRectPatch(p,a,b,c) (p)->DrawRectPatch(a,b,c)
557 #define IDirect3DDevice9_DrawTriPatch(p,a,b,c)  (p)->DrawTriPatch(a,b,c)
558 #define IDirect3DDevice9_DeletePatch(p,a)       (p)->DeletePatch(a)
559 #define IDirect3DDevice9_CreateQuery(p,a,b)     (p)->CreateQuery(a,b)
560 #endif
561
562 #undef INTERFACE
563 #define INTERFACE IDirect3DVolume9
564 DECLARE_INTERFACE_(IDirect3DVolume9,IUnknown)
565 {
566         STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
567         STDMETHOD_(ULONG,AddRef)(THIS) PURE;
568         STDMETHOD_(ULONG,Release)(THIS) PURE;
569         STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
570         STDMETHOD(SetPrivateData)(THIS_ REFGUID,CONST void*,DWORD,DWORD) PURE;
571         STDMETHOD(GetPrivateData)(THIS_ REFGUID,void*,DWORD*) PURE;
572         STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE;
573         STDMETHOD(GetContainer)(THIS_ REFIID,void**) PURE;
574         STDMETHOD(GetDesc)(THIS_ D3DVOLUME_DESC*) PURE;
575         STDMETHOD(LockBox)(THIS_ D3DLOCKED_BOX*,CONST D3DBOX*,DWORD) PURE;
576         STDMETHOD(UnlockBox)(THIS) PURE;
577 };
578 typedef struct IDirect3DVolume9 *LPDIRECT3DVOLUME9, *PDIRECT3DVOLUME9;
579
580 #if !defined(__cplusplus) || defined(CINTERFACE)
581 #define IDirect3DVolume9_QueryInterface(p,a,b)  (p)->lpVtbl->QueryInterface(p,a,b)
582 #define IDirect3DVolume9_AddRef(p)      (p)->lpVtbl->AddRef(p)
583 #define IDirect3DVolume9_Release(p)     (p)->lpVtbl->Release(p)
584 #define IDirect3DVolume9_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
585 #define IDirect3DVolume9_SetPrivateData(p,a,b,c,d)      (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
586 #define IDirect3DVolume9_GetPrivateData(p,a,b,c)        (p)->lpVtbl->GetPrivateData(p,a,b,c)
587 #define IDirect3DVolume9_FreePrivateData(p,a)   (p)->lpVtbl->FreePrivateData(p,a)
588 #define IDirect3DVolume9_GetContainer(p,a,b)    (p)->lpVtbl->GetContainer(p,a,b)
589 #define IDirect3DVolume9_GetDesc(p,a)   (p)->lpVtbl->GetDesc(p,a)
590 #define IDirect3DVolume9_LockBox(p,a,b,c)       (p)->lpVtbl->LockBox(p,a,b,c)
591 #define IDirect3DVolume9_UnlockBox(p)   (p)->lpVtbl->UnlockBox(p)
592 #else
593 #define IDirect3DVolume9_QueryInterface(p,a,b)  (p)->QueryInterface(a,b)
594 #define IDirect3DVolume9_AddRef(p)      (p)->AddRef()
595 #define IDirect3DVolume9_Release(p)     (p)->Release()
596 #define IDirect3DVolume9_GetDevice(p,a) (p)->GetDevice(a)
597 #define IDirect3DVolume9_SetPrivateData(p,a,b,c,d)      (p)->SetPrivateData(a,b,c,d)
598 #define IDirect3DVolume9_GetPrivateData(p,a,b,c)        (p)->GetPrivateData(a,b,c)
599 #define IDirect3DVolume9_FreePrivateData(p,a)   (p)->FreePrivateData(a)
600 #define IDirect3DVolume9_GetContainer(p,a,b)    (p)->GetContainer(a,b)
601 #define IDirect3DVolume9_GetDesc(p,a)   (p)->GetDesc(a)
602 #define IDirect3DVolume9_LockBox(p,a,b,c)       (p)->LockBox(a,b,c)
603 #define IDirect3DVolume9_UnlockBox(p)   (p)->UnlockBox()
604 #endif
605
606 #undef INTERFACE
607 #define INTERFACE IDirect3DSwapChain9
608 DECLARE_INTERFACE_(IDirect3DSwapChain9,IUnknown)
609 {
610         STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
611         STDMETHOD_(ULONG,AddRef)(THIS) PURE;
612         STDMETHOD_(ULONG,Release)(THIS) PURE;
613         STDMETHOD(Present)(THIS_ CONST RECT*,CONST RECT*,HWND,CONST RGNDATA*,DWORD) PURE;
614         STDMETHOD(GetFrontBufferData)(THIS_ IDirect3DSurface9*) PURE;
615         STDMETHOD(GetBackBuffer)(THIS_ UINT,D3DBACKBUFFER_TYPE,IDirect3DSurface9**) PURE;
616         STDMETHOD(GetRasterStatus)(THIS_ D3DRASTER_STATUS*) PURE;
617         STDMETHOD(GetDisplayMode)(THIS_ D3DDISPLAYMODE*) PURE;
618         STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
619         STDMETHOD(GetPresentParameters)(THIS_ D3DPRESENT_PARAMETERS*) PURE;
620 };
621 typedef struct IDirect3DSwapChain9 *LPDIRECT3DSWAPCHAIN9, *PDIRECT3DSWAPCHAIN9;
622
623 #if !defined(__cplusplus) || defined(CINTERFACE)
624 #define IDirect3DSwapChain9_QueryInterface(p,a,b)       (p)->lpVtbl->QueryInterface(p,a,b)
625 #define IDirect3DSwapChain9_AddRef(p)   (p)->lpVtbl->AddRef(p)
626 #define IDirect3DSwapChain9_Release(p)  (p)->lpVtbl->Release(p)
627 #define IDirect3DSwapChain9_Present(p,a,b,c,d,e)        (p)->lpVtbl->Present(p,a,b,c,d,e)
628 #define IDirect3DSwapChain9_GetFrontBufferData(p,a)     (p)->lpVtbl->GetFrontBufferData(p,a)
629 #define IDirect3DSwapChain9_GetBackBuffer(p,a,b,c)      (p)->lpVtbl->GetBackBuffer(p,a,b,c)
630 #define IDirect3DSwapChain9_GetRasterStatus(p,a)        (p)->lpVtbl->GetRasterStatus(p,a)
631 #define IDirect3DSwapChain9_GetDisplayMode(p,a) (p)->lpVtbl->GetDisplayMode(p,a)
632 #define IDirect3DSwapChain9_GetDevice(p,a)      (p)->lpVtbl->GetDevice(p,a)
633 #define IDirect3DSwapChain9_GetPresentParameters(p,a)   (p)->lpVtbl->GetPresentParameters(p,a)
634 #else
635 #define IDirect3DSwapChain9_QueryInterface(p,a,b)       (p)->QueryInterface(a,b)
636 #define IDirect3DSwapChain9_AddRef(p)   (p)->AddRef()
637 #define IDirect3DSwapChain9_Release(p)  (p)->Release()
638 #define IDirect3DSwapChain9_Present(p,a,b,c,d,e)        (p)->Present(a,b,c,d,e)
639 #define IDirect3DSwapChain9_GetFrontBufferData(p,a)     (p)->GetFrontBufferData(a)
640 #define IDirect3DSwapChain9_GetBackBuffer(p,a,b,c)      (p)->GetBackBuffer(a,b,c)
641 #define IDirect3DSwapChain9_GetRasterStatus(p,a)        (p)->GetRasterStatus(a)
642 #define IDirect3DSwapChain9_GetDisplayMode(p,a) (p)->GetDisplayMode(a)
643 #define IDirect3DSwapChain9_GetDevice(p,a)      (p)->GetDevice(a)
644 #define IDirect3DSwapChain9_GetPresentParameters(p,a)   (p)->GetPresentParameters(a)
645 #endif
646
647 #undef INTERFACE
648 #define INTERFACE IDirect3DResource9
649 DECLARE_INTERFACE_(IDirect3DResource9,IUnknown)
650 {
651         STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
652         STDMETHOD_(ULONG,AddRef)(THIS) PURE;
653         STDMETHOD_(ULONG,Release)(THIS) PURE;
654         STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
655         STDMETHOD(SetPrivateData)(THIS_ REFGUID,CONST void*,DWORD,DWORD) PURE;
656         STDMETHOD(GetPrivateData)(THIS_ REFGUID,void*,DWORD*) PURE;
657         STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE;
658         STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD) PURE;
659         STDMETHOD_(DWORD,GetPriority)(THIS) PURE;
660         STDMETHOD_(void,PreLoad)(THIS) PURE;
661         STDMETHOD_(D3DRESOURCETYPE,GetType)(THIS) PURE;
662 };
663 typedef struct IDirect3DResource9 *LPDIRECT3DRESOURCE9, *PDIRECT3DRESOURCE9;
664
665 #if !defined(__cplusplus) || defined(CINTERFACE)
666 #define IDirect3DResource9_QueryInterface(p,a,b)        (p)->lpVtbl->QueryInterface(p,a,b)
667 #define IDirect3DResource9_AddRef(p)    (p)->lpVtbl->AddRef(p)
668 #define IDirect3DResource9_Release(p)   (p)->lpVtbl->Release(p)
669 #define IDirect3DResource9_GetDevice(p,a)       (p)->lpVtbl->GetDevice(p,a)
670 #define IDirect3DResource9_SetPrivateData(p,a,b,c,d)    (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
671 #define IDirect3DResource9_GetPrivateData(p,a,b,c)      (p)->lpVtbl->GetPrivateData(p,a,b,c)
672 #define IDirect3DResource9_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a)
673 #define IDirect3DResource9_SetPriority(p,a)     (p)->lpVtbl->SetPriority(p,a)
674 #define IDirect3DResource9_GetPriority(p)       (p)->lpVtbl->GetPriority(p)
675 #define IDirect3DResource9_PreLoad(p)   (p)->lpVtbl->PreLoad(p)
676 #define IDirect3DResource9_GetType(p)   (p)->lpVtbl->GetType(p)
677 #else
678 #define IDirect3DResource9_QueryInterface(p,a,b)        (p)->QueryInterface(a,b)
679 #define IDirect3DResource9_AddRef(p)    (p)->AddRef()
680 #define IDirect3DResource9_Release(p)   (p)->Release()
681 #define IDirect3DResource9_GetDevice(p,a)       (p)->GetDevice(a)
682 #define IDirect3DResource9_SetPrivateData(p,a,b,c,d)    (p)->SetPrivateData(a,b,c,d)
683 #define IDirect3DResource9_GetPrivateData(p,a,b,c)      (p)->GetPrivateData(a,b,c)
684 #define IDirect3DResource9_FreePrivateData(p,a) (p)->FreePrivateData(a)
685 #define IDirect3DResource9_SetPriority(p,a)     (p)->SetPriority(a)
686 #define IDirect3DResource9_GetPriority(p)       (p)->GetPriority()
687 #define IDirect3DResource9_PreLoad(p)   (p)->PreLoad()
688 #define IDirect3DResource9_GetType(p)   (p)->GetType()
689 #endif
690
691 #undef INTERFACE
692 #define INTERFACE IDirect3DSurface9
693 DECLARE_INTERFACE_(IDirect3DSurface9,IDirect3DResource9)
694 {
695         STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
696         STDMETHOD_(ULONG,AddRef)(THIS) PURE;
697         STDMETHOD_(ULONG,Release)(THIS) PURE;
698         STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
699         STDMETHOD(SetPrivateData)(THIS_ REFGUID,CONST void*,DWORD,DWORD) PURE;
700         STDMETHOD(GetPrivateData)(THIS_ REFGUID,void*,DWORD*) PURE;
701         STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE;
702         STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD) PURE;
703         STDMETHOD_(DWORD,GetPriority)(THIS) PURE;
704         STDMETHOD_(void,PreLoad)(THIS) PURE;
705         STDMETHOD_(D3DRESOURCETYPE,GetType)(THIS) PURE;
706         STDMETHOD(GetContainer)(THIS_ REFIID,void**) PURE;
707         STDMETHOD(GetDesc)(THIS_ D3DSURFACE_DESC*) PURE;
708         STDMETHOD(LockRect)(THIS_ D3DLOCKED_RECT*,CONST RECT*,DWORD) PURE;
709         STDMETHOD(UnlockRect)(THIS) PURE;
710         STDMETHOD(GetDC)(THIS_ HDC*) PURE;
711         STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
712 };
713 typedef struct IDirect3DSurface9 *LPDIRECT3DSURFACE9, *PDIRECT3DSURFACE9;
714
715 #if !defined(__cplusplus) || defined(CINTERFACE)
716 #define IDirect3DSurface9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
717 #define IDirect3DSurface9_AddRef(p)     (p)->lpVtbl->AddRef(p)
718 #define IDirect3DSurface9_Release(p)    (p)->lpVtbl->Release(p)
719 #define IDirect3DSurface9_GetDevice(p,a)        (p)->lpVtbl->GetDevice(p,a)
720 #define IDirect3DSurface9_SetPrivateData(p,a,b,c,d)     (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
721 #define IDirect3DSurface9_GetPrivateData(p,a,b,c)       (p)->lpVtbl->GetPrivateData(p,a,b,c)
722 #define IDirect3DSurface9_FreePrivateData(p,a)  (p)->lpVtbl->FreePrivateData(p,a)
723 #define IDirect3DSurface9_SetPriority(p,a)      (p)->lpVtbl->SetPriority(p,a)
724 #define IDirect3DSurface9_GetPriority(p)        (p)->lpVtbl->GetPriority(p)
725 #define IDirect3DSurface9_PreLoad(p)    (p)->lpVtbl->PreLoad(p)
726 #define IDirect3DSurface9_GetType(p)    (p)->lpVtbl->GetType(p)
727 #define IDirect3DSurface9_GetContainer(p,a,b)   (p)->lpVtbl->GetContainer(p,a,b)
728 #define IDirect3DSurface9_GetDesc(p,a)  (p)->lpVtbl->GetDesc(p,a)
729 #define IDirect3DSurface9_LockRect(p,a,b,c)     (p)->lpVtbl->LockRect(p,a,b,c)
730 #define IDirect3DSurface9_UnlockRect(p) (p)->lpVtbl->UnlockRect(p)
731 #define IDirect3DSurface9_GetDC(p,a)    (p)->lpVtbl->GetDC(p,a)
732 #define IDirect3DSurface9_ReleaseDC(p,a)        (p)->lpVtbl->ReleaseDC(p,a)
733 #else
734 #define IDirect3DSurface9_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
735 #define IDirect3DSurface9_AddRef(p)     (p)->AddRef()
736 #define IDirect3DSurface9_Release(p)    (p)->Release()
737 #define IDirect3DSurface9_GetDevice(p,a)        (p)->GetDevice(a)
738 #define IDirect3DSurface9_SetPrivateData(p,a,b,c,d)     (p)->SetPrivateData(a,b,c,d)
739 #define IDirect3DSurface9_GetPrivateData(p,a,b,c)       (p)->GetPrivateData(a,b,c)
740 #define IDirect3DSurface9_FreePrivateData(p,a)  (p)->FreePrivateData(a)
741 #define IDirect3DSurface9_SetPriority(p,a)      (p)->SetPriority(a)
742 #define IDirect3DSurface9_GetPriority(p)        (p)->GetPriority()
743 #define IDirect3DSurface9_PreLoad(p)    (p)->PreLoad()
744 #define IDirect3DSurface9_GetType(p)    (p)->GetType()
745 #define IDirect3DSurface9_GetContainer(p,a,b)   (p)->GetContainer(a,b)
746 #define IDirect3DSurface9_GetDesc(p,a)  (p)->GetDesc(a)
747 #define IDirect3DSurface9_LockRect(p,a,b,c)     (p)->LockRect(a,b,c)
748 #define IDirect3DSurface9_UnlockRect(p) (p)->UnlockRect()
749 #define IDirect3DSurface9_GetDC(p,a)    (p)->GetDC(a)
750 #define IDirect3DSurface9_ReleaseDC(p,a)        (p)->ReleaseDC(a)
751 #endif
752
753 #undef INTERFACE
754 #define INTERFACE IDirect3DVertexBuffer9
755 DECLARE_INTERFACE_(IDirect3DVertexBuffer9,IDirect3DResource9)
756 {
757         STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
758         STDMETHOD_(ULONG,AddRef)(THIS) PURE;
759         STDMETHOD_(ULONG,Release)(THIS) PURE;
760         STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
761         STDMETHOD(SetPrivateData)(THIS_ REFGUID,CONST void*,DWORD,DWORD) PURE;
762         STDMETHOD(GetPrivateData)(THIS_ REFGUID,void*,DWORD*) PURE;
763         STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE;
764         STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD) PURE;
765         STDMETHOD_(DWORD,GetPriority)(THIS) PURE;
766         STDMETHOD_(void,PreLoad)(THIS) PURE;
767         STDMETHOD_(D3DRESOURCETYPE,GetType)(THIS) PURE;
768         STDMETHOD(Lock)(THIS_ UINT,UINT,void**,DWORD) PURE;
769         STDMETHOD(Unlock)(THIS) PURE;
770         STDMETHOD(GetDesc)(THIS_ D3DVERTEXBUFFER_DESC*) PURE;
771 };
772 typedef struct IDirect3DVertexBuffer9 *LPDIRECT3DVERTEXBUFFER9, *PDIRECT3DVERTEXBUFFER9;
773
774 #if !defined(__cplusplus) || defined(CINTERFACE)
775 #define IDirect3DVertexBuffer9_QueryInterface(p,a,b)    (p)->lpVtbl->QueryInterface(p,a,b)
776 #define IDirect3DVertexBuffer9_AddRef(p)        (p)->lpVtbl->AddRef(p)
777 #define IDirect3DVertexBuffer9_Release(p)       (p)->lpVtbl->Release(p)
778 #define IDirect3DVertexBuffer9_GetDevice(p,a)   (p)->lpVtbl->GetDevice(p,a)
779 #define IDirect3DVertexBuffer9_SetPrivateData(p,a,b,c,d)        (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
780 #define IDirect3DVertexBuffer9_GetPrivateData(p,a,b,c)  (p)->lpVtbl->GetPrivateData(p,a,b,c)
781 #define IDirect3DVertexBuffer9_FreePrivateData(p,a)     (p)->lpVtbl->FreePrivateData(p,a)
782 #define IDirect3DVertexBuffer9_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a)
783 #define IDirect3DVertexBuffer9_GetPriority(p)   (p)->lpVtbl->GetPriority(p)
784 #define IDirect3DVertexBuffer9_PreLoad(p)       (p)->lpVtbl->PreLoad(p)
785 #define IDirect3DVertexBuffer9_GetType(p)       (p)->lpVtbl->GetType(p)
786 #define IDirect3DVertexBuffer9_Lock(p,a,b,c,d)  (p)->lpVtbl->Lock(p,a,b,c,d)
787 #define IDirect3DVertexBuffer9_Unlock(p)        (p)->lpVtbl->Unlock(p)
788 #define IDirect3DVertexBuffer9_GetDesc(p,a)     (p)->lpVtbl->GetDesc(p,a)
789 #else
790 #define IDirect3DVertexBuffer9_QueryInterface(p,a,b)    (p)->QueryInterface(a,b)
791 #define IDirect3DVertexBuffer9_AddRef(p)        (p)->AddRef()
792 #define IDirect3DVertexBuffer9_Release(p)       (p)->Release()
793 #define IDirect3DVertexBuffer9_GetDevice(p,a)   (p)->GetDevice(a)
794 #define IDirect3DVertexBuffer9_SetPrivateData(p,a,b,c,d)        (p)->SetPrivateData(a,b,c,d)
795 #define IDirect3DVertexBuffer9_GetPrivateData(p,a,b,c)  (p)->GetPrivateData(a,b,c)
796 #define IDirect3DVertexBuffer9_FreePrivateData(p,a)     (p)->FreePrivateData(a)
797 #define IDirect3DVertexBuffer9_SetPriority(p,a) (p)->SetPriority(a)
798 #define IDirect3DVertexBuffer9_GetPriority(p)   (p)->GetPriority()
799 #define IDirect3DVertexBuffer9_PreLoad(p)       (p)->PreLoad()
800 #define IDirect3DVertexBuffer9_GetType(p)       (p)->GetType()
801 #define IDirect3DVertexBuffer9_Lock(p,a,b,c,d)  (p)->Lock(a,b,c,d)
802 #define IDirect3DVertexBuffer9_Unlock(p)        (p)->Unlock()
803 #define IDirect3DVertexBuffer9_GetDesc(p,a)     (p)->GetDesc(a)
804 #endif
805
806 #undef INTERFACE
807 #define INTERFACE IDirect3DIndexBuffer9
808 DECLARE_INTERFACE_(IDirect3DIndexBuffer9,IDirect3DResource9)
809 {
810         STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
811         STDMETHOD_(ULONG,AddRef)(THIS) PURE;
812         STDMETHOD_(ULONG,Release)(THIS) PURE;
813         STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
814         STDMETHOD(SetPrivateData)(THIS_ REFGUID,CONST void*,DWORD,DWORD) PURE;
815         STDMETHOD(GetPrivateData)(THIS_ REFGUID,void*,DWORD*) PURE;
816         STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE;
817         STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD) PURE;
818         STDMETHOD_(DWORD,GetPriority)(THIS) PURE;
819         STDMETHOD_(void,PreLoad)(THIS) PURE;
820         STDMETHOD_(D3DRESOURCETYPE,GetType)(THIS) PURE;
821         STDMETHOD(Lock)(THIS_ UINT,UINT,void**,DWORD) PURE;
822         STDMETHOD(Unlock)(THIS) PURE;
823         STDMETHOD(GetDesc)(THIS_ D3DINDEXBUFFER_DESC*) PURE;
824 };
825 typedef struct IDirect3DIndexBuffer9 *LPDIRECT3DINDEXBUFFER9, *PDIRECT3DINDEXBUFFER9;
826
827 #if !defined(__cplusplus) || defined(CINTERFACE)
828 #define IDirect3DIndexBuffer9_QueryInterface(p,a,b)     (p)->lpVtbl->QueryInterface(p,a,b)
829 #define IDirect3DIndexBuffer9_AddRef(p) (p)->lpVtbl->AddRef(p)
830 #define IDirect3DIndexBuffer9_Release(p)        (p)->lpVtbl->Release(p)
831 #define IDirect3DIndexBuffer9_GetDevice(p,a)    (p)->lpVtbl->GetDevice(p,a)
832 #define IDirect3DIndexBuffer9_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
833 #define IDirect3DIndexBuffer9_GetPrivateData(p,a,b,c)   (p)->lpVtbl->GetPrivateData(p,a,b,c)
834 #define IDirect3DIndexBuffer9_FreePrivateData(p,a)      (p)->lpVtbl->FreePrivateData(p,a)
835 #define IDirect3DIndexBuffer9_SetPriority(p,a)  (p)->lpVtbl->SetPriority(p,a)
836 #define IDirect3DIndexBuffer9_GetPriority(p)    (p)->lpVtbl->GetPriority(p)
837 #define IDirect3DIndexBuffer9_PreLoad(p)        (p)->lpVtbl->PreLoad(p)
838 #define IDirect3DIndexBuffer9_GetType(p)        (p)->lpVtbl->GetType(p)
839 #define IDirect3DIndexBuffer9_Lock(p,a,b,c,d)   (p)->lpVtbl->Lock(p,a,b,c,d)
840 #define IDirect3DIndexBuffer9_Unlock(p) (p)->lpVtbl->Unlock(p)
841 #define IDirect3DIndexBuffer9_GetDesc(p,a)      (p)->lpVtbl->GetDesc(p,a)
842 #else
843 #define IDirect3DIndexBuffer9_QueryInterface(p,a,b)     (p)->QueryInterface(a,b)
844 #define IDirect3DIndexBuffer9_AddRef(p) (p)->AddRef()
845 #define IDirect3DIndexBuffer9_Release(p)        (p)->Release()
846 #define IDirect3DIndexBuffer9_GetDevice(p,a)    (p)->GetDevice(a)
847 #define IDirect3DIndexBuffer9_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d)
848 #define IDirect3DIndexBuffer9_GetPrivateData(p,a,b,c)   (p)->GetPrivateData(a,b,c)
849 #define IDirect3DIndexBuffer9_FreePrivateData(p,a)      (p)->FreePrivateData(a)
850 #define IDirect3DIndexBuffer9_SetPriority(p,a)  (p)->SetPriority(a)
851 #define IDirect3DIndexBuffer9_GetPriority(p)    (p)->GetPriority()
852 #define IDirect3DIndexBuffer9_PreLoad(p)        (p)->PreLoad()
853 #define IDirect3DIndexBuffer9_GetType(p)        (p)->GetType()
854 #define IDirect3DIndexBuffer9_Lock(p,a,b,c,d)   (p)->Lock(a,b,c,d)
855 #define IDirect3DIndexBuffer9_Unlock(p) (p)->Unlock()
856 #define IDirect3DIndexBuffer9_GetDesc(p,a)      (p)->GetDesc(a)
857 #endif
858
859 #undef INTERFACE
860 #define INTERFACE IDirect3DBaseTexture9
861 DECLARE_INTERFACE_(IDirect3DBaseTexture9,IDirect3DResource9)
862 {
863         STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
864         STDMETHOD_(ULONG,AddRef)(THIS) PURE;
865         STDMETHOD_(ULONG,Release)(THIS) PURE;
866         STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
867         STDMETHOD(SetPrivateData)(THIS_ REFGUID,CONST void*,DWORD,DWORD) PURE;
868         STDMETHOD(GetPrivateData)(THIS_ REFGUID,void*,DWORD*) PURE;
869         STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE;
870         STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD) PURE;
871         STDMETHOD_(DWORD,GetPriority)(THIS) PURE;
872         STDMETHOD_(void,PreLoad)(THIS) PURE;
873         STDMETHOD_(D3DRESOURCETYPE,GetType)(THIS) PURE;
874         STDMETHOD_(DWORD,SetLOD)(THIS_ DWORD) PURE;
875         STDMETHOD_(DWORD,GetLOD)(THIS) PURE;
876         STDMETHOD_(DWORD,GetLevelCount)(THIS) PURE;
877         STDMETHOD(SetAutoGenFilterType)(THIS_ D3DTEXTUREFILTERTYPE) PURE;
878         STDMETHOD_(D3DTEXTUREFILTERTYPE,GetAutoGenFilterType)(THIS) PURE;
879         STDMETHOD_(void,GenerateMipSubLevels)(THIS) PURE;
880 };
881 typedef struct IDirect3DBaseTexture9 *LPDIRECT3DBASETEXTURE9, *PDIRECT3DBASETEXTURE9;
882
883 #if !defined(__cplusplus) || defined(CINTERFACE)
884 #define IDirect3DBaseTexture9_QueryInterface(p,a,b)     (p)->lpVtbl->QueryInterface(p,a,b)
885 #define IDirect3DBaseTexture9_AddRef(p) (p)->lpVtbl->AddRef(p)
886 #define IDirect3DBaseTexture9_Release(p)        (p)->lpVtbl->Release(p)
887 #define IDirect3DBaseTexture9_GetDevice(p,a)    (p)->lpVtbl->GetDevice(p,a)
888 #define IDirect3DBaseTexture9_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
889 #define IDirect3DBaseTexture9_GetPrivateData(p,a,b,c)   (p)->lpVtbl->GetPrivateData(p,a,b,c)
890 #define IDirect3DBaseTexture9_FreePrivateData(p,a)      (p)->lpVtbl->FreePrivateData(p,a)
891 #define IDirect3DBaseTexture9_SetPriority(p,a)  (p)->lpVtbl->SetPriority(p,a)
892 #define IDirect3DBaseTexture9_GetPriority(p)    (p)->lpVtbl->GetPriority(p)
893 #define IDirect3DBaseTexture9_PreLoad(p)        (p)->lpVtbl->PreLoad(p)
894 #define IDirect3DBaseTexture9_GetType(p)        (p)->lpVtbl->GetType(p)
895 #define IDirect3DBaseTexture9_SetLOD(p,a)       (p)->lpVtbl->SetLOD(p,a)
896 #define IDirect3DBaseTexture9_GetLOD(p) (p)->lpVtbl->GetLOD(p)
897 #define IDirect3DBaseTexture9_GetLevelCount(p)  (p)->lpVtbl->GetLevelCount(p)
898 #define IDirect3DBaseTexture9_SetAutoGenFilterType(p,a) (p)->lpVtbl->SetAutoGenFilterType(p,a)
899 #define IDirect3DBaseTexture9_GetAutoGenFilterType(p)   (p)->lpVtbl->GetAutoGenFilterType(p)
900 #define IDirect3DBaseTexture9_GenerateMipSubLevels(p)   (p)->lpVtbl->GenerateMipSubLevels(p)
901 #else
902 #define IDirect3DBaseTexture9_QueryInterface(p,a,b)     (p)->QueryInterface(a,b)
903 #define IDirect3DBaseTexture9_AddRef(p) (p)->AddRef()
904 #define IDirect3DBaseTexture9_Release(p)        (p)->Release()
905 #define IDirect3DBaseTexture9_GetDevice(p,a)    (p)->GetDevice(a)
906 #define IDirect3DBaseTexture9_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d)
907 #define IDirect3DBaseTexture9_GetPrivateData(p,a,b,c)   (p)->GetPrivateData(a,b,c)
908 #define IDirect3DBaseTexture9_FreePrivateData(p,a)      (p)->FreePrivateData(a)
909 #define IDirect3DBaseTexture9_SetPriority(p,a)  (p)->SetPriority(a)
910 #define IDirect3DBaseTexture9_GetPriority(p)    (p)->GetPriority()
911 #define IDirect3DBaseTexture9_PreLoad(p)        (p)->PreLoad()
912 #define IDirect3DBaseTexture9_GetType(p)        (p)->GetType()
913 #define IDirect3DBaseTexture9_SetLOD(p,a)       (p)->SetLOD(a)
914 #define IDirect3DBaseTexture9_GetLOD(p) (p)->GetLOD()
915 #define IDirect3DBaseTexture9_GetLevelCount(p)  (p)->GetLevelCount()
916 #define IDirect3DBaseTexture9_SetAutoGenFilterType(p,a) (p)->SetAutoGenFilterType(a)
917 #define IDirect3DBaseTexture9_GetAutoGenFilterType(p)   (p)->GetAutoGenFilterType()
918 #define IDirect3DBaseTexture9_GenerateMipSubLevels(p)   (p)->GenerateMipSubLevels()
919 #endif
920
921 #undef INTERFACE
922 #define INTERFACE IDirect3DCubeTexture9
923 DECLARE_INTERFACE_(IDirect3DCubeTexture9,IDirect3DBaseTexture9)
924 {
925         STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
926         STDMETHOD_(ULONG,AddRef)(THIS) PURE;
927         STDMETHOD_(ULONG,Release)(THIS) PURE;
928         STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
929         STDMETHOD(SetPrivateData)(THIS_ REFGUID,CONST void*,DWORD,DWORD) PURE;
930         STDMETHOD(GetPrivateData)(THIS_ REFGUID,void*,DWORD*) PURE;
931         STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE;
932         STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD) PURE;
933         STDMETHOD_(DWORD,GetPriority)(THIS) PURE;
934         STDMETHOD_(void,PreLoad)(THIS) PURE;
935         STDMETHOD_(D3DRESOURCETYPE,GetType)(THIS) PURE;
936         STDMETHOD_(DWORD,SetLOD)(THIS_ DWORD) PURE;
937         STDMETHOD_(DWORD,GetLOD)(THIS) PURE;
938         STDMETHOD_(DWORD,GetLevelCount)(THIS) PURE;
939         STDMETHOD(SetAutoGenFilterType)(THIS_ D3DTEXTUREFILTERTYPE) PURE;
940         STDMETHOD_(D3DTEXTUREFILTERTYPE,GetAutoGenFilterType)(THIS) PURE;
941         STDMETHOD_(void,GenerateMipSubLevels)(THIS) PURE;
942         STDMETHOD(GetLevelDesc)(THIS_ UINT,D3DSURFACE_DESC*) PURE; \
943         STDMETHOD(GetCubeMapSurface)(THIS_ D3DCUBEMAP_FACES,UINT,IDirect3DSurface9**) PURE; \
944         STDMETHOD(LockRect)(THIS_ D3DCUBEMAP_FACES,UINT,D3DLOCKED_RECT*,CONST RECT*,DWORD) PURE; \
945         STDMETHOD(UnlockRect)(THIS_ D3DCUBEMAP_FACES,UINT) PURE; \
946         STDMETHOD(AddDirtyRect)(THIS_ D3DCUBEMAP_FACES,CONST RECT*) PURE;
947 };
948 typedef struct IDirect3DCubeTexture9 *LPDIRECT3DCUBETEXTURE9, *PDIRECT3DCUBETEXTURE9;
949
950 #if !defined(__cplusplus) || defined(CINTERFACE)
951 #define IDirect3DCubeTexture9_QueryInterface(p,a,b)     (p)->lpVtbl->QueryInterface(p,a,b)
952 #define IDirect3DCubeTexture9_AddRef(p) (p)->lpVtbl->AddRef(p)
953 #define IDirect3DCubeTexture9_Release(p)        (p)->lpVtbl->Release(p)
954 #define IDirect3DCubeTexture9_GetDevice(p,a)    (p)->lpVtbl->GetDevice(p,a)
955 #define IDirect3DCubeTexture9_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
956 #define IDirect3DCubeTexture9_GetPrivateData(p,a,b,c)   (p)->lpVtbl->GetPrivateData(p,a,b,c)
957 #define IDirect3DCubeTexture9_FreePrivateData(p,a)      (p)->lpVtbl->FreePrivateData(p,a)
958 #define IDirect3DCubeTexture9_SetPriority(p,a)  (p)->lpVtbl->SetPriority(p,a)
959 #define IDirect3DCubeTexture9_GetPriority(p)    (p)->lpVtbl->GetPriority(p)
960 #define IDirect3DCubeTexture9_PreLoad(p)        (p)->lpVtbl->PreLoad(p)
961 #define IDirect3DCubeTexture9_GetType(p)        (p)->lpVtbl->GetType(p)
962 #define IDirect3DCubeTexture9_SetLOD(p,a)       (p)->lpVtbl->SetLOD(p,a)
963 #define IDirect3DCubeTexture9_GetLOD(p) (p)->lpVtbl->GetLOD(p)
964 #define IDirect3DCubeTexture9_GetLevelCount(p)  (p)->lpVtbl->GetLevelCount(p)
965 #define IDirect3DCubeTexture9_SetAutoGenFilterType(p,a) (p)->lpVtbl->SetAutoGenFilterType(p,a)
966 #define IDirect3DCubeTexture9_GetAutoGenFilterType(p)   (p)->lpVtbl->GetAutoGenFilterType(p)
967 #define IDirect3DCubeTexture9_GenerateMipSubLevels(p)   (p)->lpVtbl->GenerateMipSubLevels(p)
968 #define IDirect3DCubeTexture9_GetLevelDesc(p,a,b)       (p)->lpVtbl->GetLevelDesc(p,a,b)
969 #define IDirect3DCubeTexture9_GetCubeMapSurface(p,a,b,c)        (p)->lpVtbl->GetCubeMapSurface(p,a,b,c)
970 #define IDirect3DCubeTexture9_LockRect(p,a,b,c,d,e)     (p)->lpVtbl->LockRect(p,a,b,c,d,e)
971 #define IDirect3DCubeTexture9_UnlockRect(p,a,b) (p)->lpVtbl->UnlockRect(p,a,b)
972 #define IDirect3DCubeTexture9_AddDirtyRect(p,a,b)       (p)->lpVtbl->AddDirtyRect(p,a,b)
973 #else
974 #define IDirect3DCubeTexture9_QueryInterface(p,a,b)     (p)->QueryInterface(a,b)
975 #define IDirect3DCubeTexture9_AddRef(p) (p)->AddRef()
976 #define IDirect3DCubeTexture9_Release(p)        (p)->Release()
977 #define IDirect3DCubeTexture9_GetDevice(p,a)    (p)->GetDevice(a)
978 #define IDirect3DCubeTexture9_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d)
979 #define IDirect3DCubeTexture9_GetPrivateData(p,a,b,c)   (p)->GetPrivateData(a,b,c)
980 #define IDirect3DCubeTexture9_FreePrivateData(p,a)      (p)->FreePrivateData(a)
981 #define IDirect3DCubeTexture9_SetPriority(p,a)  (p)->SetPriority(a)
982 #define IDirect3DCubeTexture9_GetPriority(p)    (p)->GetPriority()
983 #define IDirect3DCubeTexture9_PreLoad(p)        (p)->PreLoad()
984 #define IDirect3DCubeTexture9_GetType(p)        (p)->GetType()
985 #define IDirect3DCubeTexture9_SetLOD(p,a)       (p)->SetLOD(a)
986 #define IDirect3DCubeTexture9_GetLOD(p) (p)->GetLOD()
987 #define IDirect3DCubeTexture9_GetLevelCount(p)  (p)->GetLevelCount()
988 #define IDirect3DCubeTexture9_SetAutoGenFilterType(p,a) (p)->SetAutoGenFilterType(a)
989 #define IDirect3DCubeTexture9_GetAutoGenFilterType(p)   (p)->GetAutoGenFilterType()
990 #define IDirect3DCubeTexture9_GenerateMipSubLevels(p)   (p)->GenerateMipSubLevels()
991 #define IDirect3DCubeTexture9_GetLevelDesc(p,a,b)       (p)->GetLevelDesc(a,b)
992 #define IDirect3DCubeTexture9_GetCubeMapSurface(p,a,b,c)        (p)->GetCubeMapSurface(a,b,c)
993 #define IDirect3DCubeTexture9_LockRect(p,a,b,c,d,e)     (p)->LockRect(a,b,c,d,e)
994 #define IDirect3DCubeTexture9_UnlockRect(p,a,b) (p)->UnlockRect(a,b)
995 #define IDirect3DCubeTexture9_AddDirtyRect(p,a,b)       (p)->AddDirtyRect(a,b)
996 #endif
997
998 #undef INTERFACE
999 #define INTERFACE IDirect3DTexture9
1000 DECLARE_INTERFACE_(IDirect3DTexture9,IDirect3DBaseTexture9)
1001 {
1002         STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
1003         STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1004         STDMETHOD_(ULONG,Release)(THIS) PURE;
1005         STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
1006         STDMETHOD(SetPrivateData)(THIS_ REFGUID,CONST void*,DWORD,DWORD) PURE;
1007         STDMETHOD(GetPrivateData)(THIS_ REFGUID,void*,DWORD*) PURE;
1008         STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE;
1009         STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD) PURE;
1010         STDMETHOD_(DWORD,GetPriority)(THIS) PURE;
1011         STDMETHOD_(void,PreLoad)(THIS) PURE;
1012         STDMETHOD_(D3DRESOURCETYPE,GetType)(THIS) PURE;
1013         STDMETHOD_(DWORD,SetLOD)(THIS_ DWORD) PURE;
1014         STDMETHOD_(DWORD,GetLOD)(THIS) PURE;
1015         STDMETHOD_(DWORD,GetLevelCount)(THIS) PURE;
1016         STDMETHOD(SetAutoGenFilterType)(THIS_ D3DTEXTUREFILTERTYPE) PURE;
1017         STDMETHOD_(D3DTEXTUREFILTERTYPE,GetAutoGenFilterType)(THIS) PURE;
1018         STDMETHOD_(void,GenerateMipSubLevels)(THIS) PURE;
1019         STDMETHOD(GetLevelDesc)(THIS_ UINT,D3DSURFACE_DESC*) PURE;
1020         STDMETHOD(GetSurfaceLevel)(THIS_ UINT,IDirect3DSurface9**) PURE;
1021         STDMETHOD(LockRect)(THIS_ UINT,D3DLOCKED_RECT*,CONST RECT*,DWORD) PURE;
1022         STDMETHOD(UnlockRect)(THIS_ UINT) PURE;
1023         STDMETHOD(AddDirtyRect)(THIS_ CONST RECT*) PURE;
1024 };
1025 typedef struct IDirect3DTexture9 *LPDIRECT3DTEXTURE9, *PDIRECT3DTEXTURE9;
1026
1027 #if !defined(__cplusplus) || defined(CINTERFACE)
1028 #define IDirect3DTexture9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1029 #define IDirect3DTexture9_AddRef(p)     (p)->lpVtbl->AddRef(p)
1030 #define IDirect3DTexture9_Release(p)    (p)->lpVtbl->Release(p)
1031 #define IDirect3DTexture9_GetDevice(p,a)        (p)->lpVtbl->GetDevice(p,a)
1032 #define IDirect3DTexture9_SetPrivateData(p,a,b,c,d)     (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
1033 #define IDirect3DTexture9_GetPrivateData(p,a,b,c)       (p)->lpVtbl->GetPrivateData(p,a,b,c)
1034 #define IDirect3DTexture9_FreePrivateData(p,a)  (p)->lpVtbl->FreePrivateData(p,a)
1035 #define IDirect3DTexture9_SetPriority(p,a)      (p)->lpVtbl->SetPriority(p,a)
1036 #define IDirect3DTexture9_GetPriority(p)        (p)->lpVtbl->GetPriority(p)
1037 #define IDirect3DTexture9_PreLoad(p)    (p)->lpVtbl->PreLoad(p)
1038 #define IDirect3DTexture9_GetType(p)    (p)->lpVtbl->GetType(p)
1039 #define IDirect3DTexture9_SetLOD(p,a)   (p)->lpVtbl->SetLOD(p,a)
1040 #define IDirect3DTexture9_GetLOD(p)     (p)->lpVtbl->GetLOD(p)
1041 #define IDirect3DTexture9_GetLevelCount(p)      (p)->lpVtbl->GetLevelCount(p)
1042 #define IDirect3DTexture9_SetAutoGenFilterType(p,a)     (p)->lpVtbl->SetAutoGenFilterType(p,a)
1043 #define IDirect3DTexture9_GetAutoGenFilterType(p)       (p)->lpVtbl->GetAutoGenFilterType(p)
1044 #define IDirect3DTexture9_GenerateMipSubLevels(p)       (p)->lpVtbl->GenerateMipSubLevels(p)
1045 #define IDirect3DTexture9_GetLevelDesc(p,a,b)   (p)->lpVtbl->GetLevelDesc(p,a,b)
1046 #define IDirect3DTexture9_GetSurfaceLevel(p,a,b)        (p)->lpVtbl->GetSurfaceLevel(p,a,b)
1047 #define IDirect3DTexture9_LockRect(p,a,b,c,d)   (p)->lpVtbl->LockRect(p,a,b,c,d)
1048 #define IDirect3DTexture9_UnlockRect(p,a)       (p)->lpVtbl->UnlockRect(p,a)
1049 #define IDirect3DTexture9_AddDirtyRect(p,a)     (p)->lpVtbl->AddDirtyRect(p,a)
1050 #else
1051 #define IDirect3DTexture9_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1052 #define IDirect3DTexture9_AddRef(p)     (p)->AddRef()
1053 #define IDirect3DTexture9_Release(p)    (p)->Release()
1054 #define IDirect3DTexture9_GetDevice(p,a)        (p)->GetDevice(a)
1055 #define IDirect3DTexture9_SetPrivateData(p,a,b,c,d)     (p)->SetPrivateData(a,b,c,d)
1056 #define IDirect3DTexture9_GetPrivateData(p,a,b,c)       (p)->GetPrivateData(a,b,c)
1057 #define IDirect3DTexture9_FreePrivateData(p,a)  (p)->FreePrivateData(a)
1058 #define IDirect3DTexture9_SetPriority(p,a)      (p)->SetPriority(a)
1059 #define IDirect3DTexture9_GetPriority(p)        (p)->GetPriority()
1060 #define IDirect3DTexture9_PreLoad(p)    (p)->PreLoad()
1061 #define IDirect3DTexture9_GetType(p)    (p)->GetType()
1062 #define IDirect3DTexture9_SetLOD(p,a)   (p)->SetLOD(a)
1063 #define IDirect3DTexture9_GetLOD(p)     (p)->GetLOD()
1064 #define IDirect3DTexture9_GetLevelCount(p)      (p)->GetLevelCount()
1065 #define IDirect3DTexture9_SetAutoGenFilterType(p,a)     (p)->SetAutoGenFilterType(a)
1066 #define IDirect3DTexture9_GetAutoGenFilterType(p)       (p)->GetAutoGenFilterType()
1067 #define IDirect3DTexture9_GenerateMipSubLevels(p)       (p)->GenerateMipSubLevels()
1068 #define IDirect3DTexture9_GetLevelDesc(p,a,b)   (p)->GetLevelDesc(a,b)
1069 #define IDirect3DTexture9_GetSurfaceLevel(p,a,b)        (p)->GetSurfaceLevel(a,b)
1070 #define IDirect3DTexture9_LockRect(p,a,b,c,d)   (p)->LockRect(a,b,c,d)
1071 #define IDirect3DTexture9_UnlockRect(p,a)       (p)->UnlockRect(a)
1072 #define IDirect3DTexture9_AddDirtyRect(p,a)     (p)->AddDirtyRect(a)
1073 #endif
1074
1075 #undef INTERFACE
1076 #define INTERFACE IDirect3DVolumeTexture9
1077 DECLARE_INTERFACE_(IDirect3DVolumeTexture9,IDirect3DBaseTexture9)
1078 {
1079         STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
1080         STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1081         STDMETHOD_(ULONG,Release)(THIS) PURE;
1082         STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
1083         STDMETHOD(SetPrivateData)(THIS_ REFGUID,CONST void*,DWORD,DWORD) PURE;
1084         STDMETHOD(GetPrivateData)(THIS_ REFGUID,void*,DWORD*) PURE;
1085         STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE;
1086         STDMETHOD_(DWORD,SetPriority)(THIS_ DWORD) PURE;
1087         STDMETHOD_(DWORD,GetPriority)(THIS) PURE;
1088         STDMETHOD_(void,PreLoad)(THIS) PURE;
1089         STDMETHOD_(D3DRESOURCETYPE,GetType)(THIS) PURE;
1090         STDMETHOD_(DWORD,SetLOD)(THIS_ DWORD) PURE;
1091         STDMETHOD_(DWORD,GetLOD)(THIS) PURE;
1092         STDMETHOD_(DWORD,GetLevelCount)(THIS) PURE;
1093         STDMETHOD(SetAutoGenFilterType)(THIS_ D3DTEXTUREFILTERTYPE) PURE;
1094         STDMETHOD_(D3DTEXTUREFILTERTYPE,GetAutoGenFilterType)(THIS) PURE;
1095         STDMETHOD_(void,GenerateMipSubLevels)(THIS) PURE;
1096     STDMETHOD(GetLevelDesc)(THIS_ UINT,D3DVOLUME_DESC*) PURE;
1097     STDMETHOD(GetVolumeLevel)(THIS_ UINT,IDirect3DVolume9**) PURE;
1098     STDMETHOD(LockBox)(THIS_ UINT,D3DLOCKED_BOX*,CONST D3DBOX*,DWORD) PURE;
1099     STDMETHOD(UnlockBox)(THIS_ UINT) PURE;
1100     STDMETHOD(AddDirtyBox)(THIS_ CONST D3DBOX*) PURE;
1101 };
1102 typedef struct IDirect3DVolumeTexture9 *LPDIRECT3DVOLUMETEXTURE9, *PDIRECT3DVOLUMETEXTURE9;
1103
1104 #if !defined(__cplusplus) || defined(CINTERFACE)
1105 #define IDirect3DVolumeTexture9_QueryInterface(p,a,b)   (p)->lpVtbl->QueryInterface(p,a,b)
1106 #define IDirect3DVolumeTexture9_AddRef(p)       (p)->lpVtbl->AddRef(p)
1107 #define IDirect3DVolumeTexture9_Release(p)      (p)->lpVtbl->Release(p)
1108 #define IDirect3DVolumeTexture9_GetDevice(p,a)  (p)->lpVtbl->GetDevice(p,a)
1109 #define IDirect3DVolumeTexture9_SetPrivateData(p,a,b,c,d)       (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
1110 #define IDirect3DVolumeTexture9_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c)
1111 #define IDirect3DVolumeTexture9_FreePrivateData(p,a)    (p)->lpVtbl->FreePrivateData(p,a)
1112 #define IDirect3DVolumeTexture9_SetPriority(p,a)        (p)->lpVtbl->SetPriority(p,a)
1113 #define IDirect3DVolumeTexture9_GetPriority(p)  (p)->lpVtbl->GetPriority(p)
1114 #define IDirect3DVolumeTexture9_PreLoad(p)      (p)->lpVtbl->PreLoad(p)
1115 #define IDirect3DVolumeTexture9_GetType(p)      (p)->lpVtbl->GetType(p)
1116 #define IDirect3DVolumeTexture9_SetLOD(p,a)     (p)->lpVtbl->SetLOD(p,a)
1117 #define IDirect3DVolumeTexture9_GetLOD(p)       (p)->lpVtbl->GetLOD(p)
1118 #define IDirect3DVolumeTexture9_GetLevelCount(p)        (p)->lpVtbl->GetLevelCount(p)
1119 #define IDirect3DVolumeTexture9_SetAutoGenFilterType(p,a)       (p)->lpVtbl->SetAutoGenFilterType(p,a)
1120 #define IDirect3DVolumeTexture9_GetAutoGenFilterType(p) (p)->lpVtbl->GetAutoGenFilterType(p)
1121 #define IDirect3DVolumeTexture9_GenerateMipSubLevels(p) (p)->lpVtbl->GenerateMipSubLevels(p)
1122 #define IDirect3DVolumeTexture9_GetLevelDesc(p,a,b)     (p)->lpVtbl->GetLevelDesc(p,a,b)
1123 #define IDirect3DVolumeTexture9_GetVolumeLevel(p,a,b)   (p)->lpVtbl->GetVolumeLevel(p,a,b)
1124 #define IDirect3DVolumeTexture9_LockBox(p,a,b,c,d)      (p)->lpVtbl->LockBox(p,a,b,c,d)
1125 #define IDirect3DVolumeTexture9_UnlockBox(p,a)  (p)->lpVtbl->UnlockBox(p,a)
1126 #define IDirect3DVolumeTexture9_AddDirtyBox(p,a)        (p)->lpVtbl->AddDirtyBox(p,a)
1127 #else
1128 #define IDirect3DVolumeTexture9_QueryInterface(p,a,b)   (p)->QueryInterface(a,b)
1129 #define IDirect3DVolumeTexture9_AddRef(p)       (p)->AddRef()
1130 #define IDirect3DVolumeTexture9_Release(p)      (p)->Release()
1131 #define IDirect3DVolumeTexture9_GetDevice(p,a)  (p)->GetDevice(a)
1132 #define IDirect3DVolumeTexture9_SetPrivateData(p,a,b,c,d)       (p)->SetPrivateData(a,b,c,d)
1133 #define IDirect3DVolumeTexture9_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c)
1134 #define IDirect3DVolumeTexture9_FreePrivateData(p,a)    (p)->FreePrivateData(a)
1135 #define IDirect3DVolumeTexture9_SetPriority(p,a)        (p)->SetPriority(a)
1136 #define IDirect3DVolumeTexture9_GetPriority(p)  (p)->GetPriority()
1137 #define IDirect3DVolumeTexture9_PreLoad(p)      (p)->PreLoad()
1138 #define IDirect3DVolumeTexture9_GetType(p)      (p)->GetType()
1139 #define IDirect3DVolumeTexture9_SetLOD(p,a)     (p)->SetLOD(a)
1140 #define IDirect3DVolumeTexture9_GetLOD(p)       (p)->GetLOD()
1141 #define IDirect3DVolumeTexture9_GetLevelCount(p)        (p)->GetLevelCount()
1142 #define IDirect3DVolumeTexture9_SetAutoGenFilterType(p,a)       (p)->SetAutoGenFilterType(a)
1143 #define IDirect3DVolumeTexture9_GetAutoGenFilterType(p) (p)->GetAutoGenFilterType()
1144 #define IDirect3DVolumeTexture9_GenerateMipSubLevels(p) (p)->GenerateMipSubLevels()
1145 #define IDirect3DVolumeTexture9_GetLevelDesc(p,a,b)     (p)->GetLevelDesc(a,b)
1146 #define IDirect3DVolumeTexture9_GetVolumeLevel(p,a,b)   (p)->GetVolumeLevel(a,b)
1147 #define IDirect3DVolumeTexture9_LockBox(p,a,b,c,d)      (p)->LockBox(a,b,c,d)
1148 #define IDirect3DVolumeTexture9_UnlockBox(p,a)  (p)->UnlockBox(a)
1149 #define IDirect3DVolumeTexture9_AddDirtyBox(p,a)        (p)->AddDirtyBox(a)
1150 #endif
1151
1152 #undef INTERFACE
1153 #define INTERFACE IDirect3DVertexDeclaration9
1154 DECLARE_INTERFACE_(IDirect3DVertexDeclaration9,IUnknown)
1155 {
1156         STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
1157         STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1158         STDMETHOD_(ULONG,Release)(THIS) PURE;
1159         STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
1160         STDMETHOD(GetDeclaration)(THIS_ D3DVERTEXELEMENT9*,UINT*) PURE;
1161 };
1162 typedef struct IDirect3DVertexDeclaration9 *LPDIRECT3DVERTEXDECLARATION9, *PDIRECT3DVERTEXDECLARATION9;
1163
1164 #if !defined(__cplusplus) || defined(CINTERFACE)
1165 #define IDirect3DVertexDeclaration9_QueryInterface(p,a,b)       (p)->lpVtbl->QueryInterface(p,a,b)
1166 #define IDirect3DVertexDeclaration9_AddRef(p)   (p)->lpVtbl->AddRef(p)
1167 #define IDirect3DVertexDeclaration9_Release(p)  (p)->lpVtbl->Release(p)
1168 #define IDirect3DVertexDeclaration9_GetDevice(p,a)      (p)->lpVtbl->GetDevice(p,a)
1169 #define IDirect3DVertexDeclaration9_GetDeclaration(p,a,b)       (p)->lpVtbl->GetDeclaration(p,a,b)
1170 #else
1171 #define IDirect3DVertexDeclaration9_QueryInterface(p,a,b)       (p)->QueryInterface(a,b)
1172 #define IDirect3DVertexDeclaration9_AddRef(p)   (p)->AddRef()
1173 #define IDirect3DVertexDeclaration9_Release(p)  (p)->Release()
1174 #define IDirect3DVertexDeclaration9_GetDevice(p,a)      (p)->GetDevice(a)
1175 #define IDirect3DVertexDeclaration9_GetDeclaration(p,a,b)       (p)->GetDeclaration(a,b)
1176 #endif
1177
1178 #undef INTERFACE
1179 #define INTERFACE IDirect3DVertexShader9
1180 DECLARE_INTERFACE_(IDirect3DVertexShader9,IUnknown)
1181 {
1182         STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
1183         STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1184         STDMETHOD_(ULONG,Release)(THIS) PURE;
1185         STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
1186         STDMETHOD(GetFunction)(THIS_ void*,UINT*) PURE;
1187 };
1188 typedef struct IDirect3DVertexShader9 *LPDIRECT3DVERTEXSHADER9, *PDIRECT3DVERTEXSHADER9;
1189
1190 #if !defined(__cplusplus) || defined(CINTERFACE)
1191 #define IDirect3DVertexShader9_QueryInterface(p,a,b)    (p)->lpVtbl->QueryInterface(p,a,b)
1192 #define IDirect3DVertexShader9_AddRef(p)        (p)->lpVtbl->AddRef(p)
1193 #define IDirect3DVertexShader9_Release(p)       (p)->lpVtbl->Release(p)
1194 #define IDirect3DVertexShader9_GetDevice(p,a)   (p)->lpVtbl->GetDevice(p,a)
1195 #define IDirect3DVertexShader9_GetFunction(p,a,b)       (p)->lpVtbl->GetFunction(p,a,b)
1196 #else
1197 #define IDirect3DVertexShader9_QueryInterface(p,a,b)    (p)->QueryInterface(a,b)
1198 #define IDirect3DVertexShader9_AddRef(p)        (p)->AddRef()
1199 #define IDirect3DVertexShader9_Release(p)       (p)->Release()
1200 #define IDirect3DVertexShader9_GetDevice(p,a)   (p)->GetDevice(a)
1201 #define IDirect3DVertexShader9_GetFunction(p,a,b)       (p)->GetFunction(a,b)
1202 #endif
1203
1204 #undef INTERFACE
1205 #define INTERFACE IDirect3DPixelShader9
1206 DECLARE_INTERFACE_(IDirect3DPixelShader9,IUnknown)
1207 {
1208         STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
1209         STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1210         STDMETHOD_(ULONG,Release)(THIS) PURE;
1211         STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
1212         STDMETHOD(GetFunction)(THIS_ void*,UINT*) PURE;
1213 };
1214 typedef struct IDirect3DPixelShader9 *LPDIRECT3DPIXELSHADER9, *PDIRECT3DPIXELSHADER9;
1215
1216 #if !defined(__cplusplus) || defined(CINTERFACE)
1217 #define IDirect3DPixelShader9_QueryInterface(p,a,b)     (p)->lpVtbl->QueryInterface(p,a,b)
1218 #define IDirect3DPixelShader9_AddRef(p) (p)->lpVtbl->AddRef(p)
1219 #define IDirect3DPixelShader9_Release(p)        (p)->lpVtbl->Release(p)
1220 #define IDirect3DPixelShader9_GetDevice(p,a)    (p)->lpVtbl->GetDevice(p,a)
1221 #define IDirect3DPixelShader9_GetFunction(p,a,b)        (p)->lpVtbl->GetFunction(p,a,b)
1222 #else
1223 #define IDirect3DPixelShader9_QueryInterface(p,a,b)     (p)->QueryInterface(a,b)
1224 #define IDirect3DPixelShader9_AddRef(p) (p)->AddRef()
1225 #define IDirect3DPixelShader9_Release(p)        (p)->Release()
1226 #define IDirect3DPixelShader9_GetDevice(p,a)    (p)->GetDevice(a)
1227 #define IDirect3DPixelShader9_GetFunction(p,a,b)        (p)->GetFunction(a,b)
1228 #endif
1229
1230 #undef INTERFACE
1231 #define INTERFACE IDirect3DStateBlock9
1232 DECLARE_INTERFACE_(IDirect3DStateBlock9,IUnknown)
1233 {
1234         STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
1235         STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1236         STDMETHOD_(ULONG,Release)(THIS) PURE;
1237         STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
1238         STDMETHOD(Capture)(THIS) PURE;
1239         STDMETHOD(Apply)(THIS) PURE;
1240 };
1241 typedef struct IDirect3DStateBlock9 *LPDIRECT3DSTATEBLOCK9, *PDIRECT3DSTATEBLOCK9;
1242
1243 #if !defined(__cplusplus) || defined(CINTERFACE)
1244 #define IDirect3DStateBlock9_QueryInterface(p,a,b)      (p)->lpVtbl->QueryInterface(p,a,b)
1245 #define IDirect3DStateBlock9_AddRef(p)  (p)->lpVtbl->AddRef(p)
1246 #define IDirect3DStateBlock9_Release(p) (p)->lpVtbl->Release(p)
1247 #define IDirect3DStateBlock9_GetDevice(p,a)     (p)->lpVtbl->GetDevice(p,a)
1248 #define IDirect3DStateBlock9_Capture(p) (p)->lpVtbl->Capture(p)
1249 #define IDirect3DStateBlock9_Apply(p)   (p)->lpVtbl->Apply(p)
1250 #else
1251 #define IDirect3DStateBlock9_QueryInterface(p,a,b)      (p)->QueryInterface(a,b)
1252 #define IDirect3DStateBlock9_AddRef(p)  (p)->AddRef()
1253 #define IDirect3DStateBlock9_Release(p) (p)->Release()
1254 #define IDirect3DStateBlock9_GetDevice(p,a)     (p)->GetDevice(a)
1255 #define IDirect3DStateBlock9_Capture(p) (p)->Capture()
1256 #define IDirect3DStateBlock9_Apply(p)   (p)->Apply()
1257 #endif
1258
1259 #undef INTERFACE
1260 #define INTERFACE IDirect3DQuery9
1261 DECLARE_INTERFACE_(IDirect3DQuery9,IUnknown)
1262 {
1263         STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
1264         STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1265         STDMETHOD_(ULONG,Release)(THIS) PURE;
1266         STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9**) PURE;
1267         STDMETHOD_(D3DQUERYTYPE, GetType)(THIS) PURE;
1268         STDMETHOD_(DWORD, GetDataSize)(THIS) PURE;
1269         STDMETHOD(Issue)(THIS_ DWORD) PURE;
1270         STDMETHOD(GetData)(THIS_ void*,DWORD,DWORD) PURE;
1271 };
1272 typedef struct IDirect3DQuery9 *LPDIRECT3DQUERY9, *PDIRECT3DQUERY9;
1273
1274 #if !defined(__cplusplus) || defined(CINTERFACE)
1275 #define IDirect3DQuery9_QueryInterface(p,a,b)   (p)->lpVtbl->QueryInterface(p,a,b)
1276 #define IDirect3DQuery9_AddRef(p)       (p)->lpVtbl->AddRef(p)
1277 #define IDirect3DQuery9_Release(p)      (p)->lpVtbl->Release(p)
1278 #define IDirect3DQuery9_GetDevice(p,a)  (p)->lpVtbl->GetDevice(p,a)
1279 #define IDirect3DQuery9_GetType(p)      (p)->lpVtbl->GetType(p)
1280 #define IDirect3DQuery9_GetDataSize(p)  (p)->lpVtbl->GetDataSize(p)
1281 #define IDirect3DQuery9_Issue(p,a)      (p)->lpVtbl->Issue(p,a)
1282 #define IDirect3DQuery9_GetData(p,a,b,c)        (p)->lpVtbl->GetData(p,a,b,c)
1283 #else
1284 #define IDirect3DQuery9_QueryInterface(p,a,b)   (p)->QueryInterface(a,b)
1285 #define IDirect3DQuery9_AddRef(p)       (p)->AddRef()
1286 #define IDirect3DQuery9_Release(p)      (p)->Release()
1287 #define IDirect3DQuery9_GetDevice(p,a)  (p)->GetDevice(a)
1288 #define IDirect3DQuery9_GetType(p)      (p)->GetType()
1289 #define IDirect3DQuery9_GetDataSize(p)  (p)->GetDataSize()
1290 #define IDirect3DQuery9_Issue(p,a)      (p)->Issue(a)
1291 #define IDirect3DQuery9_GetData(p,a,b,c)        (p)->GetData(a,b,c)
1292 #endif
1293
1294 #ifdef __cplusplus
1295 extern "C" IDirect3D9* WINAPI Direct3DCreate9(UINT SDKVersion);
1296 #else
1297 extern IDirect3D9* WINAPI Direct3DCreate9(UINT SDKVersion);
1298 #endif
1299
1300 #endif /* (DIRECT3D_VERSION >= 0x0900) */
1301
1302 #endif