OSDN Git Service

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