1#undef INTERFACE
2/*
3 * Copyright (C) 2002-2003 Jason Edmeades
4 *                         Raphael Junqueira
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#ifndef __WINE_D3D9_H
22#define __WINE_D3D9_H
23
24#ifndef DIRECT3D_VERSION
25#define DIRECT3D_VERSION  0x0900
26#endif
27
28#include <stdlib.h>
29
30#define COM_NO_WINDOWS_H
31#include <objbase.h>
32#include <windows.h>
33#include <d3d9types.h>
34#include <d3d9caps.h>
35
36/*****************************************************************************
37 * Behavior Flags for IDirect3D8::CreateDevice
38 */
39#define D3DCREATE_FPU_PRESERVE                  __MSABI_LONG(0x00000002)
40#define D3DCREATE_MULTITHREADED                 __MSABI_LONG(0x00000004)
41#define D3DCREATE_PUREDEVICE                    __MSABI_LONG(0x00000010)
42#define D3DCREATE_SOFTWARE_VERTEXPROCESSING     __MSABI_LONG(0x00000020)
43#define D3DCREATE_HARDWARE_VERTEXPROCESSING     __MSABI_LONG(0x00000040)
44#define D3DCREATE_MIXED_VERTEXPROCESSING        __MSABI_LONG(0x00000080)
45#define D3DCREATE_DISABLE_DRIVER_MANAGEMENT     __MSABI_LONG(0x00000100)
46#define D3DCREATE_ADAPTERGROUP_DEVICE           __MSABI_LONG(0x00000200)
47#define D3DCREATE_DISABLE_DRIVER_MANAGEMENT_EX  __MSABI_LONG(0x00000400)
48#define D3DCREATE_NOWINDOWCHANGES               __MSABI_LONG(0x00000800)
49#define D3DCREATE_DISABLE_PSGP_THREADING        __MSABI_LONG(0x00002000)
50#define D3DCREATE_ENABLE_PRESENTSTATS           __MSABI_LONG(0x00004000)
51#define D3DCREATE_DISABLE_PRINTSCREEN           __MSABI_LONG(0x00008000)
52#define D3DCREATE_SCREENSAVER                   __MSABI_LONG(0x10000000)
53
54/*****************************************************************************
55 * Flags for SetPrivateData
56 */
57#define D3DSPD_IUNKNOWN                         __MSABI_LONG(0x00000001)
58
59
60/*****************************************************************************
61 * #defines and error codes
62 */
63#define D3D_SDK_VERSION                         32
64#define D3DADAPTER_DEFAULT                      0
65#define D3DENUM_NO_WHQL_LEVEL                   __MSABI_LONG(0x00000002)
66#define D3DPRESENT_BACK_BUFFERS_MAX             __MSABI_LONG(3)
67#define D3DSGR_NO_CALIBRATION                   __MSABI_LONG(0x00000000)
68#define D3DSGR_CALIBRATE                        __MSABI_LONG(0x00000001)
69
70#define _FACD3D  0x876
71#define MAKE_D3DHRESULT( code )                 MAKE_HRESULT( 1, _FACD3D, code )
72#define MAKE_D3DSTATUS( code )                  MAKE_HRESULT( 0, _FACD3D, code )
73
74/*****************************************************************************
75 * Direct3D Errors
76 */
77#define D3D_OK                                  S_OK
78#define D3DERR_WRONGTEXTUREFORMAT               MAKE_D3DHRESULT(2072)
79#define D3DERR_UNSUPPORTEDCOLOROPERATION        MAKE_D3DHRESULT(2073)
80#define D3DERR_UNSUPPORTEDCOLORARG              MAKE_D3DHRESULT(2074)
81#define D3DERR_UNSUPPORTEDALPHAOPERATION        MAKE_D3DHRESULT(2075)
82#define D3DERR_UNSUPPORTEDALPHAARG              MAKE_D3DHRESULT(2076)
83#define D3DERR_TOOMANYOPERATIONS                MAKE_D3DHRESULT(2077)
84#define D3DERR_CONFLICTINGTEXTUREFILTER         MAKE_D3DHRESULT(2078)
85#define D3DERR_UNSUPPORTEDFACTORVALUE           MAKE_D3DHRESULT(2079)
86#define D3DERR_CONFLICTINGRENDERSTATE           MAKE_D3DHRESULT(2081)
87#define D3DERR_UNSUPPORTEDTEXTUREFILTER         MAKE_D3DHRESULT(2082)
88#define D3DERR_CONFLICTINGTEXTUREPALETTE        MAKE_D3DHRESULT(2086)
89#define D3DERR_DRIVERINTERNALERROR              MAKE_D3DHRESULT(2087)
90#define D3DERR_NOTFOUND                         MAKE_D3DHRESULT(2150)
91#define D3DERR_MOREDATA                         MAKE_D3DHRESULT(2151)
92#define D3DERR_DEVICELOST                       MAKE_D3DHRESULT(2152)
93#define D3DERR_DEVICENOTRESET                   MAKE_D3DHRESULT(2153)
94#define D3DERR_NOTAVAILABLE                     MAKE_D3DHRESULT(2154)
95#define D3DERR_OUTOFVIDEOMEMORY                 MAKE_D3DHRESULT(380)
96#define D3DERR_INVALIDDEVICE                    MAKE_D3DHRESULT(2155)
97#define D3DERR_INVALIDCALL                      MAKE_D3DHRESULT(2156)
98#define D3DERR_DRIVERINVALIDCALL                MAKE_D3DHRESULT(2157)
99#define D3DERR_WASSTILLDRAWING                  MAKE_D3DHRESULT(540)
100#define D3DOK_NOAUTOGEN                         MAKE_D3DSTATUS(2159)
101
102#define D3DERR_DEVICEREMOVED                    MAKE_D3DHRESULT(2160)
103#define D3DERR_DEVICEHUNG                       MAKE_D3DHRESULT(2164)
104#define S_NOT_RESIDENT                          MAKE_D3DSTATUS(2165)
105#define S_RESIDENT_IN_SHARED_MEMORY             MAKE_D3DSTATUS(2166)
106#define S_PRESENT_MODE_CHANGED                  MAKE_D3DSTATUS(2167)
107#define S_PRESENT_OCCLUDED                      MAKE_D3DSTATUS(2168)
108#define D3DERR_UNSUPPORTEDOVERLAY               MAKE_D3DHRESULT(2171)
109#define D3DERR_UNSUPPORTEDOVERLAYFORMAT         MAKE_D3DHRESULT(2172)
110#define D3DERR_CANNOTPROTECTCONTENT             MAKE_D3DHRESULT(2173)
111#define D3DERR_UNSUPPORTEDCRYPTO                MAKE_D3DHRESULT(2174)
112#define D3DERR_PRESENT_STATISTICS_DISJOINT      MAKE_D3DHRESULT(2180)
113
114
115/*****************************************************************************
116 * Predeclare the interfaces
117 */
118DEFINE_GUID(IID_IDirect3D9,                   0x81BDCBCA, 0x64D4, 0x426D, 0xAE, 0x8D, 0xAD, 0x1, 0x47, 0xF4, 0x27, 0x5C);
119typedef struct IDirect3D9 *LPDIRECT3D9, *PDIRECT3D9;
120
121DEFINE_GUID(IID_IDirect3D9Ex,                 0x02177241, 0x69FC, 0x400C, 0x8F, 0xF1, 0x93, 0xA4, 0x4D, 0xF6, 0x86, 0x1D);
122typedef struct IDirect3D9Ex *LPDIRECT3D9EX, *PDIRECT3D9EX;
123
124DEFINE_GUID(IID_IDirect3DDevice9,             0xd0223b96, 0xbf7a, 0x43fd, 0x92, 0xbd, 0xa4, 0x3b, 0xd, 0x82, 0xb9, 0xeb);
125typedef struct IDirect3DDevice9 *LPDIRECT3DDEVICE9;
126
127DEFINE_GUID(IID_IDirect3DDevice9Ex,           0xb18b10ce, 0x2649, 0x405a, 0x87, 0xf, 0x95, 0xf7, 0x77, 0xd4, 0x31, 0x3a);
128typedef struct IDirect3DDevice9Ex *LPDIRECT3DDEVICE9EX, *PDIRECT3DDEVICE9EX;
129
130DEFINE_GUID(IID_IDirect3DResource9,           0x5eec05d, 0x8f7d, 0x4362, 0xb9, 0x99, 0xd1, 0xba, 0xf3, 0x57, 0xc7, 0x4);
131typedef struct IDirect3DResource9 *LPDIRECT3DRESOURCE9, *PDIRECT3DRESOURCE9;
132
133DEFINE_GUID(IID_IDirect3DVertexBuffer9,       0xb64bb1b5, 0xfd70, 0x4df6, 0xbf, 0x91, 0x19, 0xd0, 0xa1, 0x24, 0x55, 0xe3);
134typedef struct IDirect3DVertexBuffer9 *LPDIRECT3DVERTEXBUFFER9, *PDIRECT3DVERTEXBUFFER9;
135
136DEFINE_GUID(IID_IDirect3DVolume9,             0x24f416e6, 0x1f67, 0x4aa7, 0xb8, 0x8e, 0xd3, 0x3f, 0x6f, 0x31, 0x28, 0xa1);
137typedef struct IDirect3DVolume9 *LPDIRECT3DVOLUME9, *PDIRECT3DVOLUME9;
138
139DEFINE_GUID(IID_IDirect3DSwapChain9,          0x794950f2, 0xadfc, 0x458a, 0x90, 0x5e, 0x10, 0xa1, 0xb, 0xb, 0x50, 0x3b);
140typedef struct IDirect3DSwapChain9 *LPDIRECT3DSWAPCHAIN9, *PDIRECT3DSWAPCHAIN9;
141
142DEFINE_GUID(IID_IDirect3DSwapChain9Ex,        0x91886caf, 0x1c3d, 0x4d2e, 0xa0, 0xab, 0x3e, 0x4c, 0x7d, 0x8d, 0x33, 0x3);
143typedef struct IDirect3DSwapChain9Ex *LPDIRECT3DSWAPCHAIN9EX, *PDIRECT3DSWAPCHAIN9EX;
144
145DEFINE_GUID(IID_IDirect3DSurface9,            0xcfbaf3a, 0x9ff6, 0x429a, 0x99, 0xb3, 0xa2, 0x79, 0x6a, 0xf8, 0xb8, 0x9b);
146typedef struct IDirect3DSurface9 *LPDIRECT3DSURFACE9, *PDIRECT3DSURFACE9;
147
148DEFINE_GUID(IID_IDirect3DIndexBuffer9,        0x7c9dd65e, 0xd3f7, 0x4529, 0xac, 0xee, 0x78, 0x58, 0x30, 0xac, 0xde, 0x35);
149typedef struct IDirect3DIndexBuffer9 *LPDIRECT3DINDEXBUFFER9, *PDIRECT3DINDEXBUFFER9;
150
151DEFINE_GUID(IID_IDirect3DBaseTexture9,        0x580ca87e, 0x1d3c, 0x4d54, 0x99, 0x1d, 0xb7, 0xd3, 0xe3, 0xc2, 0x98, 0xce);
152typedef struct IDirect3DBaseTexture9 *LPDIRECT3DBASETEXTURE9, *PDIRECT3DBASETEXTURE9;
153
154DEFINE_GUID(IID_IDirect3DTexture9,            0x85c31227, 0x3de5, 0x4f00, 0x9b, 0x3a, 0xf1, 0x1a, 0xc3, 0x8c, 0x18, 0xb5);
155typedef struct IDirect3DTexture9 *LPDIRECT3DTEXTURE9, *PDIRECT3DTEXTURE9;
156
157DEFINE_GUID(IID_IDirect3DCubeTexture9,        0xfff32f81, 0xd953, 0x473a, 0x92, 0x23, 0x93, 0xd6, 0x52, 0xab, 0xa9, 0x3f);
158typedef struct IDirect3DCubeTexture9 *LPDIRECT3DCUBETEXTURE9, *PDIRECT3DCUBETEXTURE9;
159
160DEFINE_GUID(IID_IDirect3DVolumeTexture9,      0x2518526c, 0xe789, 0x4111, 0xa7, 0xb9, 0x47, 0xef, 0x32, 0x8d, 0x13, 0xe6);
161typedef struct IDirect3DVolumeTexture9 *LPDIRECT3DVOLUMETEXTURE9, *PDIRECT3DVOLUMETEXTURE9;
162
163DEFINE_GUID(IID_IDirect3DVertexDeclaration9,  0xdd13c59c, 0x36fa, 0x4098, 0xa8, 0xfb, 0xc7, 0xed, 0x39, 0xdc, 0x85, 0x46);
164typedef struct IDirect3DVertexDeclaration9 *LPDIRECT3DVERTEXDECLARATION9;
165
166DEFINE_GUID(IID_IDirect3DVertexShader9,       0xefc5557e, 0x6265, 0x4613, 0x8a, 0x94, 0x43, 0x85, 0x78, 0x89, 0xeb, 0x36);
167typedef struct IDirect3DVertexShader9 *LPDIRECT3DVERTEXSHADER9;
168
169DEFINE_GUID(IID_IDirect3DPixelShader9,        0x6d3bdbdc, 0x5b02, 0x4415, 0xb8, 0x52, 0xce, 0x5e, 0x8b, 0xcc, 0xb2, 0x89);
170typedef struct IDirect3DPixelShader9 *LPDIRECT3DPIXELSHADER9;
171
172DEFINE_GUID(IID_IDirect3DStateBlock9,         0xb07c4fe5, 0x310d, 0x4ba8, 0xa2, 0x3c, 0x4f, 0xf, 0x20, 0x6f, 0x21, 0x8b);
173typedef struct IDirect3DStateBlock9 *LPDIRECT3DSTATEBLOCK9;
174
175DEFINE_GUID(IID_IDirect3DQuery9,              0xd9771460, 0xa695, 0x4f26, 0xbb, 0xd3, 0x27, 0xb8, 0x40, 0xb5, 0x41, 0xcc);
176typedef struct IDirect3DQuery9 *LPDIRECT3DQUERY9, *PDIRECT3DQUERY9;
177
178/*****************************************************************************
179 * IDirect3D9 interface
180 */
181#undef INTERFACE
182#define INTERFACE IDirect3D9
183DECLARE_INTERFACE_(IDirect3D9,IUnknown)
184{
185    /*** IUnknown methods ***/
186    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
187    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
188    STDMETHOD_(ULONG,Release)(THIS) PURE;
189    /*** IDirect3D9 methods ***/
190    STDMETHOD(RegisterSoftwareDevice)(THIS_ void* pInitializeFunction) PURE;
191    STDMETHOD_(UINT, GetAdapterCount)(THIS) PURE;
192    STDMETHOD(GetAdapterIdentifier)(THIS_ UINT Adapter, DWORD Flags, D3DADAPTER_IDENTIFIER9* pIdentifier) PURE;
193    STDMETHOD_(UINT, GetAdapterModeCount)(THIS_ UINT Adapter, D3DFORMAT Format) PURE;
194    STDMETHOD(EnumAdapterModes)(THIS_ UINT Adapter, D3DFORMAT Format, UINT Mode, D3DDISPLAYMODE* pMode) PURE;
195    STDMETHOD(GetAdapterDisplayMode)(THIS_ UINT Adapter, D3DDISPLAYMODE* pMode) PURE;
196    STDMETHOD(CheckDeviceType)(THIS_ UINT iAdapter, D3DDEVTYPE DevType, D3DFORMAT DisplayFormat, D3DFORMAT BackBufferFormat, WINBOOL bWindowed) PURE;
197    STDMETHOD(CheckDeviceFormat)(THIS_ UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, DWORD Usage, D3DRESOURCETYPE RType, D3DFORMAT CheckFormat) PURE;
198    STDMETHOD(CheckDeviceMultiSampleType)(THIS_ UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT SurfaceFormat, WINBOOL Windowed, D3DMULTISAMPLE_TYPE MultiSampleType, DWORD* pQualityLevels) PURE;
199    STDMETHOD(CheckDepthStencilMatch)(THIS_ UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, D3DFORMAT RenderTargetFormat, D3DFORMAT DepthStencilFormat) PURE;
200    STDMETHOD(CheckDeviceFormatConversion)(THIS_ UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT SourceFormat, D3DFORMAT TargetFormat) PURE;
201    STDMETHOD(GetDeviceCaps)(THIS_ UINT Adapter, D3DDEVTYPE DeviceType, D3DCAPS9* pCaps) PURE;
202    STDMETHOD_(HMONITOR, GetAdapterMonitor)(THIS_ UINT Adapter) PURE;
203    STDMETHOD(CreateDevice)(THIS_ UINT Adapter, D3DDEVTYPE DeviceType, HWND hFocusWindow, DWORD BehaviorFlags, D3DPRESENT_PARAMETERS* pPresentationParameters, struct IDirect3DDevice9** ppReturnedDeviceInterface) PURE;
204};
205#undef INTERFACE
206
207#if !defined(__cplusplus) || defined(CINTERFACE)
208/*** IUnknown methods ***/
209#define IDirect3D9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
210#define IDirect3D9_AddRef(p)             (p)->lpVtbl->AddRef(p)
211#define IDirect3D9_Release(p)            (p)->lpVtbl->Release(p)
212/*** IDirect3D9 methods ***/
213#define IDirect3D9_RegisterSoftwareDevice(p,a)                (p)->lpVtbl->RegisterSoftwareDevice(p,a)
214#define IDirect3D9_GetAdapterCount(p)                         (p)->lpVtbl->GetAdapterCount(p)
215#define IDirect3D9_GetAdapterIdentifier(p,a,b,c)              (p)->lpVtbl->GetAdapterIdentifier(p,a,b,c)
216#define IDirect3D9_GetAdapterModeCount(p,a,b)                 (p)->lpVtbl->GetAdapterModeCount(p,a,b)
217#define IDirect3D9_EnumAdapterModes(p,a,b,c,d)                (p)->lpVtbl->EnumAdapterModes(p,a,b,c,d)
218#define IDirect3D9_GetAdapterDisplayMode(p,a,b)               (p)->lpVtbl->GetAdapterDisplayMode(p,a,b)
219#define IDirect3D9_CheckDeviceType(p,a,b,c,d,e)               (p)->lpVtbl->CheckDeviceType(p,a,b,c,d,e)
220#define IDirect3D9_CheckDeviceFormat(p,a,b,c,d,e,f)           (p)->lpVtbl->CheckDeviceFormat(p,a,b,c,d,e,f)
221#define IDirect3D9_CheckDeviceMultiSampleType(p,a,b,c,d,e,f)  (p)->lpVtbl->CheckDeviceMultiSampleType(p,a,b,c,d,e,f)
222#define IDirect3D9_CheckDepthStencilMatch(p,a,b,c,d,e)        (p)->lpVtbl->CheckDepthStencilMatch(p,a,b,c,d,e)
223#define IDirect3D9_CheckDeviceFormatConversion(p,a,b,c,d)     (p)->lpVtbl->CheckDeviceFormatConversion(p,a,b,c,d)
224#define IDirect3D9_GetDeviceCaps(p,a,b,c)                     (p)->lpVtbl->GetDeviceCaps(p,a,b,c)
225#define IDirect3D9_GetAdapterMonitor(p,a)                     (p)->lpVtbl->GetAdapterMonitor(p,a)
226#define IDirect3D9_CreateDevice(p,a,b,c,d,e,f)                (p)->lpVtbl->CreateDevice(p,a,b,c,d,e,f)
227#else
228/*** IUnknown methods ***/
229#define IDirect3D9_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
230#define IDirect3D9_AddRef(p)             (p)->AddRef()
231#define IDirect3D9_Release(p)            (p)->Release()
232/*** IDirect3D9 methods ***/
233#define IDirect3D9_RegisterSoftwareDevice(p,a)                (p)->RegisterSoftwareDevice(a)
234#define IDirect3D9_GetAdapterCount(p)                         (p)->GetAdapterCount()
235#define IDirect3D9_GetAdapterIdentifier(p,a,b,c)              (p)->GetAdapterIdentifier(a,b,c)
236#define IDirect3D9_GetAdapterModeCount(p,a,b)                 (p)->GetAdapterModeCount(a,b)
237#define IDirect3D9_EnumAdapterModes(p,a,b,c,d)                (p)->EnumAdapterModes(a,b,c,d)
238#define IDirect3D9_GetAdapterDisplayMode(p,a,b)               (p)->GetAdapterDisplayMode(a,b)
239#define IDirect3D9_CheckDeviceType(p,a,b,c,d,e)               (p)->CheckDeviceType(a,b,c,d,e)
240#define IDirect3D9_CheckDeviceFormat(p,a,b,c,d,e,f)           (p)->CheckDeviceFormat(a,b,c,d,e,f)
241#define IDirect3D9_CheckDeviceMultiSampleType(p,a,b,c,d,e,f)  (p)->CheckDeviceMultiSampleType(a,b,c,d,e,f)
242#define IDirect3D9_CheckDepthStencilMatch(p,a,b,c,d,e)        (p)->CheckDepthStencilMatch(a,b,c,d,e)
243#define IDirect3D9_CheckDeviceFormatConversion(p,a,b,c,d)     (p)->CheckDeviceFormatConversion(a,b,c,d)
244#define IDirect3D9_GetDeviceCaps(p,a,b,c)                     (p)->GetDeviceCaps(a,b,c)
245#define IDirect3D9_GetAdapterMonitor(p,a)                     (p)->GetAdapterMonitor(a)
246#define IDirect3D9_CreateDevice(p,a,b,c,d,e,f)                (p)->CreateDevice(a,b,c,d,e,f)
247#endif
248
249/*****************************************************************************
250 * IDirect3D9Ex interface
251 */
252#define INTERFACE IDirect3D9Ex
253DECLARE_INTERFACE_(IDirect3D9Ex,IDirect3D9)
254{
255    /*** IUnknown methods ***/
256    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
257    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
258    STDMETHOD_(ULONG,Release)(THIS) PURE;
259    /*** IDirect3D9 methods ***/
260
261    /* Note: Microsoft's d3d9.h does not declare IDirect3D9Ex::RegisterSoftwareDevice . This would mean that
262     * the offsets of the other methods in the Vtable change too. This is wrong. In Microsoft's
263     * d3d9.dll, the offsets for the other functions are still compatible with IDirect3D9.
264     * This is probably because even in MS header IDirect3D9Ex inherits from IDirect3D9, which makes the
265     * C++ interface compatible, and nobody uses the C interface in Windows world.
266     */
267    STDMETHOD(RegisterSoftwareDevice)(THIS_ void* pInitializeFunction) PURE;
268
269    STDMETHOD_(UINT, GetAdapterCount)(THIS) PURE;
270    STDMETHOD(GetAdapterIdentifier)(THIS_ UINT Adapter, DWORD Flags, D3DADAPTER_IDENTIFIER9* pIdentifier) PURE;
271    STDMETHOD_(UINT, GetAdapterModeCount)(THIS_ UINT Adapter, D3DFORMAT Format) PURE;
272    STDMETHOD(EnumAdapterModes)(THIS_ UINT Adapter, D3DFORMAT Format, UINT Mode, D3DDISPLAYMODE* pMode) PURE;
273    STDMETHOD(GetAdapterDisplayMode)(THIS_ UINT Adapter, D3DDISPLAYMODE* pMode) PURE;
274    STDMETHOD(CheckDeviceType)(THIS_ UINT iAdapter, D3DDEVTYPE DevType, D3DFORMAT DisplayFormat, D3DFORMAT BackBufferFormat, WINBOOL bWindowed) PURE;
275    STDMETHOD(CheckDeviceFormat)(THIS_ UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, DWORD Usage, D3DRESOURCETYPE RType, D3DFORMAT CheckFormat) PURE;
276    STDMETHOD(CheckDeviceMultiSampleType)(THIS_ UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT SurfaceFormat, WINBOOL Windowed, D3DMULTISAMPLE_TYPE MultiSampleType, DWORD* pQualityLevels) PURE;
277    STDMETHOD(CheckDepthStencilMatch)(THIS_ UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat, D3DFORMAT RenderTargetFormat, D3DFORMAT DepthStencilFormat) PURE;
278    STDMETHOD(CheckDeviceFormatConversion)(THIS_ UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT SourceFormat, D3DFORMAT TargetFormat) PURE;
279    STDMETHOD(GetDeviceCaps)(THIS_ UINT Adapter, D3DDEVTYPE DeviceType, D3DCAPS9* pCaps) PURE;
280    STDMETHOD_(HMONITOR, GetAdapterMonitor)(THIS_ UINT Adapter) PURE;
281    STDMETHOD(CreateDevice)(THIS_ UINT Adapter, D3DDEVTYPE DeviceType, HWND hFocusWindow, DWORD BehaviorFlags, D3DPRESENT_PARAMETERS* pPresentationParameters, struct IDirect3DDevice9** ppReturnedDeviceInterface) PURE;
282    /*** IDirect3D9Ex methods ***/
283    STDMETHOD_(UINT, GetAdapterModeCountEx)(THIS_ UINT Adapter, CONST D3DDISPLAYMODEFILTER *pFilter) PURE;
284    STDMETHOD(EnumAdapterModesEx)(THIS_ UINT Adapter, CONST D3DDISPLAYMODEFILTER *pFilter, UINT Mode, D3DDISPLAYMODEEX* pMode) PURE;
285    STDMETHOD(GetAdapterDisplayModeEx)(THIS_ UINT Adapter, D3DDISPLAYMODEEX *pMode, D3DDISPLAYROTATION *pRotation);
286    STDMETHOD(CreateDeviceEx)(THIS_ UINT Adapter, D3DDEVTYPE DeviceType, HWND hFocusWindow, DWORD BehaviorFlags, D3DPRESENT_PARAMETERS* pPresentationParameters, D3DDISPLAYMODEEX* pFullscreenDisplayMode, struct IDirect3DDevice9Ex **ppReturnedDeviceInterface) PURE;
287    STDMETHOD(GetAdapterLUID)(THIS_ UINT Adatper, LUID *pLUID) PURE;
288};
289#undef INTERFACE
290
291#if !defined(__cplusplus) || defined(CINTERFACE)
292/*** IUnknown methods ***/
293#define IDirect3D9Ex_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
294#define IDirect3D9Ex_AddRef(p)             (p)->lpVtbl->AddRef(p)
295#define IDirect3D9Ex_Release(p)            (p)->lpVtbl->Release(p)
296/*** IDirect3D9 methods ***/
297#define IDirect3D9Ex_RegisterSoftwareDevice(p,a)                (p)->lpVtbl->RegisterSoftwareDevice(p,a)
298#define IDirect3D9Ex_GetAdapterCount(p)                         (p)->lpVtbl->GetAdapterCount(p)
299#define IDirect3D9Ex_GetAdapterIdentifier(p,a,b,c)              (p)->lpVtbl->GetAdapterIdentifier(p,a,b,c)
300#define IDirect3D9Ex_GetAdapterModeCount(p,a,b)                 (p)->lpVtbl->GetAdapterModeCount(p,a,b)
301#define IDirect3D9Ex_EnumAdapterModes(p,a,b,c,d)                (p)->lpVtbl->EnumAdapterModes(p,a,b,c,d)
302#define IDirect3D9Ex_GetAdapterDisplayMode(p,a,b)               (p)->lpVtbl->GetAdapterDisplayMode(p,a,b)
303#define IDirect3D9Ex_CheckDeviceType(p,a,b,c,d,e)               (p)->lpVtbl->CheckDeviceType(p,a,b,c,d,e)
304#define IDirect3D9Ex_CheckDeviceFormat(p,a,b,c,d,e,f)           (p)->lpVtbl->CheckDeviceFormat(p,a,b,c,d,e,f)
305#define IDirect3D9Ex_CheckDeviceMultiSampleType(p,a,b,c,d,e,f)  (p)->lpVtbl->CheckDeviceMultiSampleType(p,a,b,c,d,e,f)
306#define IDirect3D9Ex_CheckDepthStencilMatch(p,a,b,c,d,e)        (p)->lpVtbl->CheckDepthStencilMatch(p,a,b,c,d,e)
307#define IDirect3D9Ex_CheckDeviceFormatConversion(p,a,b,c,d)     (p)->lpVtbl->CheckDeviceFormatConversion(p,a,b,c,d)
308#define IDirect3D9Ex_GetDeviceCaps(p,a,b,c)                     (p)->lpVtbl->GetDeviceCaps(p,a,b,c)
309#define IDirect3D9Ex_GetAdapterMonitor(p,a)                     (p)->lpVtbl->GetAdapterMonitor(p,a)
310#define IDirect3D9Ex_CreateDevice(p,a,b,c,d,e,f)                (p)->lpVtbl->CreateDevice(p,a,b,c,d,e,f)
311/*** IDirect3D9Ex methods ***/
312#define IDirect3D9Ex_GetAdapterModeCountEx(p,a,b)               (p)->lpVtbl->GetAdapterModeCountEx(p,a,b)
313#define IDirect3D9Ex_EnumAdapterModesEx(p,a,b,c,d)              (p)->lpVtbl->EnumAdapterModesEx(p,a,b,c,d)
314#define IDirect3D9Ex_GetAdapterDisplayModeEx(p,a,b,c)           (p)->lpVtbl->GetAdapterDisplayModeEx(p,a,b,c)
315#define IDirect3D9Ex_CreateDeviceEx(p,a,b,c,d,e,f,g)            (p)->lpVtbl->CreateDeviceEx(p,a,b,c,d,e,f,g)
316#define IDirect3D9Ex_GetAdapterLUID(p,a,b)                      (p)->lpVtbl->GetAdapterLUID(p,a,b)
317#else
318/*** IUnknown methods ***/
319#define IDirect3D9Ex_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
320#define IDirect3D9Ex_AddRef(p)             (p)->AddRef()
321#define IDirect3D9Ex_Release(p)            (p)->Release()
322/*** IDirect3D9 methods ***/
323#define IDirect3D9Ex_RegisterSoftwareDevice(p,a)                (p)->RegisterSoftwareDevice(a)
324#define IDirect3D9Ex_GetAdapterCount(p)                         (p)->GetAdapterCount()
325#define IDirect3D9Ex_GetAdapterIdentifier(p,a,b,c)              (p)->GetAdapterIdentifier(a,b,c)
326#define IDirect3D9Ex_GetAdapterModeCount(p,a,b)                 (p)->GetAdapterModeCount(a,b)
327#define IDirect3D9Ex_EnumAdapterModes(p,a,b,c,d)                (p)->EnumAdapterModes(a,b,c,d)
328#define IDirect3D9Ex_GetAdapterDisplayMode(p,a,b)               (p)->GetAdapterDisplayMode(a,b)
329#define IDirect3D9Ex_CheckDeviceType(p,a,b,c,d,e)               (p)->CheckDeviceType(a,b,c,d,e)
330#define IDirect3D9Ex_CheckDeviceFormat(p,a,b,c,d,e,f)           (p)->CheckDeviceFormat(a,b,c,d,e,f)
331#define IDirect3D9Ex_CheckDeviceMultiSampleType(p,a,b,c,d,e,f)  (p)->CheckDeviceMultiSampleType(a,b,c,d,e,f)
332#define IDirect3D9Ex_CheckDepthStencilMatch(p,a,b,c,d,e)        (p)->CheckDepthStencilMatch(a,b,c,d,e)
333#define IDirect3D9Ex_CheckDeviceFormatConversion(p,a,b,c,d)     (p)->CheckDeviceFormatConversion(a,b,c,d)
334#define IDirect3D9Ex_GetDeviceCaps(p,a,b,c)                     (p)->GetDeviceCaps(a,b,c)
335#define IDirect3D9Ex_GetAdapterMonitor(p,a)                     (p)->GetAdapterMonitor(a)
336#define IDirect3D9Ex_CreateDevice(p,a,b,c,d,e,f)                (p)->CreateDevice(a,b,c,d,e,f)
337#endif
338
339/*****************************************************************************
340 * IDirect3DVolume9 interface
341 */
342#define INTERFACE IDirect3DVolume9
343DECLARE_INTERFACE_(IDirect3DVolume9,IUnknown)
344{
345    /*** IUnknown methods ***/
346    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
347    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
348    STDMETHOD_(ULONG,Release)(THIS) PURE;
349    /*** IDirect3DVolume9 methods ***/
350    STDMETHOD(GetDevice)(THIS_ struct IDirect3DDevice9** ppDevice) PURE;
351    STDMETHOD(SetPrivateData)(THIS_ REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) PURE;
352    STDMETHOD(GetPrivateData)(THIS_ REFGUID refguid, void* pData, DWORD* pSizeOfData) PURE;
353    STDMETHOD(FreePrivateData)(THIS_ REFGUID refguid) PURE;
354    STDMETHOD(GetContainer)(THIS_ REFIID riid, void** ppContainer) PURE;
355    STDMETHOD(GetDesc)(THIS_ D3DVOLUME_DESC* pDesc) PURE;
356    STDMETHOD(LockBox)(THIS_ D3DLOCKED_BOX* pLockedVolume, CONST D3DBOX* pBox, DWORD Flags) PURE;
357    STDMETHOD(UnlockBox)(THIS) PURE;
358};
359#undef INTERFACE
360
361#if !defined(__cplusplus) || defined(CINTERFACE)
362/*** IUnknown methods ***/
363#define IDirect3DVolume9_QueryInterface(p,a,b)        (p)->lpVtbl->QueryInterface(p,a,b)
364#define IDirect3DVolume9_AddRef(p)                    (p)->lpVtbl->AddRef(p)
365#define IDirect3DVolume9_Release(p)                   (p)->lpVtbl->Release(p)
366/*** IDirect3DVolume9 methods ***/
367#define IDirect3DVolume9_GetDevice(p,a)               (p)->lpVtbl->GetDevice(p,a)
368#define IDirect3DVolume9_SetPrivateData(p,a,b,c,d)    (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
369#define IDirect3DVolume9_GetPrivateData(p,a,b,c)      (p)->lpVtbl->GetPrivateData(p,a,b,c)
370#define IDirect3DVolume9_FreePrivateData(p,a)         (p)->lpVtbl->FreePrivateData(p,a)
371#define IDirect3DVolume9_GetContainer(p,a,b)          (p)->lpVtbl->GetContainer(p,a,b)
372#define IDirect3DVolume9_GetDesc(p,a)                 (p)->lpVtbl->GetDesc(p,a)
373#define IDirect3DVolume9_LockBox(p,a,b,c)             (p)->lpVtbl->LockBox(p,a,b,c)
374#define IDirect3DVolume9_UnlockBox(p)                 (p)->lpVtbl->UnlockBox(p)
375#else
376/*** IUnknown methods ***/
377#define IDirect3DVolume9_QueryInterface(p,a,b)        (p)->QueryInterface(a,b)
378#define IDirect3DVolume9_AddRef(p)                    (p)->AddRef()
379#define IDirect3DVolume9_Release(p)                   (p)->Release()
380/*** IDirect3DVolume9 methods ***/
381#define IDirect3DVolume9_GetDevice(p,a)               (p)->GetDevice(a)
382#define IDirect3DVolume9_SetPrivateData(p,a,b,c,d)    (p)->SetPrivateData(a,b,c,d)
383#define IDirect3DVolume9_GetPrivateData(p,a,b,c)      (p)->GetPrivateData(a,b,c)
384#define IDirect3DVolume9_FreePrivateData(p,a)         (p)->FreePrivateData(a)
385#define IDirect3DVolume9_GetContainer(p,a,b)          (p)->GetContainer(a,b)
386#define IDirect3DVolume9_GetDesc(p,a)                 (p)->GetDesc(a)
387#define IDirect3DVolume9_LockBox(p,a,b,c)             (p)->LockBox(a,b,c)
388#define IDirect3DVolume9_UnlockBox(p)                 (p)->UnlockBox()
389#endif
390
391/*****************************************************************************
392 * IDirect3DSwapChain9 interface
393 */
394#define INTERFACE IDirect3DSwapChain9
395DECLARE_INTERFACE_(IDirect3DSwapChain9,IUnknown)
396{
397    /*** IUnknown methods ***/
398    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
399    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
400    STDMETHOD_(ULONG,Release)(THIS) PURE;
401    /*** IDirect3DSwapChain9 methods ***/
402    STDMETHOD(Present)(THIS_ CONST RECT* pSourceRect, CONST RECT* pDestRect, HWND hDestWindowOverride, CONST RGNDATA* pDirtyRegion, DWORD dwFlags) PURE;
403    STDMETHOD(GetFrontBufferData)(THIS_ struct IDirect3DSurface9* pDestSurface) PURE;
404    STDMETHOD(GetBackBuffer)(THIS_ UINT iBackBuffer, D3DBACKBUFFER_TYPE Type, struct IDirect3DSurface9** ppBackBuffer) PURE;
405    STDMETHOD(GetRasterStatus)(THIS_ D3DRASTER_STATUS* pRasterStatus) PURE;
406    STDMETHOD(GetDisplayMode)(THIS_ D3DDISPLAYMODE* pMode) PURE;
407    STDMETHOD(GetDevice)(THIS_ struct IDirect3DDevice9** ppDevice) PURE;
408    STDMETHOD(GetPresentParameters)(THIS_ D3DPRESENT_PARAMETERS* pPresentationParameters) PURE;
409};
410#undef INTERFACE
411
412#if !defined(__cplusplus) || defined(CINTERFACE)
413/*** IUnknown methods ***/
414#define IDirect3DSwapChain9_QueryInterface(p,a,b)        (p)->lpVtbl->QueryInterface(p,a,b)
415#define IDirect3DSwapChain9_AddRef(p)                    (p)->lpVtbl->AddRef(p)
416#define IDirect3DSwapChain9_Release(p)                   (p)->lpVtbl->Release(p)
417/*** IDirect3DSwapChain9 methods ***/
418#define IDirect3DSwapChain9_Present(p,a,b,c,d,e)         (p)->lpVtbl->Present(p,a,b,c,d,e)
419#define IDirect3DSwapChain9_GetFrontBufferData(p,a)      (p)->lpVtbl->GetFrontBufferData(p,a)
420#define IDirect3DSwapChain9_GetBackBuffer(p,a,b,c)       (p)->lpVtbl->GetBackBuffer(p,a,b,c)
421#define IDirect3DSwapChain9_GetRasterStatus(p,a)         (p)->lpVtbl->GetRasterStatus(p,a)
422#define IDirect3DSwapChain9_GetDisplayMode(p,a)          (p)->lpVtbl->GetDisplayMode(p,a)
423#define IDirect3DSwapChain9_GetDevice(p,a)               (p)->lpVtbl->GetDevice(p,a)
424#define IDirect3DSwapChain9_GetPresentParameters(p,a)    (p)->lpVtbl->GetPresentParameters(p,a)
425#else
426/*** IUnknown methods ***/
427#define IDirect3DSwapChain9_QueryInterface(p,a,b)        (p)->QueryInterface(a,b)
428#define IDirect3DSwapChain9_AddRef(p)                    (p)->AddRef()
429#define IDirect3DSwapChain9_Release(p)                   (p)->Release()
430/*** IDirect3DSwapChain9 methods ***/
431#define IDirect3DSwapChain9_Present(p,a,b,c,d,e)         (p)->Present(a,b,c,d,e)
432#define IDirect3DSwapChain9_GetFrontBufferData(p,a)      (p)->GetFrontBufferData(a)
433#define IDirect3DSwapChain9_GetBackBuffer(p,a,b,c)       (p)->GetBackBuffer(a,b,c)
434#define IDirect3DSwapChain9_GetRasterStatus(p,a)         (p)->GetRasterStatus(a)
435#define IDirect3DSwapChain9_GetDisplayMode(p,a)          (p)->GetDisplayMode(a)
436#define IDirect3DSwapChain9_GetDevice(p,a)               (p)->GetDevice(a)
437#define IDirect3DSwapChain9_GetPresentParameters(p,a)    (p)->GetPresentParameters(a)
438#endif
439
440/*****************************************************************************
441 * IDirect3DResource9 interface
442 */
443#define INTERFACE IDirect3DResource9
444DECLARE_INTERFACE_(IDirect3DResource9,IUnknown)
445{
446    /*** IUnknown methods ***/
447    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
448    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
449    STDMETHOD_(ULONG,Release)(THIS) PURE;
450    /*** IDirect3DResource9 methods ***/
451    STDMETHOD(GetDevice)(THIS_ struct IDirect3DDevice9** ppDevice) PURE;
452    STDMETHOD(SetPrivateData)(THIS_ REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) PURE;
453    STDMETHOD(GetPrivateData)(THIS_ REFGUID refguid, void* pData, DWORD* pSizeOfData) PURE;
454    STDMETHOD(FreePrivateData)(THIS_ REFGUID refguid) PURE;
455    STDMETHOD_(DWORD, SetPriority)(THIS_ DWORD PriorityNew) PURE;
456    STDMETHOD_(DWORD, GetPriority)(THIS) PURE;
457    STDMETHOD_(void, PreLoad)(THIS) PURE;
458    STDMETHOD_(D3DRESOURCETYPE, GetType)(THIS) PURE;
459};
460#undef INTERFACE
461
462#if !defined(__cplusplus) || defined(CINTERFACE)
463/*** IUnknown methods ***/
464#define IDirect3DResource9_QueryInterface(p,a,b)        (p)->lpVtbl->QueryInterface(p,a,b)
465#define IDirect3DResource9_AddRef(p)                    (p)->lpVtbl->AddRef(p)
466#define IDirect3DResource9_Release(p)                   (p)->lpVtbl->Release(p)
467/*** IDirect3DResource9 methods ***/
468#define IDirect3DResource9_GetDevice(p,a)               (p)->lpVtbl->GetDevice(p,a)
469#define IDirect3DResource9_SetPrivateData(p,a,b,c,d)    (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
470#define IDirect3DResource9_GetPrivateData(p,a,b,c)      (p)->lpVtbl->GetPrivateData(p,a,b,c)
471#define IDirect3DResource9_FreePrivateData(p,a)         (p)->lpVtbl->FreePrivateData(p,a)
472#define IDirect3DResource9_SetPriority(p,a)             (p)->lpVtbl->SetPriority(p,a)
473#define IDirect3DResource9_GetPriority(p)               (p)->lpVtbl->GetPriority(p)
474#define IDirect3DResource9_PreLoad(p)                   (p)->lpVtbl->PreLoad(p)
475#define IDirect3DResource9_GetType(p)                   (p)->lpVtbl->GetType(p)
476#else
477/*** IUnknown methods ***/
478#define IDirect3DResource9_QueryInterface(p,a,b)        (p)->QueryInterface(a,b)
479#define IDirect3DResource9_AddRef(p)                    (p)->AddRef()
480#define IDirect3DResource9_Release(p)                   (p)->Release()
481/*** IDirect3DResource9 methods ***/
482#define IDirect3DResource9_GetDevice(p,a)               (p)->GetDevice(a)
483#define IDirect3DResource9_SetPrivateData(p,a,b,c,d)    (p)->SetPrivateData(a,b,c,d)
484#define IDirect3DResource9_GetPrivateData(p,a,b,c)      (p)->GetPrivateData(a,b,c)
485#define IDirect3DResource9_FreePrivateData(p,a)         (p)->FreePrivateData(a)
486#define IDirect3DResource9_SetPriority(p,a)             (p)->SetPriority(a)
487#define IDirect3DResource9_GetPriority(p)               (p)->GetPriority()
488#define IDirect3DResource9_PreLoad(p)                   (p)->PreLoad()
489#define IDirect3DResource9_GetType(p)                   (p)->GetType()
490#endif
491
492/*****************************************************************************
493 * IDirect3DSurface9 interface
494 */
495#define INTERFACE IDirect3DSurface9
496DECLARE_INTERFACE_(IDirect3DSurface9,IDirect3DResource9)
497{
498    /*** IUnknown methods ***/
499    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
500    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
501    STDMETHOD_(ULONG,Release)(THIS) PURE;
502    /*** IDirect3DResource9 methods ***/
503    STDMETHOD(GetDevice)(THIS_ struct IDirect3DDevice9** ppDevice) PURE;
504    STDMETHOD(SetPrivateData)(THIS_ REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) PURE;
505    STDMETHOD(GetPrivateData)(THIS_ REFGUID refguid, void* pData, DWORD* pSizeOfData) PURE;
506    STDMETHOD(FreePrivateData)(THIS_ REFGUID refguid) PURE;
507    STDMETHOD_(DWORD, SetPriority)(THIS_ DWORD PriorityNew) PURE;
508    STDMETHOD_(DWORD, GetPriority)(THIS) PURE;
509    STDMETHOD_(void, PreLoad)(THIS) PURE;
510    STDMETHOD_(D3DRESOURCETYPE, GetType)(THIS) PURE;
511    /*** IDirect3DSurface9 methods ***/
512    STDMETHOD(GetContainer)(THIS_ REFIID riid, void** ppContainer) PURE;
513    STDMETHOD(GetDesc)(THIS_ D3DSURFACE_DESC* pDesc) PURE;
514    STDMETHOD(LockRect)(THIS_ D3DLOCKED_RECT* pLockedRect, CONST RECT* pRect, DWORD Flags) PURE;
515    STDMETHOD(UnlockRect)(THIS) PURE;
516    STDMETHOD(GetDC)(THIS_ HDC* phdc) PURE;
517    STDMETHOD(ReleaseDC)(THIS_ HDC hdc) PURE;
518};
519#undef INTERFACE
520
521#if !defined(__cplusplus) || defined(CINTERFACE)
522/*** IUnknown methods ***/
523#define IDirect3DSurface9_QueryInterface(p,a,b)        (p)->lpVtbl->QueryInterface(p,a,b)
524#define IDirect3DSurface9_AddRef(p)                    (p)->lpVtbl->AddRef(p)
525#define IDirect3DSurface9_Release(p)                   (p)->lpVtbl->Release(p)
526/*** IDirect3DSurface9 methods: IDirect3DResource9 ***/
527#define IDirect3DSurface9_GetDevice(p,a)               (p)->lpVtbl->GetDevice(p,a)
528#define IDirect3DSurface9_SetPrivateData(p,a,b,c,d)    (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
529#define IDirect3DSurface9_GetPrivateData(p,a,b,c)      (p)->lpVtbl->GetPrivateData(p,a,b,c)
530#define IDirect3DSurface9_FreePrivateData(p,a)         (p)->lpVtbl->FreePrivateData(p,a)
531#define IDirect3DSurface9_SetPriority(p,a)             (p)->lpVtbl->SetPriority(p,a)
532#define IDirect3DSurface9_GetPriority(p)               (p)->lpVtbl->GetPriority(p)
533#define IDirect3DSurface9_PreLoad(p)                   (p)->lpVtbl->PreLoad(p)
534#define IDirect3DSurface9_GetType(p)                   (p)->lpVtbl->GetType(p)
535/*** IDirect3DSurface9 methods ***/
536#define IDirect3DSurface9_GetContainer(p,a,b)          (p)->lpVtbl->GetContainer(p,a,b)
537#define IDirect3DSurface9_GetDesc(p,a)                 (p)->lpVtbl->GetDesc(p,a)
538#define IDirect3DSurface9_LockRect(p,a,b,c)            (p)->lpVtbl->LockRect(p,a,b,c)
539#define IDirect3DSurface9_UnlockRect(p)                (p)->lpVtbl->UnlockRect(p)
540#define IDirect3DSurface9_GetDC(p,a)                   (p)->lpVtbl->GetDC(p,a)
541#define IDirect3DSurface9_ReleaseDC(p,a)               (p)->lpVtbl->ReleaseDC(p,a)
542#else
543/*** IUnknown methods ***/
544#define IDirect3DSurface9_QueryInterface(p,a,b)        (p)->QueryInterface(a,b)
545#define IDirect3DSurface9_AddRef(p)                    (p)->AddRef()
546#define IDirect3DSurface9_Release(p)                   (p)->Release()
547/*** IDirect3DSurface9 methods: IDirect3DResource9 ***/
548#define IDirect3DSurface9_GetDevice(p,a)               (p)->GetDevice(a)
549#define IDirect3DSurface9_SetPrivateData(p,a,b,c,d)    (p)->SetPrivateData(a,b,c,d)
550#define IDirect3DSurface9_GetPrivateData(p,a,b,c)      (p)->GetPrivateData(a,b,c)
551#define IDirect3DSurface9_FreePrivateData(p,a)         (p)->FreePrivateData(a)
552#define IDirect3DSurface9_SetPriority(p,a)             (p)->SetPriority(a)
553#define IDirect3DSurface9_GetPriority(p)               (p)->GetPriority()
554#define IDirect3DSurface9_PreLoad(p)                   (p)->PreLoad()
555#define IDirect3DSurface9_GetType(p)                   (p)->GetType()
556/*** IDirect3DSurface9 methods ***/
557#define IDirect3DSurface9_GetContainer(p,a,b)          (p)->GetContainer(a,b)
558#define IDirect3DSurface9_GetDesc(p,a)                 (p)->GetDesc(a)
559#define IDirect3DSurface9_LockRect(p,a,b,c)            (p)->LockRect(a,b,c)
560#define IDirect3DSurface9_UnlockRect(p)                (p)->UnlockRect()
561#define IDirect3DSurface9_GetDC(p,a)                   (p)->GetDC(a)
562#define IDirect3DSurface9_ReleaseDC(p,a)               (p)->ReleaseDC(a)
563#endif
564
565/*****************************************************************************
566 * IDirect3DVertexBuffer9 interface
567 */
568#define INTERFACE IDirect3DVertexBuffer9
569DECLARE_INTERFACE_(IDirect3DVertexBuffer9,IDirect3DResource9)
570{
571    /*** IUnknown methods ***/
572    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
573    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
574    STDMETHOD_(ULONG,Release)(THIS) PURE;
575    /*** IDirect3DResource9 methods ***/
576    STDMETHOD(GetDevice)(THIS_ struct IDirect3DDevice9** ppDevice) PURE;
577    STDMETHOD(SetPrivateData)(THIS_ REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) PURE;
578    STDMETHOD(GetPrivateData)(THIS_ REFGUID refguid, void* pData, DWORD* pSizeOfData) PURE;
579    STDMETHOD(FreePrivateData)(THIS_ REFGUID refguid) PURE;
580    STDMETHOD_(DWORD, SetPriority)(THIS_ DWORD PriorityNew) PURE;
581    STDMETHOD_(DWORD, GetPriority)(THIS) PURE;
582    STDMETHOD_(void, PreLoad)(THIS) PURE;
583    STDMETHOD_(D3DRESOURCETYPE, GetType)(THIS) PURE;
584    /*** IDirect3DVertexBuffer9 methods ***/
585    STDMETHOD(Lock)(THIS_ UINT OffsetToLock, UINT SizeToLock, void** ppbData, DWORD Flags) PURE;
586    STDMETHOD(Unlock)(THIS) PURE;
587    STDMETHOD(GetDesc)(THIS_ D3DVERTEXBUFFER_DESC* pDesc) PURE;
588};
589#undef INTERFACE
590
591#if !defined(__cplusplus) || defined(CINTERFACE)
592/*** IUnknown methods ***/
593#define IDirect3DVertexBuffer9_QueryInterface(p,a,b)        (p)->lpVtbl->QueryInterface(p,a,b)
594#define IDirect3DVertexBuffer9_AddRef(p)                    (p)->lpVtbl->AddRef(p)
595#define IDirect3DVertexBuffer9_Release(p)                   (p)->lpVtbl->Release(p)
596/*** IDirect3DVertexBuffer9 methods: IDirect3DResource9 ***/
597#define IDirect3DVertexBuffer9_GetDevice(p,a)               (p)->lpVtbl->GetDevice(p,a)
598#define IDirect3DVertexBuffer9_SetPrivateData(p,a,b,c,d)    (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
599#define IDirect3DVertexBuffer9_GetPrivateData(p,a,b,c)      (p)->lpVtbl->GetPrivateData(p,a,b,c)
600#define IDirect3DVertexBuffer9_FreePrivateData(p,a)         (p)->lpVtbl->FreePrivateData(p,a)
601#define IDirect3DVertexBuffer9_SetPriority(p,a)             (p)->lpVtbl->SetPriority(p,a)
602#define IDirect3DVertexBuffer9_GetPriority(p)               (p)->lpVtbl->GetPriority(p)
603#define IDirect3DVertexBuffer9_PreLoad(p)                   (p)->lpVtbl->PreLoad(p)
604#define IDirect3DVertexBuffer9_GetType(p)                   (p)->lpVtbl->GetType(p)
605/*** IDirect3DVertexBuffer9 methods ***/
606#define IDirect3DVertexBuffer9_Lock(p,a,b,c,d)              (p)->lpVtbl->Lock(p,a,b,c,d)
607#define IDirect3DVertexBuffer9_Unlock(p)                    (p)->lpVtbl->Unlock(p)
608#define IDirect3DVertexBuffer9_GetDesc(p,a)                 (p)->lpVtbl->GetDesc(p,a)
609#else
610/*** IUnknown methods ***/
611#define IDirect3DVertexBuffer9_QueryInterface(p,a,b)        (p)->QueryInterface(a,b)
612#define IDirect3DVertexBuffer9_AddRef(p)                    (p)->AddRef()
613#define IDirect3DVertexBuffer9_Release(p)                   (p)->Release()
614/*** IDirect3DVertexBuffer9 methods: IDirect3DResource9 ***/
615#define IDirect3DVertexBuffer9_GetDevice(p,a)               (p)->GetDevice(a)
616#define IDirect3DVertexBuffer9_SetPrivateData(p,a,b,c,d)    (p)->SetPrivateData(a,b,c,d)
617#define IDirect3DVertexBuffer9_GetPrivateData(p,a,b,c)      (p)->GetPrivateData(a,b,c)
618#define IDirect3DVertexBuffer9_FreePrivateData(p,a)         (p)->FreePrivateData(a)
619#define IDirect3DVertexBuffer9_SetPriority(p,a)             (p)->SetPriority(a)
620#define IDirect3DVertexBuffer9_GetPriority(p)               (p)->GetPriority()
621#define IDirect3DVertexBuffer9_PreLoad(p)                   (p)->PreLoad()
622#define IDirect3DVertexBuffer9_GetType(p)                   (p)->GetType()
623/*** IDirect3DVertexBuffer9 methods ***/
624#define IDirect3DVertexBuffer9_Lock(p,a,b,c,d)              (p)->Lock(a,b,c,d)
625#define IDirect3DVertexBuffer9_Unlock(p)                    (p)->Unlock()
626#define IDirect3DVertexBuffer9_GetDesc(p,a)                 (p)->GetDesc(a)
627#endif
628
629/*****************************************************************************
630 * IDirect3DIndexBuffer9 interface
631 */
632#define INTERFACE IDirect3DIndexBuffer9
633DECLARE_INTERFACE_(IDirect3DIndexBuffer9,IDirect3DResource9)
634{
635    /*** IUnknown methods ***/
636    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
637    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
638    STDMETHOD_(ULONG,Release)(THIS) PURE;
639    /*** IDirect3DResource9 methods ***/
640    STDMETHOD(GetDevice)(THIS_ struct IDirect3DDevice9** ppDevice) PURE;
641    STDMETHOD(SetPrivateData)(THIS_ REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) PURE;
642    STDMETHOD(GetPrivateData)(THIS_ REFGUID refguid, void* pData, DWORD* pSizeOfData) PURE;
643    STDMETHOD(FreePrivateData)(THIS_ REFGUID refguid) PURE;
644    STDMETHOD_(DWORD, SetPriority)(THIS_ DWORD PriorityNew) PURE;
645    STDMETHOD_(DWORD, GetPriority)(THIS) PURE;
646    STDMETHOD_(void, PreLoad)(THIS) PURE;
647    STDMETHOD_(D3DRESOURCETYPE, GetType)(THIS) PURE;
648    /*** IDirect3DIndexBuffer9 methods ***/
649    STDMETHOD(Lock)(THIS_ UINT OffsetToLock, UINT SizeToLock, void** ppbData, DWORD Flags) PURE;
650    STDMETHOD(Unlock)(THIS) PURE;
651    STDMETHOD(GetDesc)(THIS_ D3DINDEXBUFFER_DESC* pDesc) PURE;
652};
653#undef INTERFACE
654
655#if !defined(__cplusplus) || defined(CINTERFACE)
656/*** IUnknown methods ***/
657#define IDirect3DIndexBuffer9_QueryInterface(p,a,b)        (p)->lpVtbl->QueryInterface(p,a,b)
658#define IDirect3DIndexBuffer9_AddRef(p)                    (p)->lpVtbl->AddRef(p)
659#define IDirect3DIndexBuffer9_Release(p)                   (p)->lpVtbl->Release(p)
660/*** IDirect3DIndexBuffer9 methods: IDirect3DResource9 ***/
661#define IDirect3DIndexBuffer9_GetDevice(p,a)               (p)->lpVtbl->GetDevice(p,a)
662#define IDirect3DIndexBuffer9_SetPrivateData(p,a,b,c,d)    (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
663#define IDirect3DIndexBuffer9_GetPrivateData(p,a,b,c)      (p)->lpVtbl->GetPrivateData(p,a,b,c)
664#define IDirect3DIndexBuffer9_FreePrivateData(p,a)         (p)->lpVtbl->FreePrivateData(p,a)
665#define IDirect3DIndexBuffer9_SetPriority(p,a)             (p)->lpVtbl->SetPriority(p,a)
666#define IDirect3DIndexBuffer9_GetPriority(p)               (p)->lpVtbl->GetPriority(p)
667#define IDirect3DIndexBuffer9_PreLoad(p)                   (p)->lpVtbl->PreLoad(p)
668#define IDirect3DIndexBuffer9_GetType(p)                   (p)->lpVtbl->GetType(p)
669/*** IDirect3DIndexBuffer9 methods ***/
670#define IDirect3DIndexBuffer9_Lock(p,a,b,c,d)              (p)->lpVtbl->Lock(p,a,b,c,d)
671#define IDirect3DIndexBuffer9_Unlock(p)                    (p)->lpVtbl->Unlock(p)
672#define IDirect3DIndexBuffer9_GetDesc(p,a)                 (p)->lpVtbl->GetDesc(p,a)
673#else
674/*** IUnknown methods ***/
675#define IDirect3DIndexBuffer9_QueryInterface(p,a,b)        (p)->QueryInterface(a,b)
676#define IDirect3DIndexBuffer9_AddRef(p)                    (p)->AddRef()
677#define IDirect3DIndexBuffer9_Release(p)                   (p)->Release()
678/*** IDirect3DIndexBuffer9 methods: IDirect3DResource9 ***/
679#define IDirect3DIndexBuffer9_GetDevice(p,a)               (p)->GetDevice(a)
680#define IDirect3DIndexBuffer9_SetPrivateData(p,a,b,c,d)    (p)->SetPrivateData(a,b,c,d)
681#define IDirect3DIndexBuffer9_GetPrivateData(p,a,b,c)      (p)->GetPrivateData(a,b,c)
682#define IDirect3DIndexBuffer9_FreePrivateData(p,a)         (p)->FreePrivateData(a)
683#define IDirect3DIndexBuffer9_SetPriority(p,a)             (p)->SetPriority(a)
684#define IDirect3DIndexBuffer9_GetPriority(p)               (p)->GetPriority()
685#define IDirect3DIndexBuffer9_PreLoad(p)                   (p)->PreLoad()
686#define IDirect3DIndexBuffer9_GetType(p)                   (p)->GetType()
687/*** IDirect3DIndexBuffer9 methods ***/
688#define IDirect3DIndexBuffer9_Lock(p,a,b,c,d)              (p)->Lock(a,b,c,d)
689#define IDirect3DIndexBuffer9_Unlock(p)                    (p)->Unlock()
690#define IDirect3DIndexBuffer9_GetDesc(p,a)                 (p)->GetDesc(a)
691#endif
692
693/*****************************************************************************
694 * IDirect3DBaseTexture9 interface
695 */
696#define INTERFACE IDirect3DBaseTexture9
697DECLARE_INTERFACE_(IDirect3DBaseTexture9,IDirect3DResource9)
698{
699    /*** IUnknown methods ***/
700    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
701    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
702    STDMETHOD_(ULONG,Release)(THIS) PURE;
703    /*** IDirect3DResource9 methods ***/
704    STDMETHOD(GetDevice)(THIS_ struct IDirect3DDevice9** ppDevice) PURE;
705    STDMETHOD(SetPrivateData)(THIS_ REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) PURE;
706    STDMETHOD(GetPrivateData)(THIS_ REFGUID refguid, void* pData, DWORD* pSizeOfData) PURE;
707    STDMETHOD(FreePrivateData)(THIS_ REFGUID refguid) PURE;
708    STDMETHOD_(DWORD, SetPriority)(THIS_ DWORD PriorityNew) PURE;
709    STDMETHOD_(DWORD, GetPriority)(THIS) PURE;
710    STDMETHOD_(void, PreLoad)(THIS) PURE;
711    STDMETHOD_(D3DRESOURCETYPE, GetType)(THIS) PURE;
712    /*** IDirect3DBaseTexture9 methods ***/
713    STDMETHOD_(DWORD, SetLOD)(THIS_ DWORD LODNew) PURE;
714    STDMETHOD_(DWORD, GetLOD)(THIS) PURE;
715    STDMETHOD_(DWORD, GetLevelCount)(THIS) PURE;
716    STDMETHOD(SetAutoGenFilterType)(THIS_ D3DTEXTUREFILTERTYPE FilterType) PURE;
717    STDMETHOD_(D3DTEXTUREFILTERTYPE, GetAutoGenFilterType)(THIS) PURE;
718    STDMETHOD_(void, GenerateMipSubLevels)(THIS) PURE;
719};
720#undef INTERFACE
721
722#if !defined(__cplusplus) || defined(CINTERFACE)
723/*** IUnknown methods ***/
724#define IDirect3DBaseTexture9_QueryInterface(p,a,b)  (p)->lpVtbl->QueryInterface(p,a,b)
725#define IDirect3DBaseTexture9_AddRef(p)              (p)->lpVtbl->AddRef(p)
726#define IDirect3DBaseTexture9_Release(p)             (p)->lpVtbl->Release(p)
727/*** IDirect3DBaseTexture9 methods: IDirect3DResource9 ***/
728#define IDirect3DBaseTexture9_GetDevice(p,a)             (p)->lpVtbl->GetDevice(p,a)
729#define IDirect3DBaseTexture9_SetPrivateData(p,a,b,c,d)  (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
730#define IDirect3DBaseTexture9_GetPrivateData(p,a,b,c)    (p)->lpVtbl->GetPrivateData(p,a,b,c)
731#define IDirect3DBaseTexture9_FreePrivateData(p,a)       (p)->lpVtbl->FreePrivateData(p,a)
732#define IDirect3DBaseTexture9_SetPriority(p,a)           (p)->lpVtbl->SetPriority(p,a)
733#define IDirect3DBaseTexture9_GetPriority(p)             (p)->lpVtbl->GetPriority(p)
734#define IDirect3DBaseTexture9_PreLoad(p)                 (p)->lpVtbl->PreLoad(p)
735#define IDirect3DBaseTexture9_GetType(p)                 (p)->lpVtbl->GetType(p)
736/*** IDirect3DBaseTexture9 methods ***/
737#define IDirect3DBaseTexture9_SetLOD(p,a)                (p)->lpVtbl->SetLOD(p,a)
738#define IDirect3DBaseTexture9_GetLOD(p)                  (p)->lpVtbl->GetLOD(p)
739#define IDirect3DBaseTexture9_GetLevelCount(p)           (p)->lpVtbl->GetLevelCount(p)
740#define IDirect3DBaseTexture9_SetAutoGenFilterType(p,a)  (p)->lpVtbl->SetAutoGenFilterType(p,a)
741#define IDirect3DBaseTexture9_GetAutoGenFilterType(p)    (p)->lpVtbl->GetAutoGenFilterType(p)
742#define IDirect3DBaseTexture9_GenerateMipSubLevels(p)    (p)->lpVtbl->GenerateMipSubLevels(p)
743#else
744/*** IUnknown methods ***/
745#define IDirect3DBaseTexture9_QueryInterface(p,a,b)  (p)->QueryInterface(a,b)
746#define IDirect3DBaseTexture9_AddRef(p)              (p)->AddRef()
747#define IDirect3DBaseTexture9_Release(p)             (p)->Release()
748/*** IDirect3DBaseTexture9 methods: IDirect3DResource9 ***/
749#define IDirect3DBaseTexture9_GetDevice(p,a)             (p)->GetDevice(a)
750#define IDirect3DBaseTexture9_SetPrivateData(p,a,b,c,d)  (p)->SetPrivateData(a,b,c,d)
751#define IDirect3DBaseTexture9_GetPrivateData(p,a,b,c)    (p)->GetPrivateData(a,b,c)
752#define IDirect3DBaseTexture9_FreePrivateData(p,a)       (p)->FreePrivateData(a)
753#define IDirect3DBaseTexture9_SetPriority(p,a)           (p)->SetPriority(a)
754#define IDirect3DBaseTexture9_GetPriority(p)             (p)->GetPriority()
755#define IDirect3DBaseTexture9_PreLoad(p)                 (p)->PreLoad()
756#define IDirect3DBaseTexture9_GetType(p)                 (p)->GetType()
757/*** IDirect3DBaseTexture9 methods ***/
758#define IDirect3DBaseTexture9_SetLOD(p,a)                (p)->SetLOD(a)
759#define IDirect3DBaseTexture9_GetLOD(p)                  (p)->GetLOD()
760#define IDirect3DBaseTexture9_GetLevelCount(p)           (p)->GetLevelCount()
761#define IDirect3DBaseTexture9_SetAutoGenFilterType(p,a)  (p)->SetAutoGenFilterType(a)
762#define IDirect3DBaseTexture9_GetAutoGenFilterType(p)    (p)->GetAutoGenFilterType()
763#define IDirect3DBaseTexture9_GenerateMipSubLevels(p)    (p)->GenerateMipSubLevels()
764#endif
765
766/*****************************************************************************
767 * IDirect3DCubeTexture9 interface
768 */
769#define INTERFACE IDirect3DCubeTexture9
770DECLARE_INTERFACE_(IDirect3DCubeTexture9,IDirect3DBaseTexture9)
771{
772    /*** IUnknown methods ***/
773    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
774    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
775    STDMETHOD_(ULONG,Release)(THIS) PURE;
776    /*** IDirect3DResource9 methods ***/
777    STDMETHOD(GetDevice)(THIS_ struct IDirect3DDevice9** ppDevice) PURE;
778    STDMETHOD(SetPrivateData)(THIS_ REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) PURE;
779    STDMETHOD(GetPrivateData)(THIS_ REFGUID refguid, void* pData, DWORD* pSizeOfData) PURE;
780    STDMETHOD(FreePrivateData)(THIS_ REFGUID refguid) PURE;
781    STDMETHOD_(DWORD, SetPriority)(THIS_ DWORD PriorityNew) PURE;
782    STDMETHOD_(DWORD, GetPriority)(THIS) PURE;
783    STDMETHOD_(void, PreLoad)(THIS) PURE;
784    STDMETHOD_(D3DRESOURCETYPE, GetType)(THIS) PURE;
785    /*** IDirect3DBaseTexture9 methods ***/
786    STDMETHOD_(DWORD, SetLOD)(THIS_ DWORD LODNew) PURE;
787    STDMETHOD_(DWORD, GetLOD)(THIS) PURE;
788    STDMETHOD_(DWORD, GetLevelCount)(THIS) PURE;
789    STDMETHOD(SetAutoGenFilterType)(THIS_ D3DTEXTUREFILTERTYPE FilterType) PURE;
790    STDMETHOD_(D3DTEXTUREFILTERTYPE, GetAutoGenFilterType)(THIS) PURE;
791    STDMETHOD_(void, GenerateMipSubLevels)(THIS) PURE;
792    /*** IDirect3DCubeTexture9 methods ***/
793    STDMETHOD(GetLevelDesc)(THIS_ UINT Level,D3DSURFACE_DESC* pDesc) PURE;
794    STDMETHOD(GetCubeMapSurface)(THIS_ D3DCUBEMAP_FACES FaceType, UINT Level, IDirect3DSurface9** ppCubeMapSurface) PURE;
795    STDMETHOD(LockRect)(THIS_ D3DCUBEMAP_FACES FaceType, UINT Level, D3DLOCKED_RECT* pLockedRect, CONST RECT* pRect, DWORD Flags) PURE;
796    STDMETHOD(UnlockRect)(THIS_ D3DCUBEMAP_FACES FaceType, UINT Level) PURE;
797    STDMETHOD(AddDirtyRect)(THIS_ D3DCUBEMAP_FACES FaceType, CONST RECT* pDirtyRect) PURE;
798};
799#undef INTERFACE
800
801#if !defined(__cplusplus) || defined(CINTERFACE)
802/*** IUnknown methods ***/
803#define IDirect3DCubeTexture9_QueryInterface(p,a,b)       (p)->lpVtbl->QueryInterface(p,a,b)
804#define IDirect3DCubeTexture9_AddRef(p)                   (p)->lpVtbl->AddRef(p)
805#define IDirect3DCubeTexture9_Release(p)                  (p)->lpVtbl->Release(p)
806/*** IDirect3DCubeTexture9 methods: IDirect3DResource9 ***/
807#define IDirect3DCubeTexture9_GetDevice(p,a)              (p)->lpVtbl->GetDevice(p,a)
808#define IDirect3DCubeTexture9_SetPrivateData(p,a,b,c,d)   (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
809#define IDirect3DCubeTexture9_GetPrivateData(p,a,b,c)     (p)->lpVtbl->GetPrivateData(p,a,b,c)
810#define IDirect3DCubeTexture9_FreePrivateData(p,a)        (p)->lpVtbl->FreePrivateData(p,a)
811#define IDirect3DCubeTexture9_SetPriority(p,a)            (p)->lpVtbl->SetPriority(p,a)
812#define IDirect3DCubeTexture9_GetPriority(p)              (p)->lpVtbl->GetPriority(p)
813#define IDirect3DCubeTexture9_PreLoad(p)                  (p)->lpVtbl->PreLoad(p)
814#define IDirect3DCubeTexture9_GetType(p)                  (p)->lpVtbl->GetType(p)
815/*** IDirect3DCubeTexture9 methods: IDirect3DBaseTexture9 ***/
816#define IDirect3DCubeTexture9_SetLOD(p,a)                 (p)->lpVtbl->SetLOD(p,a)
817#define IDirect3DCubeTexture9_GetLOD(p)                   (p)->lpVtbl->GetLOD(p)
818#define IDirect3DCubeTexture9_GetLevelCount(p)            (p)->lpVtbl->GetLevelCount(p)
819#define IDirect3DCubeTexture9_SetAutoGenFilterType(p,a)   (p)->lpVtbl->SetAutoGenFilterType(p,a)
820#define IDirect3DCubeTexture9_GetAutoGenFilterType(p)     (p)->lpVtbl->GetAutoGenFilterType(p)
821#define IDirect3DCubeTexture9_GenerateMipSubLevels(p)     (p)->lpVtbl->GenerateMipSubLevels(p)
822/*** IDirect3DCubeTexture9 methods ***/
823#define IDirect3DCubeTexture9_GetLevelDesc(p,a,b)         (p)->lpVtbl->GetLevelDesc(p,a,b)
824#define IDirect3DCubeTexture9_GetCubeMapSurface(p,a,b,c)  (p)->lpVtbl->GetCubeMapSurface(p,a,b,c)
825#define IDirect3DCubeTexture9_LockRect(p,a,b,c,d,e)       (p)->lpVtbl->LockRect(p,a,b,c,d,e)
826#define IDirect3DCubeTexture9_UnlockRect(p,a,b)           (p)->lpVtbl->UnlockRect(p,a,b)
827#define IDirect3DCubeTexture9_AddDirtyRect(p,a,b)         (p)->lpVtbl->AddDirtyRect(p,a,b)
828#else
829/*** IUnknown methods ***/
830#define IDirect3DCubeTexture9_QueryInterface(p,a,b)       (p)->QueryInterface(a,b)
831#define IDirect3DCubeTexture9_AddRef(p)                   (p)->AddRef()
832#define IDirect3DCubeTexture9_Release(p)                  (p)->Release()
833/*** IDirect3DCubeTexture9 methods: IDirect3DResource9 ***/
834#define IDirect3DCubeTexture9_GetDevice(p,a)              (p)->GetDevice(a)
835#define IDirect3DCubeTexture9_SetPrivateData(p,a,b,c,d)   (p)->SetPrivateData(a,b,c,d)
836#define IDirect3DCubeTexture9_GetPrivateData(p,a,b,c)     (p)->GetPrivateData(a,b,c)
837#define IDirect3DCubeTexture9_FreePrivateData(p,a)        (p)->FreePrivateData(a)
838#define IDirect3DCubeTexture9_SetPriority(p,a)            (p)->SetPriority(a)
839#define IDirect3DCubeTexture9_GetPriority(p)              (p)->GetPriority()
840#define IDirect3DCubeTexture9_PreLoad(p)                  (p)->PreLoad()
841#define IDirect3DCubeTexture9_GetType(p)                  (p)->GetType()
842/*** IDirect3DCubeTexture9 methods: IDirect3DBaseTexture9 ***/
843#define IDirect3DCubeTexture9_SetLOD(p,a)                 (p)->SetLOD(a)
844#define IDirect3DCubeTexture9_GetLOD(p)                   (p)->GetLOD()
845#define IDirect3DCubeTexture9_GetLevelCount(p)            (p)->GetLevelCount()
846#define IDirect3DCubeTexture9_SetAutoGenFilterType(p,a)   (p)->SetAutoGenFilterType(a)
847#define IDirect3DCubeTexture9_GetAutoGenFilterType(p)     (p)->GetAutoGenFilterType()
848#define IDirect3DCubeTexture9_GenerateMipSubLevels(p)     (p)->GenerateMipSubLevels()
849/*** IDirect3DCubeTexture9 methods ***/
850#define IDirect3DCubeTexture9_GetLevelDesc(p,a,b)         (p)->GetLevelDesc(a,b)
851#define IDirect3DCubeTexture9_GetCubeMapSurface(p,a,b,c)  (p)->GetCubeMapSurface(a,b,c)
852#define IDirect3DCubeTexture9_LockRect(p,a,b,c,d,e)       (p)->LockRect(a,b,c,d,e)
853#define IDirect3DCubeTexture9_UnlockRect(p,a,b)           (p)->UnlockRect(a,b)
854#define IDirect3DCubeTexture9_AddDirtyRect(p,a,b)         (p)->AddDirtyRect(a,b)
855#endif
856
857/*****************************************************************************
858 * IDirect3DTexture9 interface
859 */
860#define INTERFACE IDirect3DTexture9
861DECLARE_INTERFACE_(IDirect3DTexture9,IDirect3DBaseTexture9)
862{
863    /*** IUnknown methods ***/
864    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
865    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
866    STDMETHOD_(ULONG,Release)(THIS) PURE;
867    /*** IDirect3DResource9 methods ***/
868    STDMETHOD(GetDevice)(THIS_ struct IDirect3DDevice9** ppDevice) PURE;
869    STDMETHOD(SetPrivateData)(THIS_ REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) PURE;
870    STDMETHOD(GetPrivateData)(THIS_ REFGUID refguid, void* pData, DWORD* pSizeOfData) PURE;
871    STDMETHOD(FreePrivateData)(THIS_ REFGUID refguid) PURE;
872    STDMETHOD_(DWORD, SetPriority)(THIS_ DWORD PriorityNew) PURE;
873    STDMETHOD_(DWORD, GetPriority)(THIS) PURE;
874    STDMETHOD_(void, PreLoad)(THIS) PURE;
875    STDMETHOD_(D3DRESOURCETYPE, GetType)(THIS) PURE;
876    /*** IDirect3DBaseTexture9 methods ***/
877    STDMETHOD_(DWORD, SetLOD)(THIS_ DWORD LODNew) PURE;
878    STDMETHOD_(DWORD, GetLOD)(THIS) PURE;
879    STDMETHOD_(DWORD, GetLevelCount)(THIS) PURE;
880    STDMETHOD(SetAutoGenFilterType)(THIS_ D3DTEXTUREFILTERTYPE FilterType) PURE;
881    STDMETHOD_(D3DTEXTUREFILTERTYPE, GetAutoGenFilterType)(THIS) PURE;
882    STDMETHOD_(void, GenerateMipSubLevels)(THIS) PURE;
883    /*** IDirect3DTexture9 methods ***/
884    STDMETHOD(GetLevelDesc)(THIS_ UINT Level, D3DSURFACE_DESC* pDesc) PURE;
885    STDMETHOD(GetSurfaceLevel)(THIS_ UINT Level, IDirect3DSurface9** ppSurfaceLevel) PURE;
886    STDMETHOD(LockRect)(THIS_ UINT Level, D3DLOCKED_RECT* pLockedRect, CONST RECT* pRect, DWORD Flags) PURE;
887    STDMETHOD(UnlockRect)(THIS_ UINT Level) PURE;
888    STDMETHOD(AddDirtyRect)(THIS_ CONST RECT* pDirtyRect) PURE;
889};
890#undef INTERFACE
891
892#if !defined(__cplusplus) || defined(CINTERFACE)
893/*** IUnknown methods ***/
894#define IDirect3DTexture9_QueryInterface(p,a,b)      (p)->lpVtbl->QueryInterface(p,a,b)
895#define IDirect3DTexture9_AddRef(p)                  (p)->lpVtbl->AddRef(p)
896#define IDirect3DTexture9_Release(p)                 (p)->lpVtbl->Release(p)
897/*** IDirect3DTexture9 methods: IDirect3DResource9 ***/
898#define IDirect3DTexture9_GetDevice(p,a)             (p)->lpVtbl->GetDevice(p,a)
899#define IDirect3DTexture9_SetPrivateData(p,a,b,c,d)  (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
900#define IDirect3DTexture9_GetPrivateData(p,a,b,c)    (p)->lpVtbl->GetPrivateData(p,a,b,c)
901#define IDirect3DTexture9_FreePrivateData(p,a)       (p)->lpVtbl->FreePrivateData(p,a)
902#define IDirect3DTexture9_SetPriority(p,a)           (p)->lpVtbl->SetPriority(p,a)
903#define IDirect3DTexture9_GetPriority(p)             (p)->lpVtbl->GetPriority(p)
904#define IDirect3DTexture9_PreLoad(p)                 (p)->lpVtbl->PreLoad(p)
905#define IDirect3DTexture9_GetType(p)                 (p)->lpVtbl->GetType(p)
906/*** IDirect3DTexture9 methods: IDirect3DBaseTexture9 ***/
907#define IDirect3DTexture9_SetLOD(p,a)                (p)->lpVtbl->SetLOD(p,a)
908#define IDirect3DTexture9_GetLOD(p)                  (p)->lpVtbl->GetLOD(p)
909#define IDirect3DTexture9_GetLevelCount(p)           (p)->lpVtbl->GetLevelCount(p)
910#define IDirect3DTexture9_SetAutoGenFilterType(p,a)  (p)->lpVtbl->SetAutoGenFilterType(p,a)
911#define IDirect3DTexture9_GetAutoGenFilterType(p)    (p)->lpVtbl->GetAutoGenFilterType(p)
912#define IDirect3DTexture9_GenerateMipSubLevels(p)    (p)->lpVtbl->GenerateMipSubLevels(p)
913/*** IDirect3DTexture9 methods ***/
914#define IDirect3DTexture9_GetLevelDesc(p,a,b)        (p)->lpVtbl->GetLevelDesc(p,a,b)
915#define IDirect3DTexture9_GetSurfaceLevel(p,a,b)     (p)->lpVtbl->GetSurfaceLevel(p,a,b)
916#define IDirect3DTexture9_LockRect(p,a,b,c,d)        (p)->lpVtbl->LockRect(p,a,b,c,d)
917#define IDirect3DTexture9_UnlockRect(p,a)            (p)->lpVtbl->UnlockRect(p,a)
918#define IDirect3DTexture9_AddDirtyRect(p,a)          (p)->lpVtbl->AddDirtyRect(p,a)
919#else
920/*** IUnknown methods ***/
921#define IDirect3DTexture9_QueryInterface(p,a,b)      (p)->QueryInterface(a,b)
922#define IDirect3DTexture9_AddRef(p)                  (p)->AddRef()
923#define IDirect3DTexture9_Release(p)                 (p)->Release()
924/*** IDirect3DTexture9 methods: IDirect3DResource9 ***/
925#define IDirect3DTexture9_GetDevice(p,a)             (p)->GetDevice(a)
926#define IDirect3DTexture9_SetPrivateData(p,a,b,c,d)  (p)->SetPrivateData(a,b,c,d)
927#define IDirect3DTexture9_GetPrivateData(p,a,b,c)    (p)->GetPrivateData(a,b,c)
928#define IDirect3DTexture9_FreePrivateData(p,a)       (p)->FreePrivateData(a)
929#define IDirect3DTexture9_SetPriority(p,a)           (p)->SetPriority(a)
930#define IDirect3DTexture9_GetPriority(p)             (p)->GetPriority()
931#define IDirect3DTexture9_PreLoad(p)                 (p)->PreLoad()
932#define IDirect3DTexture9_GetType(p)                 (p)->GetType()
933/*** IDirect3DTexture9 methods: IDirect3DBaseTexture9 ***/
934#define IDirect3DTexture9_SetLOD(p,a)                (p)->SetLOD(a)
935#define IDirect3DTexture9_GetLOD(p)                  (p)->GetLOD()
936#define IDirect3DTexture9_GetLevelCount(p)           (p)->GetLevelCount()
937#define IDirect3DTexture9_SetAutoGenFilterType(p,a)  (p)->SetAutoGenFilterType(a)
938#define IDirect3DTexture9_GetAutoGenFilterType(p)    (p)->GetAutoGenFilterType()
939#define IDirect3DTexture9_GenerateMipSubLevels(p)    (p)->GenerateMipSubLevels()
940/*** IDirect3DTexture9 methods ***/
941#define IDirect3DTexture9_GetLevelDesc(p,a,b)        (p)->GetLevelDesc(a,b)
942#define IDirect3DTexture9_GetSurfaceLevel(p,a,b)     (p)->GetSurfaceLevel(a,b)
943#define IDirect3DTexture9_LockRect(p,a,b,c,d)        (p)->LockRect(a,b,c,d)
944#define IDirect3DTexture9_UnlockRect(p,a)            (p)->UnlockRect(a)
945#define IDirect3DTexture9_AddDirtyRect(p,a)          (p)->AddDirtyRect(a)
946#endif
947
948/*****************************************************************************
949 * IDirect3DVolumeTexture9 interface
950 */
951#define INTERFACE IDirect3DVolumeTexture9
952DECLARE_INTERFACE_(IDirect3DVolumeTexture9,IDirect3DBaseTexture9)
953{
954    /*** IUnknown methods ***/
955    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
956    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
957    STDMETHOD_(ULONG,Release)(THIS) PURE;
958    /*** IDirect3DResource9 methods ***/
959    STDMETHOD(GetDevice)(THIS_ struct IDirect3DDevice9** ppDevice) PURE;
960    STDMETHOD(SetPrivateData)(THIS_ REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) PURE;
961    STDMETHOD(GetPrivateData)(THIS_ REFGUID refguid, void* pData, DWORD* pSizeOfData) PURE;
962    STDMETHOD(FreePrivateData)(THIS_ REFGUID refguid) PURE;
963    STDMETHOD_(DWORD, SetPriority)(THIS_ DWORD PriorityNew) PURE;
964    STDMETHOD_(DWORD, GetPriority)(THIS) PURE;
965    STDMETHOD_(void, PreLoad)(THIS) PURE;
966    STDMETHOD_(D3DRESOURCETYPE, GetType)(THIS) PURE;
967    /*** IDirect3DBaseTexture9 methods ***/
968    STDMETHOD_(DWORD, SetLOD)(THIS_ DWORD LODNew) PURE;
969    STDMETHOD_(DWORD, GetLOD)(THIS) PURE;
970    STDMETHOD_(DWORD, GetLevelCount)(THIS) PURE;
971    STDMETHOD(SetAutoGenFilterType)(THIS_ D3DTEXTUREFILTERTYPE FilterType) PURE;
972    STDMETHOD_(D3DTEXTUREFILTERTYPE, GetAutoGenFilterType)(THIS) PURE;
973    STDMETHOD_(void, GenerateMipSubLevels)(THIS) PURE;
974    /*** IDirect3DVolumeTexture9 methods ***/
975    STDMETHOD(GetLevelDesc)(THIS_ UINT Level, D3DVOLUME_DESC *pDesc) PURE;
976    STDMETHOD(GetVolumeLevel)(THIS_ UINT Level, IDirect3DVolume9** ppVolumeLevel) PURE;
977    STDMETHOD(LockBox)(THIS_ UINT Level, D3DLOCKED_BOX* pLockedVolume, CONST D3DBOX* pBox, DWORD Flags) PURE;
978    STDMETHOD(UnlockBox)(THIS_ UINT Level) PURE;
979    STDMETHOD(AddDirtyBox)(THIS_ CONST D3DBOX* pDirtyBox) PURE;
980};
981#undef INTERFACE
982
983#if !defined(__cplusplus) || defined(CINTERFACE)
984/*** IUnknown methods ***/
985#define IDirect3DVolumeTexture9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
986#define IDirect3DVolumeTexture9_AddRef(p) (p)->lpVtbl->AddRef(p)
987#define IDirect3DVolumeTexture9_Release(p) (p)->lpVtbl->Release(p)
988/*** IDirect3DVolumeTexture9 methods: IDirect3DResource9 ***/
989#define IDirect3DVolumeTexture9_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
990#define IDirect3DVolumeTexture9_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d)
991#define IDirect3DVolumeTexture9_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c)
992#define IDirect3DVolumeTexture9_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a)
993#define IDirect3DVolumeTexture9_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a)
994#define IDirect3DVolumeTexture9_GetPriority(p) (p)->lpVtbl->GetPriority(p)
995#define IDirect3DVolumeTexture9_PreLoad(p) (p)->lpVtbl->PreLoad(p)
996#define IDirect3DVolumeTexture9_GetType(p) (p)->lpVtbl->GetType(p)
997/*** IDirect3DVolumeTexture9 methods: IDirect3DBaseTexture9 ***/
998#define IDirect3DVolumeTexture9_SetLOD(p,a) (p)->lpVtbl->SetLOD(p,a)
999#define IDirect3DVolumeTexture9_GetLOD(p) (p)->lpVtbl->GetLOD(p)
1000#define IDirect3DVolumeTexture9_GetLevelCount(p) (p)->lpVtbl->GetLevelCount(p)
1001#define IDirect3DVolumeTexture9_SetAutoGenFilterType(p,a) (p)->lpVtbl->SetAutoGenFilterType(p,a)
1002#define IDirect3DVolumeTexture9_GetAutoGenFilterType(p) (p)->lpVtbl->GetAutoGenFilterType(p)
1003#define IDirect3DVolumeTexture9_GenerateMipSubLevels(p) (p)->lpVtbl->GenerateMipSubLevels(p)
1004/*** IDirect3DVolumeTexture9 methods ***/
1005#define IDirect3DVolumeTexture9_GetLevelDesc(p,a,b) (p)->lpVtbl->GetLevelDesc(p,a,b)
1006#define IDirect3DVolumeTexture9_GetVolumeLevel(p,a,b) (p)->lpVtbl->GetVolumeLevel(p,a,b)
1007#define IDirect3DVolumeTexture9_LockBox(p,a,b,c,d) (p)->lpVtbl->LockBox(p,a,b,c,d)
1008#define IDirect3DVolumeTexture9_UnlockBox(p,a) (p)->lpVtbl->UnlockBox(p,a)
1009#define IDirect3DVolumeTexture9_AddDirtyBox(p,a) (p)->lpVtbl->AddDirtyBox(p,a)
1010#else
1011/*** IUnknown methods ***/
1012#define IDirect3DVolumeTexture9_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1013#define IDirect3DVolumeTexture9_AddRef(p) (p)->AddRef()
1014#define IDirect3DVolumeTexture9_Release(p) (p)->Release()
1015/*** IDirect3DVolumeTexture9 methods: IDirect3DResource9 ***/
1016#define IDirect3DVolumeTexture9_GetDevice(p,a) (p)->GetDevice(a)
1017#define IDirect3DVolumeTexture9_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d)
1018#define IDirect3DVolumeTexture9_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c)
1019#define IDirect3DVolumeTexture9_FreePrivateData(p,a) (p)->FreePrivateData(a)
1020#define IDirect3DVolumeTexture9_SetPriority(p,a) (p)->SetPriority(a)
1021#define IDirect3DVolumeTexture9_GetPriority(p) (p)->GetPriority()
1022#define IDirect3DVolumeTexture9_PreLoad(p) (p)->PreLoad()
1023#define IDirect3DVolumeTexture9_GetType(p) (p)->GetType()
1024/*** IDirect3DVolumeTexture9 methods: IDirect3DBaseTexture9 ***/
1025#define IDirect3DVolumeTexture9_SetLOD(p,a) (p)->SetLOD(a)
1026#define IDirect3DVolumeTexture9_GetLOD(p) (p)->GetLOD()
1027#define IDirect3DVolumeTexture9_GetLevelCount(p) (p)->GetLevelCount()
1028#define IDirect3DVolumeTexture9_SetAutoGenFilterType(p,a) (p)->SetAutoGenFilterType(a)
1029#define IDirect3DVolumeTexture9_GetAutoGenFilterType(p) (p)->GetAutoGenFilterType()
1030#define IDirect3DVolumeTexture9_GenerateMipSubLevels(p) (p)->GenerateMipSubLevels()
1031/*** IDirect3DVolumeTexture9 methods ***/
1032#define IDirect3DVolumeTexture9_GetLevelDesc(p,a,b) (p)->GetLevelDesc(a,b)
1033#define IDirect3DVolumeTexture9_GetVolumeLevel(p,a,b) (p)->GetVolumeLevel(a,b)
1034#define IDirect3DVolumeTexture9_LockBox(p,a,b,c,d) (p)->LockBox(a,b,c,d)
1035#define IDirect3DVolumeTexture9_UnlockBox(p,a) (p)->UnlockBox(a)
1036#define IDirect3DVolumeTexture9_AddDirtyBox(p,a) (p)->AddDirtyBox(a)
1037#endif
1038
1039/*****************************************************************************
1040 * IDirect3DVertexDeclaration9 interface
1041 */
1042#define INTERFACE IDirect3DVertexDeclaration9
1043DECLARE_INTERFACE_(IDirect3DVertexDeclaration9,IUnknown)
1044{
1045    /*** IUnknown methods ***/
1046    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1047    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1048    STDMETHOD_(ULONG,Release)(THIS) PURE;
1049    /*** IDirect3DVertexDeclaration9 methods ***/
1050    STDMETHOD(GetDevice)(THIS_ struct IDirect3DDevice9** ppDevice) PURE;
1051    STDMETHOD(GetDeclaration)(THIS_ D3DVERTEXELEMENT9*, UINT* pNumElements) PURE;
1052};
1053#undef INTERFACE
1054
1055#if !defined(__cplusplus) || defined(CINTERFACE)
1056/*** IUnknown methods ***/
1057#define IDirect3DVertexDeclaration9_QueryInterface(p,a,b)  (p)->lpVtbl->QueryInterface(p,a,b)
1058#define IDirect3DVertexDeclaration9_AddRef(p)              (p)->lpVtbl->AddRef(p)
1059#define IDirect3DVertexDeclaration9_Release(p)             (p)->lpVtbl->Release(p)
1060/*** IDirect3DVertexShader9 methods ***/
1061#define IDirect3DVertexDeclaration9_GetDevice(p,a)         (p)->lpVtbl->GetDevice(p,a)
1062#define IDirect3DVertexDeclaration9_GetDeclaration(p,a,b)  (p)->lpVtbl->GetDeclaration(p,a,b)
1063#else
1064/*** IUnknown methods ***/
1065#define IDirect3DVertexDeclaration9_QueryInterface(p,a,b)  (p)->QueryInterface(a,b)
1066#define IDirect3DVertexDeclaration9_AddRef(p)              (p)->AddRef()
1067#define IDirect3DVertexDeclaration9_Release(p)             (p)->Release()
1068/*** IDirect3DVertexShader9 methods ***/
1069#define IDirect3DVertexDeclaration9_GetDevice(p,a)         (p)->GetDevice(a)
1070#define IDirect3DVertexDeclaration9_GetDeclaration(p,a,b)  (p)->GetDeclaration(a,b)
1071#endif
1072
1073/*****************************************************************************
1074 * IDirect3DVertexShader9 interface
1075 */
1076#define INTERFACE IDirect3DVertexShader9
1077DECLARE_INTERFACE_(IDirect3DVertexShader9,IUnknown)
1078{
1079    /*** IUnknown methods ***/
1080    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1081    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1082    STDMETHOD_(ULONG,Release)(THIS) PURE;
1083    /*** IDirect3DVertexShader9 methods ***/
1084    STDMETHOD(GetDevice)(THIS_ struct IDirect3DDevice9** ppDevice) PURE;
1085    STDMETHOD(GetFunction)(THIS_ void*, UINT* pSizeOfData) PURE;
1086};
1087#undef INTERFACE
1088
1089#if !defined(__cplusplus) || defined(CINTERFACE)
1090/*** IUnknown methods ***/
1091#define IDirect3DVertexShader9_QueryInterface(p,a,b)  (p)->lpVtbl->QueryInterface(p,a,b)
1092#define IDirect3DVertexShader9_AddRef(p)              (p)->lpVtbl->AddRef(p)
1093#define IDirect3DVertexShader9_Release(p)             (p)->lpVtbl->Release(p)
1094/*** IDirect3DVertexShader9 methods ***/
1095#define IDirect3DVertexShader9_GetDevice(p,a)         (p)->lpVtbl->GetDevice(p,a)
1096#define IDirect3DVertexShader9_GetFunction(p,a,b)     (p)->lpVtbl->GetFunction(p,a,b)
1097#else
1098/*** IUnknown methods ***/
1099#define IDirect3DVertexShader9_QueryInterface(p,a,b)  (p)->QueryInterface(a,b)
1100#define IDirect3DVertexShader9_AddRef(p)              (p)->AddRef()
1101#define IDirect3DVertexShader9_Release(p)             (p)->Release()
1102/*** IDirect3DVertexShader9 methods ***/
1103#define IDirect3DVertexShader9_GetDevice(p,a)         (p)->GetDevice(a)
1104#define IDirect3DVertexShader9_GetFunction(p,a,b)     (p)->GetFunction(a,b)
1105#endif
1106
1107/*****************************************************************************
1108 * IDirect3DPixelShader9 interface
1109 */
1110#define INTERFACE IDirect3DPixelShader9
1111DECLARE_INTERFACE_(IDirect3DPixelShader9,IUnknown)
1112{
1113    /*** IUnknown methods ***/
1114    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1115    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1116    STDMETHOD_(ULONG,Release)(THIS) PURE;
1117    /*** IDirect3DPixelShader9 methods ***/
1118    STDMETHOD(GetDevice)(THIS_ struct IDirect3DDevice9** ppDevice) PURE;
1119    STDMETHOD(GetFunction)(THIS_ void*, UINT* pSizeOfData) PURE;
1120};
1121#undef INTERFACE
1122
1123#if !defined(__cplusplus) || defined(CINTERFACE)
1124/*** IUnknown methods ***/
1125#define IDirect3DPixelShader9_QueryInterface(p,a,b)  (p)->lpVtbl->QueryInterface(p,a,b)
1126#define IDirect3DPixelShader9_AddRef(p)              (p)->lpVtbl->AddRef(p)
1127#define IDirect3DPixelShader9_Release(p)             (p)->lpVtbl->Release(p)
1128/*** IDirect3DPixelShader9 methods ***/
1129#define IDirect3DPixelShader9_GetDevice(p,a)         (p)->lpVtbl->GetDevice(p,a)
1130#define IDirect3DPixelShader9_GetFunction(p,a,b)     (p)->lpVtbl->GetFunction(p,a,b)
1131#else
1132/*** IUnknown methods ***/
1133#define IDirect3DPixelShader9_QueryInterface(p,a,b)  (p)->QueryInterface(a,b)
1134#define IDirect3DPixelShader9_AddRef(p)              (p)->AddRef()
1135#define IDirect3DPixelShader9_Release(p)             (p)->Release()
1136/*** IDirect3DPixelShader9 methods ***/
1137#define IDirect3DPixelShader9_GetDevice(p,a)         (p)->GetDevice(a)
1138#define IDirect3DPixelShader9_GetFunction(p,a,b)     (p)->GetFunction(a,b)
1139#endif
1140
1141/*****************************************************************************
1142 * IDirect3DStateBlock9 interface
1143 */
1144#define INTERFACE IDirect3DStateBlock9
1145DECLARE_INTERFACE_(IDirect3DStateBlock9,IUnknown)
1146{
1147    /*** IUnknown methods ***/
1148    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1149    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1150    STDMETHOD_(ULONG,Release)(THIS) PURE;
1151    /*** IDirect3DStateBlock9 methods ***/
1152    STDMETHOD(GetDevice)(THIS_ struct IDirect3DDevice9** ppDevice) PURE;
1153    STDMETHOD(Capture)(THIS) PURE;
1154    STDMETHOD(Apply)(THIS) PURE;
1155};
1156#undef INTERFACE
1157
1158#if !defined(__cplusplus) || defined(CINTERFACE)
1159/*** IUnknown methods ***/
1160#define IDirect3DStateBlock9_QueryInterface(p,a,b)  (p)->lpVtbl->QueryInterface(p,a,b)
1161#define IDirect3DStateBlock9_AddRef(p)              (p)->lpVtbl->AddRef(p)
1162#define IDirect3DStateBlock9_Release(p)             (p)->lpVtbl->Release(p)
1163/*** IDirect3DStateBlock9 methods ***/
1164#define IDirect3DStateBlock9_GetDevice(p,a)         (p)->lpVtbl->GetDevice(p,a)
1165#define IDirect3DStateBlock9_Capture(p)             (p)->lpVtbl->Capture(p)
1166#define IDirect3DStateBlock9_Apply(p)               (p)->lpVtbl->Apply(p)
1167#else
1168/*** IUnknown methods ***/
1169#define IDirect3DStateBlock9_QueryInterface(p,a,b)  (p)->QueryInterface(a,b)
1170#define IDirect3DStateBlock9_AddRef(p)              (p)->AddRef()
1171#define IDirect3DStateBlock9_Release(p)             (p)->Release()
1172/*** IDirect3DStateBlock9 methods ***/
1173#define IDirect3DStateBlock9_GetDevice(p,a)         (p)->GetDevice(a)
1174#define IDirect3DStateBlock9_Capture(p)             (p)->Capture()
1175#define IDirect3DStateBlock9_Apply(p)               (p)->Apply()
1176#endif
1177
1178/*****************************************************************************
1179 * IDirect3DQuery9 interface
1180 */
1181#define INTERFACE IDirect3DQuery9
1182DECLARE_INTERFACE_(IDirect3DQuery9,IUnknown)
1183{
1184    /*** IUnknown methods ***/
1185    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1186    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1187    STDMETHOD_(ULONG,Release)(THIS) PURE;
1188    /*** IDirect3DQuery9 methods ***/
1189    STDMETHOD(GetDevice)(THIS_ struct IDirect3DDevice9** ppDevice) PURE;
1190    STDMETHOD_(D3DQUERYTYPE, GetType)(THIS) PURE;
1191    STDMETHOD_(DWORD, GetDataSize)(THIS) PURE;
1192    STDMETHOD(Issue)(THIS_ DWORD dwIssueFlags) PURE;
1193    STDMETHOD(GetData)(THIS_ void* pData, DWORD dwSize, DWORD dwGetDataFlags) PURE;
1194};
1195#undef INTERFACE
1196
1197#if !defined(__cplusplus) || defined(CINTERFACE)
1198/*** IUnknown methods ***/
1199#define IDirect3DQuery9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1200#define IDirect3DQuery9_AddRef(p) (p)->lpVtbl->AddRef(p)
1201#define IDirect3DQuery9_Release(p) (p)->lpVtbl->Release(p)
1202/*** IDirect3DQuery9 ***/
1203#define IDirect3DQuery9_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
1204#define IDirect3DQuery9_GetType(p) (p)->lpVtbl->GetType(p)
1205#define IDirect3DQuery9_GetDataSize(p) (p)->lpVtbl->GetDataSize(p)
1206#define IDirect3DQuery9_Issue(p,a) (p)->lpVtbl->Issue(p,a)
1207#define IDirect3DQuery9_GetData(p,a,b,c) (p)->lpVtbl->GetData(p,a,b,c)
1208#else
1209/*** IUnknown methods ***/
1210#define IDirect3DQuery9_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1211#define IDirect3DQuery9_AddRef(p) (p)->AddRef()
1212#define IDirect3DQuery9_Release(p) (p)->Release()
1213/*** IDirect3DQuery9 ***/
1214#define IDirect3DQuery9_GetDevice(p,a) (p)->GetDevice(a)
1215#define IDirect3DQuery9_GetType(p) (p)->GetType()
1216#define IDirect3DQuery9_GetDataSize(p) (p)->GetDataSize()
1217#define IDirect3DQuery9_Issue(p,a) (p)->Issue(a)
1218#define IDirect3DQuery9_GetData(p,a,b,c) (p)->GetData(a,b,c)
1219#endif
1220
1221/*****************************************************************************
1222 * IDirect3DDevice9 interface
1223 */
1224#define INTERFACE IDirect3DDevice9
1225DECLARE_INTERFACE_(IDirect3DDevice9,IUnknown)
1226{
1227    /*** IUnknown methods ***/
1228    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1229    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1230    STDMETHOD_(ULONG,Release)(THIS) PURE;
1231    /*** IDirect3DDevice9 methods ***/
1232    STDMETHOD(TestCooperativeLevel)(THIS) PURE;
1233    STDMETHOD_(UINT, GetAvailableTextureMem)(THIS) PURE;
1234    STDMETHOD(EvictManagedResources)(THIS) PURE;
1235    STDMETHOD(GetDirect3D)(THIS_ IDirect3D9** ppD3D9) PURE;
1236    STDMETHOD(GetDeviceCaps)(THIS_ D3DCAPS9* pCaps) PURE;
1237    STDMETHOD(GetDisplayMode)(THIS_ UINT iSwapChain, D3DDISPLAYMODE* pMode) PURE;
1238    STDMETHOD(GetCreationParameters)(THIS_ D3DDEVICE_CREATION_PARAMETERS *pParameters) PURE;
1239    STDMETHOD(SetCursorProperties)(THIS_ UINT XHotSpot, UINT YHotSpot, IDirect3DSurface9* pCursorBitmap) PURE;
1240    STDMETHOD_(void, SetCursorPosition)(THIS_ int X,int Y, DWORD Flags) PURE;
1241    STDMETHOD_(WINBOOL, ShowCursor)(THIS_ WINBOOL bShow) PURE;
1242    STDMETHOD(CreateAdditionalSwapChain)(THIS_ D3DPRESENT_PARAMETERS* pPresentationParameters, IDirect3DSwapChain9** pSwapChain) PURE;
1243    STDMETHOD(GetSwapChain)(THIS_ UINT iSwapChain, IDirect3DSwapChain9** pSwapChain) PURE;
1244    STDMETHOD_(UINT, GetNumberOfSwapChains)(THIS) PURE;
1245    STDMETHOD(Reset)(THIS_ D3DPRESENT_PARAMETERS* pPresentationParameters) PURE;
1246    STDMETHOD(Present)(THIS_ CONST RECT* pSourceRect, CONST RECT* pDestRect, HWND hDestWindowOverride, CONST RGNDATA* pDirtyRegion) PURE;
1247    STDMETHOD(GetBackBuffer)(THIS_ UINT iSwapChain, UINT iBackBuffer, D3DBACKBUFFER_TYPE Type, IDirect3DSurface9** ppBackBuffer) PURE;
1248    STDMETHOD(GetRasterStatus)(THIS_ UINT iSwapChain, D3DRASTER_STATUS* pRasterStatus) PURE;
1249    STDMETHOD(SetDialogBoxMode)(THIS_ WINBOOL bEnableDialogs) PURE;
1250    STDMETHOD_(void, SetGammaRamp)(THIS_ UINT iSwapChain, DWORD Flags, CONST D3DGAMMARAMP* pRamp) PURE;
1251    STDMETHOD_(void, GetGammaRamp)(THIS_ UINT iSwapChain, D3DGAMMARAMP* pRamp) PURE;
1252    STDMETHOD(CreateTexture)(THIS_ UINT Width, UINT Height, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DTexture9** ppTexture, HANDLE* pSharedHandle) PURE;
1253    STDMETHOD(CreateVolumeTexture)(THIS_ UINT Width, UINT Height, UINT Depth, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DVolumeTexture9** ppVolumeTexture, HANDLE* pSharedHandle) PURE;
1254    STDMETHOD(CreateCubeTexture)(THIS_ UINT EdgeLength, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DCubeTexture9** ppCubeTexture, HANDLE* pSharedHandle) PURE;
1255    STDMETHOD(CreateVertexBuffer)(THIS_ UINT Length, DWORD Usage, DWORD FVF, D3DPOOL Pool, IDirect3DVertexBuffer9** ppVertexBuffer, HANDLE* pSharedHandle) PURE;
1256    STDMETHOD(CreateIndexBuffer)(THIS_ UINT Length, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DIndexBuffer9** ppIndexBuffer, HANDLE* pSharedHandle) PURE;
1257    STDMETHOD(CreateRenderTarget)(THIS_ UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, WINBOOL Lockable, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle) PURE;
1258    STDMETHOD(CreateDepthStencilSurface)(THIS_ UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, WINBOOL Discard, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle) PURE;
1259    STDMETHOD(UpdateSurface)(THIS_ IDirect3DSurface9* pSourceSurface, CONST RECT* pSourceRect, IDirect3DSurface9* pDestinationSurface, CONST POINT* pDestPoint) PURE;
1260    STDMETHOD(UpdateTexture)(THIS_ IDirect3DBaseTexture9* pSourceTexture, IDirect3DBaseTexture9* pDestinationTexture) PURE;
1261    STDMETHOD(GetRenderTargetData)(THIS_ IDirect3DSurface9* pRenderTarget, IDirect3DSurface9* pDestSurface) PURE;
1262    STDMETHOD(GetFrontBufferData)(THIS_ UINT iSwapChain, IDirect3DSurface9* pDestSurface) PURE;
1263    STDMETHOD(StretchRect)(THIS_ IDirect3DSurface9* pSourceSurface, CONST RECT* pSourceRect, IDirect3DSurface9* pDestSurface, CONST RECT* pDestRect, D3DTEXTUREFILTERTYPE Filter) PURE;
1264    STDMETHOD(ColorFill)(THIS_ IDirect3DSurface9* pSurface, CONST RECT* pRect, D3DCOLOR color) PURE;
1265    STDMETHOD(CreateOffscreenPlainSurface)(THIS_ UINT Width, UINT Height, D3DFORMAT Format, D3DPOOL Pool, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle) PURE;
1266    STDMETHOD(SetRenderTarget)(THIS_ DWORD RenderTargetIndex, IDirect3DSurface9* pRenderTarget) PURE;
1267    STDMETHOD(GetRenderTarget)(THIS_ DWORD RenderTargetIndex, IDirect3DSurface9** ppRenderTarget) PURE;
1268    STDMETHOD(SetDepthStencilSurface)(THIS_ IDirect3DSurface9* pNewZStencil) PURE;
1269    STDMETHOD(GetDepthStencilSurface)(THIS_ IDirect3DSurface9** ppZStencilSurface) PURE;
1270    STDMETHOD(BeginScene)(THIS) PURE;
1271    STDMETHOD(EndScene)(THIS) PURE;
1272    STDMETHOD(Clear)(THIS_ DWORD Count, CONST D3DRECT* pRects, DWORD Flags, D3DCOLOR Color, float Z, DWORD Stencil) PURE;
1273    STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE State, CONST D3DMATRIX* pMatrix) PURE;
1274    STDMETHOD(GetTransform)(THIS_ D3DTRANSFORMSTATETYPE State, D3DMATRIX* pMatrix) PURE;
1275    STDMETHOD(MultiplyTransform)(THIS_ D3DTRANSFORMSTATETYPE, CONST D3DMATRIX*) PURE;
1276    STDMETHOD(SetViewport)(THIS_ CONST D3DVIEWPORT9* pViewport) PURE;
1277    STDMETHOD(GetViewport)(THIS_ D3DVIEWPORT9* pViewport) PURE;
1278    STDMETHOD(SetMaterial)(THIS_ CONST D3DMATERIAL9* pMaterial) PURE;
1279    STDMETHOD(GetMaterial)(THIS_ D3DMATERIAL9* pMaterial) PURE;
1280    STDMETHOD(SetLight)(THIS_ DWORD Index, CONST D3DLIGHT9*) PURE;
1281    STDMETHOD(GetLight)(THIS_ DWORD Index, D3DLIGHT9*) PURE;
1282    STDMETHOD(LightEnable)(THIS_ DWORD Index, WINBOOL Enable) PURE;
1283    STDMETHOD(GetLightEnable)(THIS_ DWORD Index, WINBOOL* pEnable) PURE;
1284    STDMETHOD(SetClipPlane)(THIS_ DWORD Index, CONST float* pPlane) PURE;
1285    STDMETHOD(GetClipPlane)(THIS_ DWORD Index, float* pPlane) PURE;
1286    STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE State, DWORD Value) PURE;
1287    STDMETHOD(GetRenderState)(THIS_ D3DRENDERSTATETYPE State, DWORD* pValue) PURE;
1288    STDMETHOD(CreateStateBlock)(THIS_ D3DSTATEBLOCKTYPE Type, IDirect3DStateBlock9** ppSB) PURE;
1289    STDMETHOD(BeginStateBlock)(THIS) PURE;
1290    STDMETHOD(EndStateBlock)(THIS_ IDirect3DStateBlock9** ppSB) PURE;
1291    STDMETHOD(SetClipStatus)(THIS_ CONST D3DCLIPSTATUS9* pClipStatus) PURE;
1292    STDMETHOD(GetClipStatus)(THIS_ D3DCLIPSTATUS9* pClipStatus) PURE;
1293    STDMETHOD(GetTexture)(THIS_ DWORD Stage, IDirect3DBaseTexture9** ppTexture) PURE;
1294    STDMETHOD(SetTexture)(THIS_ DWORD Stage, IDirect3DBaseTexture9* pTexture) PURE;
1295    STDMETHOD(GetTextureStageState)(THIS_ DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD* pValue) PURE;
1296    STDMETHOD(SetTextureStageState)(THIS_ DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD Value) PURE;
1297    STDMETHOD(GetSamplerState)(THIS_ DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD* pValue) PURE;
1298    STDMETHOD(SetSamplerState)(THIS_ DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD Value) PURE;
1299    STDMETHOD(ValidateDevice)(THIS_ DWORD* pNumPasses) PURE;
1300    STDMETHOD(SetPaletteEntries)(THIS_ UINT PaletteNumber, CONST PALETTEENTRY* pEntries) PURE;
1301    STDMETHOD(GetPaletteEntries)(THIS_ UINT PaletteNumber,PALETTEENTRY* pEntries) PURE;
1302    STDMETHOD(SetCurrentTexturePalette)(THIS_ UINT PaletteNumber) PURE;
1303    STDMETHOD(GetCurrentTexturePalette)(THIS_ UINT *PaletteNumber) PURE;
1304    STDMETHOD(SetScissorRect)(THIS_ CONST RECT* pRect) PURE;
1305    STDMETHOD(GetScissorRect)(THIS_ RECT* pRect) PURE;
1306    STDMETHOD(SetSoftwareVertexProcessing)(THIS_ WINBOOL bSoftware) PURE;
1307    STDMETHOD_(WINBOOL, GetSoftwareVertexProcessing)(THIS) PURE;
1308    STDMETHOD(SetNPatchMode)(THIS_ float nSegments) PURE;
1309    STDMETHOD_(float, GetNPatchMode)(THIS) PURE;
1310    STDMETHOD(DrawPrimitive)(THIS_ D3DPRIMITIVETYPE PrimitiveType, UINT StartVertex, UINT PrimitiveCount) PURE;
1311    STDMETHOD(DrawIndexedPrimitive)(THIS_ D3DPRIMITIVETYPE, INT BaseVertexIndex, UINT MinVertexIndex, UINT NumVertices, UINT startIndex, UINT primCount) PURE;
1312    STDMETHOD(DrawPrimitiveUP)(THIS_ D3DPRIMITIVETYPE PrimitiveType, UINT PrimitiveCount, CONST void* pVertexStreamZeroData, UINT VertexStreamZeroStride) PURE;
1313    STDMETHOD(DrawIndexedPrimitiveUP)(THIS_ D3DPRIMITIVETYPE PrimitiveType, UINT MinVertexIndex, UINT NumVertices, UINT PrimitiveCount, CONST void* pIndexData, D3DFORMAT IndexDataFormat, CONST void* pVertexStreamZeroData, UINT VertexStreamZeroStride) PURE;
1314    STDMETHOD(ProcessVertices)(THIS_ UINT SrcStartIndex, UINT DestIndex, UINT VertexCount, IDirect3DVertexBuffer9* pDestBuffer, IDirect3DVertexDeclaration9* pVertexDecl, DWORD Flags) PURE;
1315    STDMETHOD(CreateVertexDeclaration)(THIS_ CONST D3DVERTEXELEMENT9* pVertexElements, IDirect3DVertexDeclaration9** ppDecl) PURE;
1316    STDMETHOD(SetVertexDeclaration)(THIS_ IDirect3DVertexDeclaration9* pDecl) PURE;
1317    STDMETHOD(GetVertexDeclaration)(THIS_ IDirect3DVertexDeclaration9** ppDecl) PURE;
1318    STDMETHOD(SetFVF)(THIS_ DWORD FVF) PURE;
1319    STDMETHOD(GetFVF)(THIS_ DWORD* pFVF) PURE;
1320    STDMETHOD(CreateVertexShader)(THIS_ CONST DWORD* pFunction, IDirect3DVertexShader9** ppShader) PURE;
1321    STDMETHOD(SetVertexShader)(THIS_ IDirect3DVertexShader9* pShader) PURE;
1322    STDMETHOD(GetVertexShader)(THIS_ IDirect3DVertexShader9** ppShader) PURE;
1323    STDMETHOD(SetVertexShaderConstantF)(THIS_ UINT StartRegister, CONST float* pConstantData, UINT Vector4fCount) PURE;
1324    STDMETHOD(GetVertexShaderConstantF)(THIS_ UINT StartRegister, float* pConstantData, UINT Vector4fCount) PURE;
1325    STDMETHOD(SetVertexShaderConstantI)(THIS_ UINT StartRegister, CONST int* pConstantData, UINT Vector4iCount) PURE;
1326    STDMETHOD(GetVertexShaderConstantI)(THIS_ UINT StartRegister, int* pConstantData, UINT Vector4iCount) PURE;
1327    STDMETHOD(SetVertexShaderConstantB)(THIS_ UINT StartRegister, CONST WINBOOL* pConstantData, UINT  BoolCount) PURE;
1328    STDMETHOD(GetVertexShaderConstantB)(THIS_ UINT StartRegister, WINBOOL* pConstantData, UINT BoolCount) PURE;
1329    STDMETHOD(SetStreamSource)(THIS_ UINT StreamNumber, IDirect3DVertexBuffer9* pStreamData, UINT OffsetInBytes, UINT Stride) PURE;
1330    STDMETHOD(GetStreamSource)(THIS_ UINT StreamNumber, IDirect3DVertexBuffer9** ppStreamData, UINT* OffsetInBytes, UINT* pStride) PURE;
1331    STDMETHOD(SetStreamSourceFreq)(THIS_ UINT StreamNumber, UINT Divider) PURE;
1332    STDMETHOD(GetStreamSourceFreq)(THIS_ UINT StreamNumber, UINT* Divider) PURE;
1333    STDMETHOD(SetIndices)(THIS_ IDirect3DIndexBuffer9* pIndexData) PURE;
1334    STDMETHOD(GetIndices)(THIS_ IDirect3DIndexBuffer9** ppIndexData) PURE;
1335    STDMETHOD(CreatePixelShader)(THIS_ CONST DWORD* pFunction, IDirect3DPixelShader9** ppShader) PURE;
1336    STDMETHOD(SetPixelShader)(THIS_ IDirect3DPixelShader9* pShader) PURE;
1337    STDMETHOD(GetPixelShader)(THIS_ IDirect3DPixelShader9** ppShader) PURE;
1338    STDMETHOD(SetPixelShaderConstantF)(THIS_ UINT StartRegister, CONST float* pConstantData, UINT Vector4fCount) PURE;
1339    STDMETHOD(GetPixelShaderConstantF)(THIS_ UINT StartRegister, float* pConstantData, UINT Vector4fCount) PURE;
1340    STDMETHOD(SetPixelShaderConstantI)(THIS_ UINT StartRegister, CONST int* pConstantData, UINT Vector4iCount) PURE;
1341    STDMETHOD(GetPixelShaderConstantI)(THIS_ UINT StartRegister, int* pConstantData, UINT Vector4iCount) PURE;
1342    STDMETHOD(SetPixelShaderConstantB)(THIS_ UINT StartRegister, CONST WINBOOL* pConstantData, UINT  BoolCount) PURE;
1343    STDMETHOD(GetPixelShaderConstantB)(THIS_ UINT StartRegister, WINBOOL* pConstantData, UINT BoolCount) PURE;
1344    STDMETHOD(DrawRectPatch)(THIS_ UINT Handle, CONST float* pNumSegs, CONST D3DRECTPATCH_INFO* pRectPatchInfo) PURE;
1345    STDMETHOD(DrawTriPatch)(THIS_ UINT Handle, CONST float* pNumSegs, CONST D3DTRIPATCH_INFO* pTriPatchInfo) PURE;
1346    STDMETHOD(DeletePatch)(THIS_ UINT Handle) PURE;
1347    STDMETHOD(CreateQuery)(THIS_ D3DQUERYTYPE Type, IDirect3DQuery9** ppQuery) PURE;
1348};
1349#undef INTERFACE
1350
1351#if !defined(__cplusplus) || defined(CINTERFACE)
1352/*** IUnknown methods ***/
1353#define IDirect3DDevice9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1354#define IDirect3DDevice9_AddRef(p)             (p)->lpVtbl->AddRef(p)
1355#define IDirect3DDevice9_Release(p)            (p)->lpVtbl->Release(p)
1356/*** IDirect3DDevice9 methods ***/
1357#define IDirect3DDevice9_TestCooperativeLevel(p)                       (p)->lpVtbl->TestCooperativeLevel(p)
1358#define IDirect3DDevice9_GetAvailableTextureMem(p)                     (p)->lpVtbl->GetAvailableTextureMem(p)
1359#define IDirect3DDevice9_EvictManagedResources(p)                      (p)->lpVtbl->EvictManagedResources(p)
1360#define IDirect3DDevice9_GetDirect3D(p,a)                              (p)->lpVtbl->GetDirect3D(p,a)
1361#define IDirect3DDevice9_GetDeviceCaps(p,a)                            (p)->lpVtbl->GetDeviceCaps(p,a)
1362#define IDirect3DDevice9_GetDisplayMode(p,a,b)                         (p)->lpVtbl->GetDisplayMode(p,a,b)
1363#define IDirect3DDevice9_GetCreationParameters(p,a)                    (p)->lpVtbl->GetCreationParameters(p,a)
1364#define IDirect3DDevice9_SetCursorProperties(p,a,b,c)                  (p)->lpVtbl->SetCursorProperties(p,a,b,c)
1365#define IDirect3DDevice9_SetCursorPosition(p,a,b,c)                    (p)->lpVtbl->SetCursorPosition(p,a,b,c)
1366#define IDirect3DDevice9_ShowCursor(p,a)                               (p)->lpVtbl->ShowCursor(p,a)
1367#define IDirect3DDevice9_CreateAdditionalSwapChain(p,a,b)              (p)->lpVtbl->CreateAdditionalSwapChain(p,a,b)
1368#define IDirect3DDevice9_GetSwapChain(p,a,b)                           (p)->lpVtbl->GetSwapChain(p,a,b)
1369#define IDirect3DDevice9_GetNumberOfSwapChains(p)                      (p)->lpVtbl->GetNumberOfSwapChains(p)
1370#define IDirect3DDevice9_Reset(p,a)                                    (p)->lpVtbl->Reset(p,a)
1371#define IDirect3DDevice9_Present(p,a,b,c,d)                            (p)->lpVtbl->Present(p,a,b,c,d)
1372#define IDirect3DDevice9_GetBackBuffer(p,a,b,c,d)                      (p)->lpVtbl->GetBackBuffer(p,a,b,c,d)
1373#define IDirect3DDevice9_GetRasterStatus(p,a,b)                        (p)->lpVtbl->GetRasterStatus(p,a,b)
1374#define IDirect3DDevice9_SetDialogBoxMode(p,a)                         (p)->lpVtbl->SetDialogBoxMode(p,a)
1375#define IDirect3DDevice9_SetGammaRamp(p,a,b,c)                         (p)->lpVtbl->SetGammaRamp(p,a,b,c)
1376#define IDirect3DDevice9_GetGammaRamp(p,a,b)                           (p)->lpVtbl->GetGammaRamp(p,a,b)
1377#define IDirect3DDevice9_CreateTexture(p,a,b,c,d,e,f,g,h)              (p)->lpVtbl->CreateTexture(p,a,b,c,d,e,f,g,h)
1378#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)
1379#define IDirect3DDevice9_CreateCubeTexture(p,a,b,c,d,e,f,g)            (p)->lpVtbl->CreateCubeTexture(p,a,b,c,d,e,f,g)
1380#define IDirect3DDevice9_CreateVertexBuffer(p,a,b,c,d,e,f)             (p)->lpVtbl->CreateVertexBuffer(p,a,b,c,d,e,f)
1381#define IDirect3DDevice9_CreateIndexBuffer(p,a,b,c,d,e,f)              (p)->lpVtbl->CreateIndexBuffer(p,a,b,c,d,e,f)
1382#define IDirect3DDevice9_CreateRenderTarget(p,a,b,c,d,e,f,g,h)         (p)->lpVtbl->CreateRenderTarget(p,a,b,c,d,e,f,g,h)
1383#define IDirect3DDevice9_CreateDepthStencilSurface(p,a,b,c,d,e,f,g,h)  (p)->lpVtbl->CreateDepthStencilSurface(p,a,b,c,d,e,f,g,h)
1384#define IDirect3DDevice9_UpdateSurface(p,a,b,c,d)                      (p)->lpVtbl->UpdateSurface(p,a,b,c,d)
1385#define IDirect3DDevice9_UpdateTexture(p,a,b)                          (p)->lpVtbl->UpdateTexture(p,a,b)
1386#define IDirect3DDevice9_GetRenderTargetData(p,a,b)                    (p)->lpVtbl->GetRenderTargetData(p,a,b)
1387#define IDirect3DDevice9_GetFrontBufferData(p,a,b)                     (p)->lpVtbl->GetFrontBufferData(p,a,b)
1388#define IDirect3DDevice9_StretchRect(p,a,b,c,d,e)                      (p)->lpVtbl->StretchRect(p,a,b,c,d,e)
1389#define IDirect3DDevice9_ColorFill(p,a,b,c)                            (p)->lpVtbl->ColorFill(p,a,b,c)
1390#define IDirect3DDevice9_CreateOffscreenPlainSurface(p,a,b,c,d,e,f)    (p)->lpVtbl->CreateOffscreenPlainSurface(p,a,b,c,d,e,f)
1391#define IDirect3DDevice9_SetRenderTarget(p,a,b)                        (p)->lpVtbl->SetRenderTarget(p,a,b)
1392#define IDirect3DDevice9_GetRenderTarget(p,a,b)                        (p)->lpVtbl->GetRenderTarget(p,a,b)
1393#define IDirect3DDevice9_SetDepthStencilSurface(p,a)                   (p)->lpVtbl->SetDepthStencilSurface(p,a)
1394#define IDirect3DDevice9_GetDepthStencilSurface(p,a)                   (p)->lpVtbl->GetDepthStencilSurface(p,a)
1395#define IDirect3DDevice9_BeginScene(p)                                 (p)->lpVtbl->BeginScene(p)
1396#define IDirect3DDevice9_EndScene(p)                                   (p)->lpVtbl->EndScene(p)
1397#define IDirect3DDevice9_Clear(p,a,b,c,d,e,f)                          (p)->lpVtbl->Clear(p,a,b,c,d,e,f)
1398#define IDirect3DDevice9_SetTransform(p,a,b)                           (p)->lpVtbl->SetTransform(p,a,b)
1399#define IDirect3DDevice9_GetTransform(p,a,b)                           (p)->lpVtbl->GetTransform(p,a,b)
1400#define IDirect3DDevice9_MultiplyTransform(p,a,b)                      (p)->lpVtbl->MultiplyTransform(p,a,b)
1401#define IDirect3DDevice9_SetViewport(p,a)                              (p)->lpVtbl->SetViewport(p,a)
1402#define IDirect3DDevice9_GetViewport(p,a)                              (p)->lpVtbl->GetViewport(p,a)
1403#define IDirect3DDevice9_SetMaterial(p,a)                              (p)->lpVtbl->SetMaterial(p,a)
1404#define IDirect3DDevice9_GetMaterial(p,a)                              (p)->lpVtbl->GetMaterial(p,a)
1405#define IDirect3DDevice9_SetLight(p,a,b)                               (p)->lpVtbl->SetLight(p,a,b)
1406#define IDirect3DDevice9_GetLight(p,a,b)                               (p)->lpVtbl->GetLight(p,a,b)
1407#define IDirect3DDevice9_LightEnable(p,a,b)                            (p)->lpVtbl->LightEnable(p,a,b)
1408#define IDirect3DDevice9_GetLightEnable(p,a,b)                         (p)->lpVtbl->GetLightEnable(p,a,b)
1409#define IDirect3DDevice9_SetClipPlane(p,a,b)                           (p)->lpVtbl->SetClipPlane(p,a,b)
1410#define IDirect3DDevice9_GetClipPlane(p,a,b)                           (p)->lpVtbl->GetClipPlane(p,a,b)
1411#define IDirect3DDevice9_SetRenderState(p,a,b)                         (p)->lpVtbl->SetRenderState(p,a,b)
1412#define IDirect3DDevice9_GetRenderState(p,a,b)                         (p)->lpVtbl->GetRenderState(p,a,b)
1413#define IDirect3DDevice9_CreateStateBlock(p,a,b)                       (p)->lpVtbl->CreateStateBlock(p,a,b)
1414#define IDirect3DDevice9_BeginStateBlock(p)                            (p)->lpVtbl->BeginStateBlock(p)
1415#define IDirect3DDevice9_EndStateBlock(p,a)                            (p)->lpVtbl->EndStateBlock(p,a)
1416#define IDirect3DDevice9_SetClipStatus(p,a)                            (p)->lpVtbl->SetClipStatus(p,a)
1417#define IDirect3DDevice9_GetClipStatus(p,a)                            (p)->lpVtbl->GetClipStatus(p,a)
1418#define IDirect3DDevice9_GetTexture(p,a,b)                             (p)->lpVtbl->GetTexture(p,a,b)
1419#define IDirect3DDevice9_SetTexture(p,a,b)                             (p)->lpVtbl->SetTexture(p,a,b)
1420#define IDirect3DDevice9_GetTextureStageState(p,a,b,c)                 (p)->lpVtbl->GetTextureStageState(p,a,b,c)
1421#define IDirect3DDevice9_SetTextureStageState(p,a,b,c)                 (p)->lpVtbl->SetTextureStageState(p,a,b,c)
1422#define IDirect3DDevice9_GetSamplerState(p,a,b,c)                      (p)->lpVtbl->GetSamplerState(p,a,b,c)
1423#define IDirect3DDevice9_SetSamplerState(p,a,b,c)                      (p)->lpVtbl->SetSamplerState(p,a,b,c)
1424#define IDirect3DDevice9_ValidateDevice(p,a)                           (p)->lpVtbl->ValidateDevice(p,a)
1425#define IDirect3DDevice9_SetPaletteEntries(p,a,b)                      (p)->lpVtbl->SetPaletteEntries(p,a,b)
1426#define IDirect3DDevice9_GetPaletteEntries(p,a,b)                      (p)->lpVtbl->GetPaletteEntries(p,a,b)
1427#define IDirect3DDevice9_SetCurrentTexturePalette(p,a)                 (p)->lpVtbl->SetCurrentTexturePalette(p,a)
1428#define IDirect3DDevice9_GetCurrentTexturePalette(p,a)                 (p)->lpVtbl->GetCurrentTexturePalette(p,a)
1429#define IDirect3DDevice9_SetScissorRect(p,a)                           (p)->lpVtbl->SetScissorRect(p,a)
1430#define IDirect3DDevice9_GetScissorRect(p,a)                           (p)->lpVtbl->GetScissorRect(p,a)
1431#define IDirect3DDevice9_SetSoftwareVertexProcessing(p,a)              (p)->lpVtbl->SetSoftwareVertexProcessing(p,a)
1432#define IDirect3DDevice9_GetSoftwareVertexProcessing(p)                (p)->lpVtbl->GetSoftwareVertexProcessing(p)
1433#define IDirect3DDevice9_SetNPatchMode(p,a)                            (p)->lpVtbl->SetNPatchMode(p,a)
1434#define IDirect3DDevice9_GetNPatchMode(p)                              (p)->lpVtbl->GetNPatchMode(p)
1435#define IDirect3DDevice9_DrawPrimitive(p,a,b,c)                        (p)->lpVtbl->DrawPrimitive(p,a,b,c)
1436#define IDirect3DDevice9_DrawIndexedPrimitive(p,a,b,c,d,e,f)           (p)->lpVtbl->DrawIndexedPrimitive(p,a,b,c,d,e,f)
1437#define IDirect3DDevice9_DrawPrimitiveUP(p,a,b,c,d)                    (p)->lpVtbl->DrawPrimitiveUP(p,a,b,c,d)
1438#define IDirect3DDevice9_DrawIndexedPrimitiveUP(p,a,b,c,d,e,f,g,h)     (p)->lpVtbl->DrawIndexedPrimitiveUP(p,a,b,c,d,e,f,g,h)
1439#define IDirect3DDevice9_ProcessVertices(p,a,b,c,d,e,f)                (p)->lpVtbl->ProcessVertices(p,a,b,c,d,e,f)
1440#define IDirect3DDevice9_CreateVertexDeclaration(p,a,b)                (p)->lpVtbl->CreateVertexDeclaration(p,a,b)
1441#define IDirect3DDevice9_SetVertexDeclaration(p,a)                     (p)->lpVtbl->SetVertexDeclaration(p,a)
1442#define IDirect3DDevice9_GetVertexDeclaration(p,a)                     (p)->lpVtbl->GetVertexDeclaration(p,a)
1443#define IDirect3DDevice9_SetFVF(p,a)                                   (p)->lpVtbl->SetFVF(p,a)
1444#define IDirect3DDevice9_GetFVF(p,a)                                   (p)->lpVtbl->GetFVF(p,a)
1445#define IDirect3DDevice9_CreateVertexShader(p,a,b)                     (p)->lpVtbl->CreateVertexShader(p,a,b)
1446#define IDirect3DDevice9_SetVertexShader(p,a)                          (p)->lpVtbl->SetVertexShader(p,a)
1447#define IDirect3DDevice9_GetVertexShader(p,a)                          (p)->lpVtbl->GetVertexShader(p,a)
1448#define IDirect3DDevice9_SetVertexShaderConstantF(p,a,b,c)             (p)->lpVtbl->SetVertexShaderConstantF(p,a,b,c)
1449#define IDirect3DDevice9_GetVertexShaderConstantF(p,a,b,c)             (p)->lpVtbl->GetVertexShaderConstantF(p,a,b,c)
1450#define IDirect3DDevice9_SetVertexShaderConstantI(p,a,b,c)             (p)->lpVtbl->SetVertexShaderConstantI(p,a,b,c)
1451#define IDirect3DDevice9_GetVertexShaderConstantI(p,a,b,c)             (p)->lpVtbl->GetVertexShaderConstantI(p,a,b,c)
1452#define IDirect3DDevice9_SetVertexShaderConstantB(p,a,b,c)             (p)->lpVtbl->SetVertexShaderConstantB(p,a,b,c)
1453#define IDirect3DDevice9_GetVertexShaderConstantB(p,a,b,c)             (p)->lpVtbl->GetVertexShaderConstantB(p,a,b,c)
1454#define IDirect3DDevice9_SetStreamSource(p,a,b,c,d)                    (p)->lpVtbl->SetStreamSource(p,a,b,c,d)
1455#define IDirect3DDevice9_GetStreamSource(p,a,b,c,d)                    (p)->lpVtbl->GetStreamSource(p,a,b,c,d)
1456#define IDirect3DDevice9_SetStreamSourceFreq(p,a,b)                    (p)->lpVtbl->SetStreamSourceFreq(p,a,b)
1457#define IDirect3DDevice9_GetStreamSourceFreq(p,a,b)                    (p)->lpVtbl->GetStreamSourceFreq(p,a,b)
1458#define IDirect3DDevice9_SetIndices(p,a)                               (p)->lpVtbl->SetIndices(p,a)
1459#define IDirect3DDevice9_GetIndices(p,a)                               (p)->lpVtbl->GetIndices(p,a)
1460#define IDirect3DDevice9_CreatePixelShader(p,a,b)                      (p)->lpVtbl->CreatePixelShader(p,a,b)
1461#define IDirect3DDevice9_SetPixelShader(p,a)                           (p)->lpVtbl->SetPixelShader(p,a)
1462#define IDirect3DDevice9_GetPixelShader(p,a)                           (p)->lpVtbl->GetPixelShader(p,a)
1463#define IDirect3DDevice9_SetPixelShaderConstantF(p,a,b,c)              (p)->lpVtbl->SetPixelShaderConstantF(p,a,b,c)
1464#define IDirect3DDevice9_GetPixelShaderConstantF(p,a,b,c)              (p)->lpVtbl->GetPixelShaderConstantF(p,a,b,c)
1465#define IDirect3DDevice9_SetPixelShaderConstantI(p,a,b,c)              (p)->lpVtbl->SetPixelShaderConstantI(p,a,b,c)
1466#define IDirect3DDevice9_GetPixelShaderConstantI(p,a,b,c)              (p)->lpVtbl->GetPixelShaderConstantI(p,a,b,c)
1467#define IDirect3DDevice9_SetPixelShaderConstantB(p,a,b,c)              (p)->lpVtbl->SetPixelShaderConstantB(p,a,b,c)
1468#define IDirect3DDevice9_GetPixelShaderConstantB(p,a,b,c)              (p)->lpVtbl->GetPixelShaderConstantB(p,a,b,c)
1469#define IDirect3DDevice9_DrawRectPatch(p,a,b,c)                        (p)->lpVtbl->DrawRectPatch(p,a,b,c)
1470#define IDirect3DDevice9_DrawTriPatch(p,a,b,c)                         (p)->lpVtbl->DrawTriPatch(p,a,b,c)
1471#define IDirect3DDevice9_DeletePatch(p,a)                              (p)->lpVtbl->DeletePatch(p,a)
1472#define IDirect3DDevice9_CreateQuery(p,a,b)                            (p)->lpVtbl->CreateQuery(p,a,b)
1473#else
1474/*** IUnknown methods ***/
1475#define IDirect3DDevice9_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1476#define IDirect3DDevice9_AddRef(p)             (p)->AddRef()
1477#define IDirect3DDevice9_Release(p)            (p)->Release()
1478/*** IDirect3DDevice9 methods ***/
1479#define IDirect3DDevice9_TestCooperativeLevel(p)                       (p)->TestCooperativeLevel()
1480#define IDirect3DDevice9_GetAvailableTextureMem(p)                     (p)->GetAvailableTextureMem()
1481#define IDirect3DDevice9_EvictManagedResources(p)                      (p)->EvictManagedResources()
1482#define IDirect3DDevice9_GetDirect3D(p,a)                              (p)->GetDirect3D(a)
1483#define IDirect3DDevice9_GetDeviceCaps(p,a)                            (p)->GetDeviceCaps(a)
1484#define IDirect3DDevice9_GetDisplayMode(p,a,b)                         (p)->GetDisplayMode(a,b)
1485#define IDirect3DDevice9_GetCreationParameters(p,a)                    (p)->GetCreationParameters(a)
1486#define IDirect3DDevice9_SetCursorProperties(p,a,b,c)                  (p)->SetCursorProperties(a,b,c)
1487#define IDirect3DDevice9_SetCursorPosition(p,a,b,c)                    (p)->SetCursorPosition(a,b,c)
1488#define IDirect3DDevice9_ShowCursor(p,a)                               (p)->ShowCursor(a)
1489#define IDirect3DDevice9_CreateAdditionalSwapChain(p,a,b)              (p)->CreateAdditionalSwapChain(a,b)
1490#define IDirect3DDevice9_GetSwapChain(p,a,b)                           (p)->GetSwapChain(a,b)
1491#define IDirect3DDevice9_GetNumberOfSwapChains(p)                      (p)->GetNumberOfSwapChains()
1492#define IDirect3DDevice9_Reset(p,a)                                    (p)->Reset(a)
1493#define IDirect3DDevice9_Present(p,a,b,c,d)                            (p)->Present(a,b,c,d)
1494#define IDirect3DDevice9_GetBackBuffer(p,a,b,c,d)                      (p)->GetBackBuffer(a,b,c,d)
1495#define IDirect3DDevice9_GetRasterStatus(p,a,b)                        (p)->GetRasterStatus(a,b)
1496#define IDirect3DDevice9_SetDialogBoxMode(p,a)                         (p)->SetDialogBoxMode(a)
1497#define IDirect3DDevice9_SetGammaRamp(p,a,b,c)                         (p)->SetGammaRamp(a,b,c)
1498#define IDirect3DDevice9_GetGammaRamp(p,a,b)                           (p)->GetGammaRamp(a,b)
1499#define IDirect3DDevice9_CreateTexture(p,a,b,c,d,e,f,g,h)              (p)->CreateTexture(a,b,c,d,e,f,g,h)
1500#define IDirect3DDevice9_CreateVolumeTexture(p,a,b,c,d,e,f,g,h,i)      (p)->CreateVolumeTexture(a,b,c,d,e,f,g,h,i)
1501#define IDirect3DDevice9_CreateCubeTexture(p,a,b,c,d,e,f,g)            (p)->CreateCubeTexture(a,b,c,d,e,f,g)
1502#define IDirect3DDevice9_CreateVertexBuffer(p,a,b,c,d,e,f)             (p)->CreateVertexBuffer(a,b,c,d,e,f)
1503#define IDirect3DDevice9_CreateIndexBuffer(p,a,b,c,d,e,f)              (p)->CreateIndexBuffer(a,b,c,d,e,f)
1504#define IDirect3DDevice9_CreateRenderTarget(p,a,b,c,d,e,f,g,h)         (p)->CreateRenderTarget(a,b,c,d,e,f,g,h)
1505#define IDirect3DDevice9_CreateDepthStencilSurface(p,a,b,c,d,e,f,g,h)  (p)->CreateDepthStencilSurface(a,b,c,d,e,f,g,h)
1506#define IDirect3DDevice9_UpdateSurface(p,a,b,c,d)                      (p)->UpdateSurface(a,b,c,d)
1507#define IDirect3DDevice9_UpdateTexture(p,a,b)                          (p)->UpdateTexture(a,b)
1508#define IDirect3DDevice9_GetRenderTargetData(p,a,b)                    (p)->GetRenderTargetData(a,b)
1509#define IDirect3DDevice9_GetFrontBufferData(p,a,b)                     (p)->GetFrontBufferData(a,b)
1510#define IDirect3DDevice9_StretchRect(p,a,b,c,d,e)                      (p)->StretchRect(a,b,c,d,e)
1511#define IDirect3DDevice9_ColorFill(p,a,b,c)                            (p)->ColorFill(a,b,c)
1512#define IDirect3DDevice9_CreateOffscreenPlainSurface(p,a,b,c,d,e,f)    (p)->CreateOffscreenPlainSurface(a,b,c,d,e,f)
1513#define IDirect3DDevice9_SetRenderTarget(p,a,b)                        (p)->SetRenderTarget(a,b)
1514#define IDirect3DDevice9_GetRenderTarget(p,a,b)                        (p)->GetRenderTarget(a,b)
1515#define IDirect3DDevice9_SetDepthStencilSurface(p,a)                   (p)->SetDepthStencilSurface(a)
1516#define IDirect3DDevice9_GetDepthStencilSurface(p,a)                   (p)->GetDepthStencilSurface(a)
1517#define IDirect3DDevice9_BeginScene(p)                                 (p)->BeginScene()
1518#define IDirect3DDevice9_EndScene(p)                                   (p)->EndScene()
1519#define IDirect3DDevice9_Clear(p,a,b,c,d,e,f)                          (p)->Clear(a,b,c,d,e,f)
1520#define IDirect3DDevice9_SetTransform(p,a,b)                           (p)->SetTransform(a,b)
1521#define IDirect3DDevice9_GetTransform(p,a,b)                           (p)->GetTransform(a,b)
1522#define IDirect3DDevice9_MultiplyTransform(p,a,b)                      (p)->MultiplyTransform(a,b)
1523#define IDirect3DDevice9_SetViewport(p,a)                              (p)->SetViewport(a)
1524#define IDirect3DDevice9_GetViewport(p,a)                              (p)->GetViewport(a)
1525#define IDirect3DDevice9_SetMaterial(p,a)                              (p)->SetMaterial(a)
1526#define IDirect3DDevice9_GetMaterial(p,a)                              (p)->GetMaterial(a)
1527#define IDirect3DDevice9_SetLight(p,a,b)                               (p)->SetLight(a,b)
1528#define IDirect3DDevice9_GetLight(p,a,b)                               (p)->GetLight(a,b)
1529#define IDirect3DDevice9_LightEnable(p,a,b)                            (p)->LightEnable(a,b)
1530#define IDirect3DDevice9_GetLightEnable(p,a,b)                         (p)->GetLightEnable(a,b)
1531#define IDirect3DDevice9_SetClipPlane(p,a,b)                           (p)->SetClipPlane(a,b)
1532#define IDirect3DDevice9_GetClipPlane(p,a,b)                           (p)->GetClipPlane(a,b)
1533#define IDirect3DDevice9_SetRenderState(p,a,b)                         (p)->SetRenderState(a,b)
1534#define IDirect3DDevice9_GetRenderState(p,a,b)                         (p)->GetRenderState(a,b)
1535#define IDirect3DDevice9_CreateStateBlock(p,a,b)                       (p)->CreateStateBlock(a,b)
1536#define IDirect3DDevice9_BeginStateBlock(p)                            (p)->BeginStateBlock()
1537#define IDirect3DDevice9_EndStateBlock(p,a)                            (p)->EndStateBlock(a)
1538#define IDirect3DDevice9_SetClipStatus(p,a)                            (p)->SetClipStatus(a)
1539#define IDirect3DDevice9_GetClipStatus(p,a)                            (p)->GetClipStatus(a)
1540#define IDirect3DDevice9_GetTexture(p,a,b)                             (p)->GetTexture(a,b)
1541#define IDirect3DDevice9_SetTexture(p,a,b)                             (p)->SetTexture(a,b)
1542#define IDirect3DDevice9_GetTextureStageState(p,a,b,c)                 (p)->GetTextureStageState(a,b,c)
1543#define IDirect3DDevice9_SetTextureStageState(p,a,b,c)                 (p)->SetTextureStageState(a,b,c)
1544#define IDirect3DDevice9_GetSamplerState(p,a,b,c)                      (p)->GetSamplerState(a,b,c)
1545#define IDirect3DDevice9_SetSamplerState(p,a,b,c)                      (p)->SetSamplerState(a,b,c)
1546#define IDirect3DDevice9_ValidateDevice(p,a)                           (p)->ValidateDevice(a)
1547#define IDirect3DDevice9_SetPaletteEntries(p,a,b)                      (p)->SetPaletteEntries(a,b)
1548#define IDirect3DDevice9_GetPaletteEntries(p,a,b)                      (p)->GetPaletteEntries(a,b)
1549#define IDirect3DDevice9_SetCurrentTexturePalette(p,a)                 (p)->SetCurrentTexturePalette(a)
1550#define IDirect3DDevice9_GetCurrentTexturePalette(p,a)                 (p)->GetCurrentTexturePalette(a)
1551#define IDirect3DDevice9_SetScissorRect(p,a)                           (p)->SetScissorRect(a)
1552#define IDirect3DDevice9_GetScissorRect(p,a)                           (p)->GetScissorRect(a)
1553#define IDirect3DDevice9_SetSoftwareVertexProcessing(p,a)              (p)->SetSoftwareVertexProcessing(a)
1554#define IDirect3DDevice9_GetSoftwareVertexProcessing(p)                (p)->GetSoftwareVertexProcessing()
1555#define IDirect3DDevice9_SetNPatchMode(p,a)                            (p)->SetNPatchMode(a)
1556#define IDirect3DDevice9_GetNPatchMode(p)                              (p)->GetNPatchMode()
1557#define IDirect3DDevice9_DrawPrimitive(p,a,b,c)                        (p)->DrawPrimitive(a,b,c)
1558#define IDirect3DDevice9_DrawIndexedPrimitive(p,a,b,c,d,e,f)           (p)->DrawIndexedPrimitive(a,b,c,d,e,f)
1559#define IDirect3DDevice9_DrawPrimitiveUP(p,a,b,c,d)                    (p)->DrawPrimitiveUP(a,b,c,d)
1560#define IDirect3DDevice9_DrawIndexedPrimitiveUP(p,a,b,c,d,e,f,g,h)     (p)->DrawIndexedPrimitiveUP(a,b,c,d,e,f,g,h)
1561#define IDirect3DDevice9_ProcessVertices(p,a,b,c,d,e,f)                (p)->ProcessVertices(a,b,c,d,e,f)
1562#define IDirect3DDevice9_CreateVertexDeclaration(p,a,b)                (p)->CreateVertexDeclaration(a,b)
1563#define IDirect3DDevice9_SetVertexDeclaration(p,a)                     (p)->SetVertexDeclaration(a)
1564#define IDirect3DDevice9_GetVertexDeclaration(p,a)                     (p)->GetVertexDeclaration(a)
1565#define IDirect3DDevice9_SetFVF(p,a)                                   (p)->SetFVF(a)
1566#define IDirect3DDevice9_GetFVF(p,a)                                   (p)->GetFVF(a)
1567#define IDirect3DDevice9_CreateVertexShader(p,a,b)                     (p)->CreateVertexShader(a,b)
1568#define IDirect3DDevice9_SetVertexShader(p,a)                          (p)->SetVertexShader(a)
1569#define IDirect3DDevice9_GetVertexShader(p,a)                          (p)->GetVertexShader(a)
1570#define IDirect3DDevice9_SetVertexShaderConstantF(p,a,b,c)             (p)->SetVertexShaderConstantF(a,b,c)
1571#define IDirect3DDevice9_GetVertexShaderConstantF(p,a,b,c)             (p)->GetVertexShaderConstantF(a,b,c)
1572#define IDirect3DDevice9_SetVertexShaderConstantI(p,a,b,c)             (p)->SetVertexShaderConstantI(a,b,c)
1573#define IDirect3DDevice9_GetVertexShaderConstantI(p,a,b,c)             (p)->GetVertexShaderConstantI(a,b,c)
1574#define IDirect3DDevice9_SetVertexShaderConstantB(p,a,b,c)             (p)->SetVertexShaderConstantB(a,b,c)
1575#define IDirect3DDevice9_GetVertexShaderConstantB(p,a,b,c)             (p)->GetVertexShaderConstantB(a,b,c)
1576#define IDirect3DDevice9_SetStreamSource(p,a,b,c,d)                    (p)->SetStreamSource(a,b,c,d)
1577#define IDirect3DDevice9_GetStreamSource(p,a,b,c,d)                    (p)->GetStreamSource(a,b,c,d)
1578#define IDirect3DDevice9_SetStreamSourceFreq(p,a,b)                    (p)->SetStreamSourceFreq(a,b)
1579#define IDirect3DDevice9_GetStreamSourceFreq(p,a,b)                    (p)->GetStreamSourceFreq(a,b)
1580#define IDirect3DDevice9_SetIndices(p,a)                               (p)->SetIndices(a)
1581#define IDirect3DDevice9_GetIndices(p,a)                               (p)->GetIndices(a)
1582#define IDirect3DDevice9_CreatePixelShader(p,a,b)                      (p)->CreatePixelShader(a,b)
1583#define IDirect3DDevice9_SetPixelShader(p,a)                           (p)->SetPixelShader(a)
1584#define IDirect3DDevice9_GetPixelShader(p,a)                           (p)->GetPixelShader(a)
1585#define IDirect3DDevice9_SetPixelShaderConstantF(p,a,b,c)              (p)->SetPixelShaderConstantF(a,b,c)
1586#define IDirect3DDevice9_GetPixelShaderConstantF(p,a,b,c)              (p)->GetPixelShaderConstantF(a,b,c)
1587#define IDirect3DDevice9_SetPixelShaderConstantI(p,a,b,c)              (p)->SetPixelShaderConstantI(a,b,c)
1588#define IDirect3DDevice9_GetPixelShaderConstantI(p,a,b,c)              (p)->GetPixelShaderConstantI(a,b,c)
1589#define IDirect3DDevice9_SetPixelShaderConstantB(p,a,b,c)              (p)->SetPixelShaderConstantB(a,b,c)
1590#define IDirect3DDevice9_GetPixelShaderConstantB(p,a,b,c)              (p)->GetPixelShaderConstantB(a,b,c)
1591#define IDirect3DDevice9_DrawRectPatch(p,a,b,c)                        (p)->DrawRectPatch(a,b,c)
1592#define IDirect3DDevice9_DrawTriPatch(p,a,b,c)                         (p)->DrawTriPatch(a,b,c)
1593#define IDirect3DDevice9_DeletePatch(p,a)                              (p)->DeletePatch(a)
1594#define IDirect3DDevice9_CreateQuery(p,a,b)                            (p)->CreateQuery(a,b)
1595#endif
1596
1597
1598/*****************************************************************************
1599 * IDirect3DDevice9Ex interface
1600 */
1601#define INTERFACE IDirect3DDevice9Ex
1602DECLARE_INTERFACE_(IDirect3DDevice9Ex,IDirect3DDevice9)
1603{
1604    /*** IUnknown methods ***/
1605    STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
1606    STDMETHOD_(ULONG,AddRef)(THIS) PURE;
1607    STDMETHOD_(ULONG,Release)(THIS) PURE;
1608    /*** IDirect3DDevice9 methods ***/
1609    STDMETHOD(TestCooperativeLevel)(THIS) PURE;
1610    STDMETHOD_(UINT, GetAvailableTextureMem)(THIS) PURE;
1611    STDMETHOD(EvictManagedResources)(THIS) PURE;
1612    STDMETHOD(GetDirect3D)(THIS_ IDirect3D9** ppD3D9) PURE;
1613    STDMETHOD(GetDeviceCaps)(THIS_ D3DCAPS9* pCaps) PURE;
1614    STDMETHOD(GetDisplayMode)(THIS_ UINT iSwapChain, D3DDISPLAYMODE* pMode) PURE;
1615    STDMETHOD(GetCreationParameters)(THIS_ D3DDEVICE_CREATION_PARAMETERS *pParameters) PURE;
1616    STDMETHOD(SetCursorProperties)(THIS_ UINT XHotSpot, UINT YHotSpot, IDirect3DSurface9* pCursorBitmap) PURE;
1617    STDMETHOD_(void, SetCursorPosition)(THIS_ int X,int Y, DWORD Flags) PURE;
1618    STDMETHOD_(WINBOOL, ShowCursor)(THIS_ WINBOOL bShow) PURE;
1619    STDMETHOD(CreateAdditionalSwapChain)(THIS_ D3DPRESENT_PARAMETERS* pPresentationParameters, IDirect3DSwapChain9** pSwapChain) PURE;
1620    STDMETHOD(GetSwapChain)(THIS_ UINT iSwapChain, IDirect3DSwapChain9** pSwapChain) PURE;
1621    STDMETHOD_(UINT, GetNumberOfSwapChains)(THIS) PURE;
1622    STDMETHOD(Reset)(THIS_ D3DPRESENT_PARAMETERS* pPresentationParameters) PURE;
1623    STDMETHOD(Present)(THIS_ CONST RECT* pSourceRect, CONST RECT* pDestRect, HWND hDestWindowOverride, CONST RGNDATA* pDirtyRegion) PURE;
1624    STDMETHOD(GetBackBuffer)(THIS_ UINT iSwapChain, UINT iBackBuffer, D3DBACKBUFFER_TYPE Type, IDirect3DSurface9** ppBackBuffer) PURE;
1625    STDMETHOD(GetRasterStatus)(THIS_ UINT iSwapChain, D3DRASTER_STATUS* pRasterStatus) PURE;
1626    STDMETHOD(SetDialogBoxMode)(THIS_ WINBOOL bEnableDialogs) PURE;
1627    STDMETHOD_(void, SetGammaRamp)(THIS_ UINT iSwapChain, DWORD Flags, CONST D3DGAMMARAMP* pRamp) PURE;
1628    STDMETHOD_(void, GetGammaRamp)(THIS_ UINT iSwapChain, D3DGAMMARAMP* pRamp) PURE;
1629    STDMETHOD(CreateTexture)(THIS_ UINT Width, UINT Height, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DTexture9** ppTexture, HANDLE* pSharedHandle) PURE;
1630    STDMETHOD(CreateVolumeTexture)(THIS_ UINT Width, UINT Height, UINT Depth, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DVolumeTexture9** ppVolumeTexture, HANDLE* pSharedHandle) PURE;
1631    STDMETHOD(CreateCubeTexture)(THIS_ UINT EdgeLength, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DCubeTexture9** ppCubeTexture, HANDLE* pSharedHandle) PURE;
1632    STDMETHOD(CreateVertexBuffer)(THIS_ UINT Length, DWORD Usage, DWORD FVF, D3DPOOL Pool, IDirect3DVertexBuffer9** ppVertexBuffer, HANDLE* pSharedHandle) PURE;
1633    STDMETHOD(CreateIndexBuffer)(THIS_ UINT Length, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DIndexBuffer9** ppIndexBuffer, HANDLE* pSharedHandle) PURE;
1634    STDMETHOD(CreateRenderTarget)(THIS_ UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, WINBOOL Lockable, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle) PURE;
1635    STDMETHOD(CreateDepthStencilSurface)(THIS_ UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, WINBOOL Discard, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle) PURE;
1636    STDMETHOD(UpdateSurface)(THIS_ IDirect3DSurface9* pSourceSurface, CONST RECT* pSourceRect, IDirect3DSurface9* pDestinationSurface, CONST POINT* pDestPoint) PURE;
1637    STDMETHOD(UpdateTexture)(THIS_ IDirect3DBaseTexture9* pSourceTexture, IDirect3DBaseTexture9* pDestinationTexture) PURE;
1638    STDMETHOD(GetRenderTargetData)(THIS_ IDirect3DSurface9* pRenderTarget, IDirect3DSurface9* pDestSurface) PURE;
1639    STDMETHOD(GetFrontBufferData)(THIS_ UINT iSwapChain, IDirect3DSurface9* pDestSurface) PURE;
1640    STDMETHOD(StretchRect)(THIS_ IDirect3DSurface9* pSourceSurface, CONST RECT* pSourceRect, IDirect3DSurface9* pDestSurface, CONST RECT* pDestRect, D3DTEXTUREFILTERTYPE Filter) PURE;
1641    STDMETHOD(ColorFill)(THIS_ IDirect3DSurface9* pSurface, CONST RECT* pRect, D3DCOLOR color) PURE;
1642    STDMETHOD(CreateOffscreenPlainSurface)(THIS_ UINT Width, UINT Height, D3DFORMAT Format, D3DPOOL Pool, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle) PURE;
1643    STDMETHOD(SetRenderTarget)(THIS_ DWORD RenderTargetIndex, IDirect3DSurface9* pRenderTarget) PURE;
1644    STDMETHOD(GetRenderTarget)(THIS_ DWORD RenderTargetIndex, IDirect3DSurface9** ppRenderTarget) PURE;
1645    STDMETHOD(SetDepthStencilSurface)(THIS_ IDirect3DSurface9* pNewZStencil) PURE;
1646    STDMETHOD(GetDepthStencilSurface)(THIS_ IDirect3DSurface9** ppZStencilSurface) PURE;
1647    STDMETHOD(BeginScene)(THIS) PURE;
1648    STDMETHOD(EndScene)(THIS) PURE;
1649    STDMETHOD(Clear)(THIS_ DWORD Count, CONST D3DRECT* pRects, DWORD Flags, D3DCOLOR Color, float Z, DWORD Stencil) PURE;
1650    STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE State, CONST D3DMATRIX* pMatrix) PURE;
1651    STDMETHOD(GetTransform)(THIS_ D3DTRANSFORMSTATETYPE State, D3DMATRIX* pMatrix) PURE;
1652    STDMETHOD(MultiplyTransform)(THIS_ D3DTRANSFORMSTATETYPE, CONST D3DMATRIX*) PURE;
1653    STDMETHOD(SetViewport)(THIS_ CONST D3DVIEWPORT9* pViewport) PURE;
1654    STDMETHOD(GetViewport)(THIS_ D3DVIEWPORT9* pViewport) PURE;
1655    STDMETHOD(SetMaterial)(THIS_ CONST D3DMATERIAL9* pMaterial) PURE;
1656    STDMETHOD(GetMaterial)(THIS_ D3DMATERIAL9* pMaterial) PURE;
1657    STDMETHOD(SetLight)(THIS_ DWORD Index, CONST D3DLIGHT9*) PURE;
1658    STDMETHOD(GetLight)(THIS_ DWORD Index, D3DLIGHT9*) PURE;
1659    STDMETHOD(LightEnable)(THIS_ DWORD Index, WINBOOL Enable) PURE;
1660    STDMETHOD(GetLightEnable)(THIS_ DWORD Index, WINBOOL* pEnable) PURE;
1661    STDMETHOD(SetClipPlane)(THIS_ DWORD Index, CONST float* pPlane) PURE;
1662    STDMETHOD(GetClipPlane)(THIS_ DWORD Index, float* pPlane) PURE;
1663    STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE State, DWORD Value) PURE;
1664    STDMETHOD(GetRenderState)(THIS_ D3DRENDERSTATETYPE State, DWORD* pValue) PURE;
1665    STDMETHOD(CreateStateBlock)(THIS_ D3DSTATEBLOCKTYPE Type, IDirect3DStateBlock9** ppSB) PURE;
1666    STDMETHOD(BeginStateBlock)(THIS) PURE;
1667    STDMETHOD(EndStateBlock)(THIS_ IDirect3DStateBlock9** ppSB) PURE;
1668    STDMETHOD(SetClipStatus)(THIS_ CONST D3DCLIPSTATUS9* pClipStatus) PURE;
1669    STDMETHOD(GetClipStatus)(THIS_ D3DCLIPSTATUS9* pClipStatus) PURE;
1670    STDMETHOD(GetTexture)(THIS_ DWORD Stage, IDirect3DBaseTexture9** ppTexture) PURE;
1671    STDMETHOD(SetTexture)(THIS_ DWORD Stage, IDirect3DBaseTexture9* pTexture) PURE;
1672    STDMETHOD(GetTextureStageState)(THIS_ DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD* pValue) PURE;
1673    STDMETHOD(SetTextureStageState)(THIS_ DWORD Stage, D3DTEXTURESTAGESTATETYPE Type, DWORD Value) PURE;
1674    STDMETHOD(GetSamplerState)(THIS_ DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD* pValue) PURE;
1675    STDMETHOD(SetSamplerState)(THIS_ DWORD Sampler, D3DSAMPLERSTATETYPE Type, DWORD Value) PURE;
1676    STDMETHOD(ValidateDevice)(THIS_ DWORD* pNumPasses) PURE;
1677    STDMETHOD(SetPaletteEntries)(THIS_ UINT PaletteNumber, CONST PALETTEENTRY* pEntries) PURE;
1678    STDMETHOD(GetPaletteEntries)(THIS_ UINT PaletteNumber,PALETTEENTRY* pEntries) PURE;
1679    STDMETHOD(SetCurrentTexturePalette)(THIS_ UINT PaletteNumber) PURE;
1680    STDMETHOD(GetCurrentTexturePalette)(THIS_ UINT *PaletteNumber) PURE;
1681    STDMETHOD(SetScissorRect)(THIS_ CONST RECT* pRect) PURE;
1682    STDMETHOD(GetScissorRect)(THIS_ RECT* pRect) PURE;
1683    STDMETHOD(SetSoftwareVertexProcessing)(THIS_ WINBOOL bSoftware) PURE;
1684    STDMETHOD_(WINBOOL, GetSoftwareVertexProcessing)(THIS) PURE;
1685    STDMETHOD(SetNPatchMode)(THIS_ float nSegments) PURE;
1686    STDMETHOD_(float, GetNPatchMode)(THIS) PURE;
1687    STDMETHOD(DrawPrimitive)(THIS_ D3DPRIMITIVETYPE PrimitiveType, UINT StartVertex, UINT PrimitiveCount) PURE;
1688    STDMETHOD(DrawIndexedPrimitive)(THIS_ D3DPRIMITIVETYPE, INT BaseVertexIndex, UINT MinVertexIndex, UINT NumVertices, UINT startIndex, UINT primCount) PURE;
1689    STDMETHOD(DrawPrimitiveUP)(THIS_ D3DPRIMITIVETYPE PrimitiveType, UINT PrimitiveCount, CONST void* pVertexStreamZeroData, UINT VertexStreamZeroStride) PURE;
1690    STDMETHOD(DrawIndexedPrimitiveUP)(THIS_ D3DPRIMITIVETYPE PrimitiveType, UINT MinVertexIndex, UINT NumVertices, UINT PrimitiveCount, CONST void* pIndexData, D3DFORMAT IndexDataFormat, CONST void* pVertexStreamZeroData, UINT VertexStreamZeroStride) PURE;
1691    STDMETHOD(ProcessVertices)(THIS_ UINT SrcStartIndex, UINT DestIndex, UINT VertexCount, IDirect3DVertexBuffer9* pDestBuffer, IDirect3DVertexDeclaration9* pVertexDecl, DWORD Flags) PURE;
1692    STDMETHOD(CreateVertexDeclaration)(THIS_ CONST D3DVERTEXELEMENT9* pVertexElements, IDirect3DVertexDeclaration9** ppDecl) PURE;
1693    STDMETHOD(SetVertexDeclaration)(THIS_ IDirect3DVertexDeclaration9* pDecl) PURE;
1694    STDMETHOD(GetVertexDeclaration)(THIS_ IDirect3DVertexDeclaration9** ppDecl) PURE;
1695    STDMETHOD(SetFVF)(THIS_ DWORD FVF) PURE;
1696    STDMETHOD(GetFVF)(THIS_ DWORD* pFVF) PURE;
1697    STDMETHOD(CreateVertexShader)(THIS_ CONST DWORD* pFunction, IDirect3DVertexShader9** ppShader) PURE;
1698    STDMETHOD(SetVertexShader)(THIS_ IDirect3DVertexShader9* pShader) PURE;
1699    STDMETHOD(GetVertexShader)(THIS_ IDirect3DVertexShader9** ppShader) PURE;
1700    STDMETHOD(SetVertexShaderConstantF)(THIS_ UINT StartRegister, CONST float* pConstantData, UINT Vector4fCount) PURE;
1701    STDMETHOD(GetVertexShaderConstantF)(THIS_ UINT StartRegister, float* pConstantData, UINT Vector4fCount) PURE;
1702    STDMETHOD(SetVertexShaderConstantI)(THIS_ UINT StartRegister, CONST int* pConstantData, UINT Vector4iCount) PURE;
1703    STDMETHOD(GetVertexShaderConstantI)(THIS_ UINT StartRegister, int* pConstantData, UINT Vector4iCount) PURE;
1704    STDMETHOD(SetVertexShaderConstantB)(THIS_ UINT StartRegister, CONST WINBOOL* pConstantData, UINT  BoolCount) PURE;
1705    STDMETHOD(GetVertexShaderConstantB)(THIS_ UINT StartRegister, WINBOOL* pConstantData, UINT BoolCount) PURE;
1706    STDMETHOD(SetStreamSource)(THIS_ UINT StreamNumber, IDirect3DVertexBuffer9* pStreamData, UINT OffsetInBytes, UINT Stride) PURE;
1707    STDMETHOD(GetStreamSource)(THIS_ UINT StreamNumber, IDirect3DVertexBuffer9** ppStreamData, UINT* OffsetInBytes, UINT* pStride) PURE;
1708    STDMETHOD(SetStreamSourceFreq)(THIS_ UINT StreamNumber, UINT Divider) PURE;
1709    STDMETHOD(GetStreamSourceFreq)(THIS_ UINT StreamNumber, UINT* Divider) PURE;
1710    STDMETHOD(SetIndices)(THIS_ IDirect3DIndexBuffer9* pIndexData) PURE;
1711    STDMETHOD(GetIndices)(THIS_ IDirect3DIndexBuffer9** ppIndexData) PURE;
1712    STDMETHOD(CreatePixelShader)(THIS_ CONST DWORD* pFunction, IDirect3DPixelShader9** ppShader) PURE;
1713    STDMETHOD(SetPixelShader)(THIS_ IDirect3DPixelShader9* pShader) PURE;
1714    STDMETHOD(GetPixelShader)(THIS_ IDirect3DPixelShader9** ppShader) PURE;
1715    STDMETHOD(SetPixelShaderConstantF)(THIS_ UINT StartRegister, CONST float* pConstantData, UINT Vector4fCount) PURE;
1716    STDMETHOD(GetPixelShaderConstantF)(THIS_ UINT StartRegister, float* pConstantData, UINT Vector4fCount) PURE;
1717    STDMETHOD(SetPixelShaderConstantI)(THIS_ UINT StartRegister, CONST int* pConstantData, UINT Vector4iCount) PURE;
1718    STDMETHOD(GetPixelShaderConstantI)(THIS_ UINT StartRegister, int* pConstantData, UINT Vector4iCount) PURE;
1719    STDMETHOD(SetPixelShaderConstantB)(THIS_ UINT StartRegister, CONST WINBOOL* pConstantData, UINT  BoolCount) PURE;
1720    STDMETHOD(GetPixelShaderConstantB)(THIS_ UINT StartRegister, WINBOOL* pConstantData, UINT BoolCount) PURE;
1721    STDMETHOD(DrawRectPatch)(THIS_ UINT Handle, CONST float* pNumSegs, CONST D3DRECTPATCH_INFO* pRectPatchInfo) PURE;
1722    STDMETHOD(DrawTriPatch)(THIS_ UINT Handle, CONST float* pNumSegs, CONST D3DTRIPATCH_INFO* pTriPatchInfo) PURE;
1723    STDMETHOD(DeletePatch)(THIS_ UINT Handle) PURE;
1724    STDMETHOD(CreateQuery)(THIS_ D3DQUERYTYPE Type, IDirect3DQuery9** ppQuery) PURE;
1725    /* IDirect3DDevice9Ex methods */
1726    STDMETHOD(SetConvolutionMonoKernel)(THIS_ UINT width, UINT height, float *rows, float *columns) PURE;
1727    STDMETHOD(ComposeRects)(THIS_ IDirect3DSurface9 *src_surface, IDirect3DSurface9 *dst_surface,
1728            IDirect3DVertexBuffer9 *src_descs, UINT rect_count, IDirect3DVertexBuffer9 *dst_descs,
1729            D3DCOMPOSERECTSOP operation, INT offset_x, INT offset_y) PURE;
1730    STDMETHOD(PresentEx)(THIS_ CONST RECT *pSourceRect, CONST RECT *pDestRect, HWND hDestWindowOverride, CONST RGNDATA *pDirtyRegion, DWORD dwFlags) PURE;
1731    STDMETHOD(GetGPUThreadPriority)(THIS_ INT *pPriority) PURE;
1732    STDMETHOD(SetGPUThreadPriority)(THIS_ INT Priority) PURE;
1733    STDMETHOD(WaitForVBlank)(THIS_ UINT iSwapChain) PURE;
1734    STDMETHOD(CheckResourceResidency)(THIS_ IDirect3DResource9 **resources, UINT32 resource_count) PURE;
1735    STDMETHOD(SetMaximumFrameLatency)(THIS_ UINT MaxLatency) PURE;
1736    STDMETHOD(GetMaximumFrameLatency)(THIS_ UINT *pMaxLatenxy) PURE;
1737    STDMETHOD(CheckDeviceState)(THIS_ HWND dst_window) PURE;
1738    STDMETHOD(CreateRenderTargetEx)(THIS_ UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultiSampleQuality, WINBOOL Lockable, IDirect3DSurface9 ** ppSurface, HANDLE *pSharedHandle, DWORD Usage) PURE;
1739    STDMETHOD(CreateOffscreenPlainSurfaceEx)(THIS_ UINT Width, UINT Height, D3DFORMAT Format, D3DPOOL Pool, IDirect3DSurface9 **ppSurface, HANDLE *pSharedHandle, DWORD Usage) PURE;
1740    STDMETHOD(CreateDepthStencilSurfaceEx)(THIS_ UINT width, UINT height, D3DFORMAT format,
1741            D3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality, WINBOOL discard,
1742            IDirect3DSurface9 **surface, HANDLE *shared_handle, DWORD usage) PURE;
1743    STDMETHOD(ResetEx)(THIS_ D3DPRESENT_PARAMETERS *pPresentationParameters, D3DDISPLAYMODEEX *pFullscreenDisplayMode) PURE;
1744    STDMETHOD(GetDisplayModeEx)(THIS_ UINT iSwapChain, D3DDISPLAYMODEEX *pMode, D3DDISPLAYROTATION *pRotation) PURE;
1745};
1746#undef INTERFACE
1747
1748#if !defined(__cplusplus) || defined(CINTERFACE)
1749/*** IUnknown methods ***/
1750#define IDirect3DDevice9Ex_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
1751#define IDirect3DDevice9Ex_AddRef(p)             (p)->lpVtbl->AddRef(p)
1752#define IDirect3DDevice9Ex_Release(p)            (p)->lpVtbl->Release(p)
1753/*** IDirect3DDevice9 methods ***/
1754#define IDirect3DDevice9Ex_TestCooperativeLevel(p)                       (p)->lpVtbl->TestCooperativeLevel(p)
1755#define IDirect3DDevice9Ex_GetAvailableTextureMem(p)                     (p)->lpVtbl->GetAvailableTextureMem(p)
1756#define IDirect3DDevice9Ex_EvictManagedResources(p)                      (p)->lpVtbl->EvictManagedResources(p)
1757#define IDirect3DDevice9Ex_GetDirect3D(p,a)                              (p)->lpVtbl->GetDirect3D(p,a)
1758#define IDirect3DDevice9Ex_GetDeviceCaps(p,a)                            (p)->lpVtbl->GetDeviceCaps(p,a)
1759#define IDirect3DDevice9Ex_GetDisplayMode(p,a,b)                         (p)->lpVtbl->GetDisplayMode(p,a,b)
1760#define IDirect3DDevice9Ex_GetCreationParameters(p,a)                    (p)->lpVtbl->GetCreationParameters(p,a)
1761#define IDirect3DDevice9Ex_SetCursorProperties(p,a,b,c)                  (p)->lpVtbl->SetCursorProperties(p,a,b,c)
1762#define IDirect3DDevice9Ex_SetCursorPosition(p,a,b,c)                    (p)->lpVtbl->SetCursorPosition(p,a,b,c)
1763#define IDirect3DDevice9Ex_ShowCursor(p,a)                               (p)->lpVtbl->ShowCursor(p,a)
1764#define IDirect3DDevice9Ex_CreateAdditionalSwapChain(p,a,b)              (p)->lpVtbl->CreateAdditionalSwapChain(p,a,b)
1765#define IDirect3DDevice9Ex_GetSwapChain(p,a,b)                           (p)->lpVtbl->GetSwapChain(p,a,b)
1766#define IDirect3DDevice9Ex_GetNumberOfSwapChains(p)                      (p)->lpVtbl->GetNumberOfSwapChains(p)
1767#define IDirect3DDevice9Ex_Reset(p,a)                                    (p)->lpVtbl->Reset(p,a)
1768#define IDirect3DDevice9Ex_Present(p,a,b,c,d)                            (p)->lpVtbl->Present(p,a,b,c,d)
1769#define IDirect3DDevice9Ex_GetBackBuffer(p,a,b,c,d)                      (p)->lpVtbl->GetBackBuffer(p,a,b,c,d)
1770#define IDirect3DDevice9Ex_GetRasterStatus(p,a,b)                        (p)->lpVtbl->GetRasterStatus(p,a,b)
1771#define IDirect3DDevice9Ex_SetDialogBoxMode(p,a)                         (p)->lpVtbl->SetDialogBoxMode(p,a)
1772#define IDirect3DDevice9Ex_SetGammaRamp(p,a,b,c)                         (p)->lpVtbl->SetGammaRamp(p,a,b,c)
1773#define IDirect3DDevice9Ex_GetGammaRamp(p,a,b)                           (p)->lpVtbl->GetGammaRamp(p,a,b)
1774#define IDirect3DDevice9Ex_CreateTexture(p,a,b,c,d,e,f,g,h)              (p)->lpVtbl->CreateTexture(p,a,b,c,d,e,f,g,h)
1775#define IDirect3DDevice9Ex_CreateVolumeTexture(p,a,b,c,d,e,f,g,h,i)      (p)->lpVtbl->CreateVolumeTexture(p,a,b,c,d,e,f,g,h,i)
1776#define IDirect3DDevice9Ex_CreateCubeTexture(p,a,b,c,d,e,f,g)            (p)->lpVtbl->CreateCubeTexture(p,a,b,c,d,e,f,g)
1777#define IDirect3DDevice9Ex_CreateVertexBuffer(p,a,b,c,d,e,f)             (p)->lpVtbl->CreateVertexBuffer(p,a,b,c,d,e,f)
1778#define IDirect3DDevice9Ex_CreateIndexBuffer(p,a,b,c,d,e,f)              (p)->lpVtbl->CreateIndexBuffer(p,a,b,c,d,e,f)
1779#define IDirect3DDevice9Ex_CreateRenderTarget(p,a,b,c,d,e,f,g,h)         (p)->lpVtbl->CreateRenderTarget(p,a,b,c,d,e,f,g,h)
1780#define IDirect3DDevice9Ex_CreateDepthStencilSurface(p,a,b,c,d,e,f,g,h)  (p)->lpVtbl->CreateDepthStencilSurface(p,a,b,c,d,e,f,g,h)
1781#define IDirect3DDevice9Ex_UpdateSurface(p,a,b,c,d)                      (p)->lpVtbl->UpdateSurface(p,a,b,c,d)
1782#define IDirect3DDevice9Ex_UpdateTexture(p,a,b)                          (p)->lpVtbl->UpdateTexture(p,a,b)
1783#define IDirect3DDevice9Ex_GetRenderTargetData(p,a,b)                    (p)->lpVtbl->GetRenderTargetData(p,a,b)
1784#define IDirect3DDevice9Ex_GetFrontBufferData(p,a,b)                     (p)->lpVtbl->GetFrontBufferData(p,a,b)
1785#define IDirect3DDevice9Ex_StretchRect(p,a,b,c,d,e)                      (p)->lpVtbl->StretchRect(p,a,b,c,d,e)
1786#define IDirect3DDevice9Ex_ColorFill(p,a,b,c)                            (p)->lpVtbl->ColorFill(p,a,b,c)
1787#define IDirect3DDevice9Ex_CreateOffscreenPlainSurface(p,a,b,c,d,e,f)    (p)->lpVtbl->CreateOffscreenPlainSurface(p,a,b,c,d,e,f)
1788#define IDirect3DDevice9Ex_SetRenderTarget(p,a,b)                        (p)->lpVtbl->SetRenderTarget(p,a,b)
1789#define IDirect3DDevice9Ex_GetRenderTarget(p,a,b)                        (p)->lpVtbl->GetRenderTarget(p,a,b)
1790#define IDirect3DDevice9Ex_SetDepthStencilSurface(p,a)                   (p)->lpVtbl->SetDepthStencilSurface(p,a)
1791#define IDirect3DDevice9Ex_GetDepthStencilSurface(p,a)                   (p)->lpVtbl->GetDepthStencilSurface(p,a)
1792#define IDirect3DDevice9Ex_BeginScene(p)                                 (p)->lpVtbl->BeginScene(p)
1793#define IDirect3DDevice9Ex_EndScene(p)                                   (p)->lpVtbl->EndScene(p)
1794#define IDirect3DDevice9Ex_Clear(p,a,b,c,d,e,f)                          (p)->lpVtbl->Clear(p,a,b,c,d,e,f)
1795#define IDirect3DDevice9Ex_SetTransform(p,a,b)                           (p)->lpVtbl->SetTransform(p,a,b)
1796#define IDirect3DDevice9Ex_GetTransform(p,a,b)                           (p)->lpVtbl->GetTransform(p,a,b)
1797#define IDirect3DDevice9Ex_MultiplyTransform(p,a,b)                      (p)->lpVtbl->MultiplyTransform(p,a,b)
1798#define IDirect3DDevice9Ex_SetViewport(p,a)                              (p)->lpVtbl->SetViewport(p,a)
1799#define IDirect3DDevice9Ex_GetViewport(p,a)                              (p)->lpVtbl->GetViewport(p,a)
1800#define IDirect3DDevice9Ex_SetMaterial(p,a)                              (p)->lpVtbl->SetMaterial(p,a)
1801#define IDirect3DDevice9Ex_GetMaterial(p,a)                              (p)->lpVtbl->GetMaterial(p,a)
1802#define IDirect3DDevice9Ex_SetLight(p,a,b)                               (p)->lpVtbl->SetLight(p,a,b)
1803#define IDirect3DDevice9Ex_GetLight(p,a,b)                               (p)->lpVtbl->GetLight(p,a,b)
1804#define IDirect3DDevice9Ex_LightEnable(p,a,b)                            (p)->lpVtbl->LightEnable(p,a,b)
1805#define IDirect3DDevice9Ex_GetLightEnable(p,a,b)                         (p)->lpVtbl->GetLightEnable(p,a,b)
1806#define IDirect3DDevice9Ex_SetClipPlane(p,a,b)                           (p)->lpVtbl->SetClipPlane(p,a,b)
1807#define IDirect3DDevice9Ex_GetClipPlane(p,a,b)                           (p)->lpVtbl->GetClipPlane(p,a,b)
1808#define IDirect3DDevice9Ex_SetRenderState(p,a,b)                         (p)->lpVtbl->SetRenderState(p,a,b)
1809#define IDirect3DDevice9Ex_GetRenderState(p,a,b)                         (p)->lpVtbl->GetRenderState(p,a,b)
1810#define IDirect3DDevice9Ex_CreateStateBlock(p,a,b)                       (p)->lpVtbl->CreateStateBlock(p,a,b)
1811#define IDirect3DDevice9Ex_BeginStateBlock(p)                            (p)->lpVtbl->BeginStateBlock(p)
1812#define IDirect3DDevice9Ex_EndStateBlock(p,a)                            (p)->lpVtbl->EndStateBlock(p,a)
1813#define IDirect3DDevice9Ex_SetClipStatus(p,a)                            (p)->lpVtbl->SetClipStatus(p,a)
1814#define IDirect3DDevice9Ex_GetClipStatus(p,a)                            (p)->lpVtbl->GetClipStatus(p,a)
1815#define IDirect3DDevice9Ex_GetTexture(p,a,b)                             (p)->lpVtbl->GetTexture(p,a,b)
1816#define IDirect3DDevice9Ex_SetTexture(p,a,b)                             (p)->lpVtbl->SetTexture(p,a,b)
1817#define IDirect3DDevice9Ex_GetTextureStageState(p,a,b,c)                 (p)->lpVtbl->GetTextureStageState(p,a,b,c)
1818#define IDirect3DDevice9Ex_SetTextureStageState(p,a,b,c)                 (p)->lpVtbl->SetTextureStageState(p,a,b,c)
1819#define IDirect3DDevice9Ex_GetSamplerState(p,a,b,c)                      (p)->lpVtbl->GetSamplerState(p,a,b,c)
1820#define IDirect3DDevice9Ex_SetSamplerState(p,a,b,c)                      (p)->lpVtbl->SetSamplerState(p,a,b,c)
1821#define IDirect3DDevice9Ex_ValidateDevice(p,a)                           (p)->lpVtbl->ValidateDevice(p,a)
1822#define IDirect3DDevice9Ex_SetPaletteEntries(p,a,b)                      (p)->lpVtbl->SetPaletteEntries(p,a,b)
1823#define IDirect3DDevice9Ex_GetPaletteEntries(p,a,b)                      (p)->lpVtbl->GetPaletteEntries(p,a,b)
1824#define IDirect3DDevice9Ex_SetCurrentTexturePalette(p,a)                 (p)->lpVtbl->SetCurrentTexturePalette(p,a)
1825#define IDirect3DDevice9Ex_GetCurrentTexturePalette(p,a)                 (p)->lpVtbl->GetCurrentTexturePalette(p,a)
1826#define IDirect3DDevice9Ex_SetScissorRect(p,a)                           (p)->lpVtbl->SetScissorRect(p,a)
1827#define IDirect3DDevice9Ex_GetScissorRect(p,a)                           (p)->lpVtbl->GetScissorRect(p,a)
1828#define IDirect3DDevice9Ex_SetSoftwareVertexProcessing(p,a)              (p)->lpVtbl->SetSoftwareVertexProcessing(p,a)
1829#define IDirect3DDevice9Ex_GetSoftwareVertexProcessing(p)                (p)->lpVtbl->GetSoftwareVertexProcessing(p)
1830#define IDirect3DDevice9Ex_SetNPatchMode(p,a)                            (p)->lpVtbl->SetNPatchMode(p,a)
1831#define IDirect3DDevice9Ex_GetNPatchMode(p)                              (p)->lpVtbl->GetNPatchMode(p)
1832#define IDirect3DDevice9Ex_DrawPrimitive(p,a,b,c)                        (p)->lpVtbl->DrawPrimitive(p,a,b,c)
1833#define IDirect3DDevice9Ex_DrawIndexedPrimitive(p,a,b,c,d,e,f)           (p)->lpVtbl->DrawIndexedPrimitive(p,a,b,c,d,e,f)
1834#define IDirect3DDevice9Ex_DrawPrimitiveUP(p,a,b,c,d)                    (p)->lpVtbl->DrawPrimitiveUP(p,a,b,c,d)
1835#define IDirect3DDevice9Ex_DrawIndexedPrimitiveUP(p,a,b,c,d,e,f,g,h)     (p)->lpVtbl->DrawIndexedPrimitiveUP(p,a,b,c,d,e,f,g,h)
1836#define IDirect3DDevice9Ex_ProcessVertices(p,a,b,c,d,e,f)                (p)->lpVtbl->ProcessVertices(p,a,b,c,d,e,f)
1837#define IDirect3DDevice9Ex_CreateVertexDeclaration(p,a,b)                (p)->lpVtbl->CreateVertexDeclaration(p,a,b)
1838#define IDirect3DDevice9Ex_SetVertexDeclaration(p,a)                     (p)->lpVtbl->SetVertexDeclaration(p,a)
1839#define IDirect3DDevice9Ex_GetVertexDeclaration(p,a)                     (p)->lpVtbl->GetVertexDeclaration(p,a)
1840#define IDirect3DDevice9Ex_SetFVF(p,a)                                   (p)->lpVtbl->SetFVF(p,a)
1841#define IDirect3DDevice9Ex_GetFVF(p,a)                                   (p)->lpVtbl->GetFVF(p,a)
1842#define IDirect3DDevice9Ex_CreateVertexShader(p,a,b)                     (p)->lpVtbl->CreateVertexShader(p,a,b)
1843#define IDirect3DDevice9Ex_SetVertexShader(p,a)                          (p)->lpVtbl->SetVertexShader(p,a)
1844#define IDirect3DDevice9Ex_GetVertexShader(p,a)                          (p)->lpVtbl->GetVertexShader(p,a)
1845#define IDirect3DDevice9Ex_SetVertexShaderConstantF(p,a,b,c)             (p)->lpVtbl->SetVertexShaderConstantF(p,a,b,c)
1846#define IDirect3DDevice9Ex_GetVertexShaderConstantF(p,a,b,c)             (p)->lpVtbl->GetVertexShaderConstantF(p,a,b,c)
1847#define IDirect3DDevice9Ex_SetVertexShaderConstantI(p,a,b,c)             (p)->lpVtbl->SetVertexShaderConstantI(p,a,b,c)
1848#define IDirect3DDevice9Ex_GetVertexShaderConstantI(p,a,b,c)             (p)->lpVtbl->GetVertexShaderConstantI(p,a,b,c)
1849#define IDirect3DDevice9Ex_SetVertexShaderConstantB(p,a,b,c)             (p)->lpVtbl->SetVertexShaderConstantB(p,a,b,c)
1850#define IDirect3DDevice9Ex_GetVertexShaderConstantB(p,a,b,c)             (p)->lpVtbl->GetVertexShaderConstantB(p,a,b,c)
1851#define IDirect3DDevice9Ex_SetStreamSource(p,a,b,c,d)                    (p)->lpVtbl->SetStreamSource(p,a,b,c,d)
1852#define IDirect3DDevice9Ex_GetStreamSource(p,a,b,c,d)                    (p)->lpVtbl->GetStreamSource(p,a,b,c,d)
1853#define IDirect3DDevice9Ex_SetStreamSourceFreq(p,a,b)                    (p)->lpVtbl->SetStreamSourceFreq(p,a,b)
1854#define IDirect3DDevice9Ex_GetStreamSourceFreq(p,a,b)                    (p)->lpVtbl->GetStreamSourceFreq(p,a,b)
1855#define IDirect3DDevice9Ex_SetIndices(p,a)                               (p)->lpVtbl->SetIndices(p,a)
1856#define IDirect3DDevice9Ex_GetIndices(p,a)                               (p)->lpVtbl->GetIndices(p,a)
1857#define IDirect3DDevice9Ex_CreatePixelShader(p,a,b)                      (p)->lpVtbl->CreatePixelShader(p,a,b)
1858#define IDirect3DDevice9Ex_SetPixelShader(p,a)                           (p)->lpVtbl->SetPixelShader(p,a)
1859#define IDirect3DDevice9Ex_GetPixelShader(p,a)                           (p)->lpVtbl->GetPixelShader(p,a)
1860#define IDirect3DDevice9Ex_SetPixelShaderConstantF(p,a,b,c)              (p)->lpVtbl->SetPixelShaderConstantF(p,a,b,c)
1861#define IDirect3DDevice9Ex_GetPixelShaderConstantF(p,a,b,c)              (p)->lpVtbl->GetPixelShaderConstantF(p,a,b,c)
1862#define IDirect3DDevice9Ex_SetPixelShaderConstantI(p,a,b,c)              (p)->lpVtbl->SetPixelShaderConstantI(p,a,b,c)
1863#define IDirect3DDevice9Ex_GetPixelShaderConstantI(p,a,b,c)              (p)->lpVtbl->GetPixelShaderConstantI(p,a,b,c)
1864#define IDirect3DDevice9Ex_SetPixelShaderConstantB(p,a,b,c)              (p)->lpVtbl->SetPixelShaderConstantB(p,a,b,c)
1865#define IDirect3DDevice9Ex_GetPixelShaderConstantB(p,a,b,c)              (p)->lpVtbl->GetPixelShaderConstantB(p,a,b,c)
1866#define IDirect3DDevice9Ex_DrawRectPatch(p,a,b,c)                        (p)->lpVtbl->DrawRectPatch(p,a,b,c)
1867#define IDirect3DDevice9Ex_DrawTriPatch(p,a,b,c)                         (p)->lpVtbl->DrawTriPatch(p,a,b,c)
1868#define IDirect3DDevice9Ex_DeletePatch(p,a)                              (p)->lpVtbl->DeletePatch(p,a)
1869#define IDirect3DDevice9Ex_CreateQuery(p,a,b)                            (p)->lpVtbl->CreateQuery(p,a,b)
1870/* IDirect3DDevice9Ex */
1871#define IDirect3DDevice9Ex_SetConvolutionMonoKernel(p,a,b,c,d)           (p)->lpVtbl->SetConvolutionMonoKernel(p,a,b,c,d)
1872#define IDirect3DDevice9Ex_ComposeRects(p,a,b,c,d,e,f,g,h)               (p)->lpVtbl->ComposeRects(p,a,b,c,d,e,f,g,h)
1873#define IDirect3DDevice9Ex_PresentEx(p,a,b,c,d,e)                        (p)->lpVtbl->PresentEx(p,a,b,c,d,e)
1874#define IDirect3DDevice9Ex_GetGPUThreadPriority(p,a)                     (p)->lpVtbl->GetGPUThreadPriority(p,a)
1875#define IDirect3DDevice9Ex_SetGPUThreadPriority(p,a)                     (p)->lpVtbl->SetGPUThreadPriority(p,a)
1876#define IDirect3DDevice9Ex_WaitForVBlank(p,a)                            (p)->lpVtbl->WaitForVBlank(p,a)
1877#define IDirect3DDevice9Ex_CheckResourceResidency(p,a,b)                 (p)->lpVtbl->CheckResourceResidency(p,a,b)
1878#define IDirect3DDevice9Ex_SetMaximumFrameLatency(p,a)                   (p)->lpVtbl->SetMaximumFrameLatency(p,a)
1879#define IDirect3DDevice9Ex_GetMaximumFrameLatency(p,a)                   (p)->lpVtbl->GetMaximumFrameLatency(p,a)
1880#define IDirect3DDevice9Ex_CheckDeviceState(p,a)                         (p)->lpVtbl->CheckDeviceState(p,a)
1881#define IDirect3DDevice9Ex_CreateRenderTargetEx(p,a,b,c,d,e,f,g,h,i)     (p)->lpVtbl->CreateRenderTargetEx(p,a,b,c,d,e,f,g,h,i)
1882#define IDirect3DDevice9Ex_CreateOffscreenPlainSurfaceEx(p,a,b,c,d,e,f,g)(p)->lpVtbl->CreateOffscreenPlainSurfaceEx(p,a,b,c,d,e,f,g)
1883#define IDirect3DDevice9Ex_CreateDepthStencilSurfaceEx(p,a,b,c,d,e,f,g,h,i)(p)->lpVtbl->CreateDepthStencilSurfaceEx(p,a,b,c,d,e,f,g,h,i)
1884#define IDirect3DDevice9Ex_ResetEx(p,a,b)                                 (p)->lpVtbl->ResetEx(p,a,b)
1885#define IDirect3DDevice9Ex_GetDisplayModeEx(p,a,b,c)                     (p)->lpVtbl->GetDisplayModeEx(p,a,b,c)
1886#else
1887/*** IUnknown methods ***/
1888#define IDirect3DDevice9Ex_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
1889#define IDirect3DDevice9Ex_AddRef(p)             (p)->AddRef()
1890#define IDirect3DDevice9Ex_Release(p)            (p)->Release()
1891/*** IDirect3DDevice9 methods ***/
1892#define IDirect3DDevice9Ex_TestCooperativeLevel(p)                       (p)->TestCooperativeLevel()
1893#define IDirect3DDevice9Ex_GetAvailableTextureMem(p)                     (p)->GetAvailableTextureMem()
1894#define IDirect3DDevice9Ex_EvictManagedResources(p)                      (p)->EvictManagedResources()
1895#define IDirect3DDevice9Ex_GetDirect3D(p,a)                              (p)->GetDirect3D(a)
1896#define IDirect3DDevice9Ex_GetDeviceCaps(p,a)                            (p)->GetDeviceCaps(a)
1897#define IDirect3DDevice9Ex_GetDisplayMode(p,a,b)                         (p)->GetDisplayMode(a,b)
1898#define IDirect3DDevice9Ex_GetCreationParameters(p,a)                    (p)->GetCreationParameters(a)
1899#define IDirect3DDevice9Ex_SetCursorProperties(p,a,b,c)                  (p)->SetCursorProperties(a,b,c)
1900#define IDirect3DDevice9Ex_SetCursorPosition(p,a,b,c)                    (p)->SetCursorPosition(a,b,c)
1901#define IDirect3DDevice9Ex_ShowCursor(p,a)                               (p)->ShowCursor(a)
1902#define IDirect3DDevice9Ex_CreateAdditionalSwapChain(p,a,b)              (p)->CreateAdditionalSwapChain(a,b)
1903#define IDirect3DDevice9Ex_GetSwapChain(p,a,b)                           (p)->GetSwapChain(a,b)
1904#define IDirect3DDevice9Ex_GetNumberOfSwapChains(p)                      (p)->GetNumberOfSwapChains()
1905#define IDirect3DDevice9Ex_Reset(p,a)                                    (p)->Reset(a)
1906#define IDirect3DDevice9Ex_Present(p,a,b,c,d)                            (p)->Present(a,b,c,d)
1907#define IDirect3DDevice9Ex_GetBackBuffer(p,a,b,c,d)                      (p)->GetBackBuffer(a,b,c,d)
1908#define IDirect3DDevice9Ex_GetRasterStatus(p,a,b)                        (p)->GetRasterStatus(a,b)
1909#define IDirect3DDevice9Ex_SetDialogBoxMode(p,a)                         (p)->SetDialogBoxMode(a)
1910#define IDirect3DDevice9Ex_SetGammaRamp(p,a,b,c)                         (p)->SetGammaRamp(a,b,c)
1911#define IDirect3DDevice9Ex_GetGammaRamp(p,a,b)                           (p)->GetGammaRamp(a,b)
1912#define IDirect3DDevice9Ex_CreateTexture(p,a,b,c,d,e,f,g,h)              (p)->CreateTexture(a,b,c,d,e,f,g,h)
1913#define IDirect3DDevice9Ex_CreateVolumeTexture(p,a,b,c,d,e,f,g,h,i)      (p)->CreateVolumeTexture(a,b,c,d,e,f,g,h,i)
1914#define IDirect3DDevice9Ex_CreateCubeTexture(p,a,b,c,d,e,f,g)            (p)->CreateCubeTexture(a,b,c,d,e,f,g)
1915#define IDirect3DDevice9Ex_CreateVertexBuffer(p,a,b,c,d,e,f)             (p)->CreateVertexBuffer(a,b,c,d,e,f)
1916#define IDirect3DDevice9Ex_CreateIndexBuffer(p,a,b,c,d,e,f)              (p)->CreateIndexBuffer(a,b,c,d,e,f)
1917#define IDirect3DDevice9Ex_CreateRenderTarget(p,a,b,c,d,e,f,g,h)         (p)->CreateRenderTarget(a,b,c,d,e,f,g,h)
1918#define IDirect3DDevice9Ex_CreateDepthStencilSurface(p,a,b,c,d,e,f,g,h)  (p)->CreateDepthStencilSurface(a,b,c,d,e,f,g,h)
1919#define IDirect3DDevice9Ex_UpdateSurface(p,a,b,c,d)                      (p)->UpdateSurface(a,b,c,d)
1920#define IDirect3DDevice9Ex_UpdateTexture(p,a,b)                          (p)->UpdateTexture(a,b)
1921#define IDirect3DDevice9Ex_GetRenderTargetData(p,a,b)                    (p)->GetRenderTargetData(a,b)
1922#define IDirect3DDevice9Ex_GetFrontBufferData(p,a,b)                     (p)->GetFrontBufferData(a,b)
1923#define IDirect3DDevice9Ex_StretchRect(p,a,b,c,d,e)                      (p)->StretchRect(a,b,c,d,e)
1924#define IDirect3DDevice9Ex_ColorFill(p,a,b,c)                            (p)->ColorFill(a,b,c)
1925#define IDirect3DDevice9Ex_CreateOffscreenPlainSurface(p,a,b,c,d,e,f)    (p)->CreateOffscreenPlainSurface(a,b,c,d,e,f)
1926#define IDirect3DDevice9Ex_SetRenderTarget(p,a,b)                        (p)->SetRenderTarget(a,b)
1927#define IDirect3DDevice9Ex_GetRenderTarget(p,a,b)                        (p)->GetRenderTarget(a,b)
1928#define IDirect3DDevice9Ex_SetDepthStencilSurface(p,a)                   (p)->SetDepthStencilSurface(a)
1929#define IDirect3DDevice9Ex_GetDepthStencilSurface(p,a)                   (p)->GetDepthStencilSurface(a)
1930#define IDirect3DDevice9Ex_BeginScene(p)                                 (p)->BeginScene()
1931#define IDirect3DDevice9Ex_EndScene(p)                                   (p)->EndScene()
1932#define IDirect3DDevice9Ex_Clear(p,a,b,c,d,e,f)                          (p)->Clear(a,b,c,d,e,f)
1933#define IDirect3DDevice9Ex_SetTransform(p,a,b)                           (p)->SetTransform(a,b)
1934#define IDirect3DDevice9Ex_GetTransform(p,a,b)                           (p)->GetTransform(a,b)
1935#define IDirect3DDevice9Ex_MultiplyTransform(p,a,b)                      (p)->MultiplyTransform(a,b)
1936#define IDirect3DDevice9Ex_SetViewport(p,a)                              (p)->SetViewport(a)
1937#define IDirect3DDevice9Ex_GetViewport(p,a)                              (p)->GetViewport(a)
1938#define IDirect3DDevice9Ex_SetMaterial(p,a)                              (p)->SetMaterial(a)
1939#define IDirect3DDevice9Ex_GetMaterial(p,a)                              (p)->GetMaterial(a)
1940#define IDirect3DDevice9Ex_SetLight(p,a,b)                               (p)->SetLight(a,b)
1941#define IDirect3DDevice9Ex_GetLight(p,a,b)                               (p)->GetLight(a,b)
1942#define IDirect3DDevice9Ex_LightEnable(p,a,b)                            (p)->LightEnable(a,b)
1943#define IDirect3DDevice9Ex_GetLightEnable(p,a,b)                         (p)->GetLightEnable(a,b)
1944#define IDirect3DDevice9Ex_SetClipPlane(p,a,b)                           (p)->SetClipPlane(a,b)
1945#define IDirect3DDevice9Ex_GetClipPlane(p,a,b)                           (p)->GetClipPlane(a,b)
1946#define IDirect3DDevice9Ex_SetRenderState(p,a,b)                         (p)->SetRenderState(a,b)
1947#define IDirect3DDevice9Ex_GetRenderState(p,a,b)                         (p)->GetRenderState(a,b)
1948#define IDirect3DDevice9Ex_CreateStateBlock(p,a,b)                       (p)->CreateStateBlock(a,b)
1949#define IDirect3DDevice9Ex_BeginStateBlock(p)                            (p)->BeginStateBlock()
1950#define IDirect3DDevice9Ex_EndStateBlock(p,a)                            (p)->EndStateBlock(a)
1951#define IDirect3DDevice9Ex_SetClipStatus(p,a)                            (p)->SetClipStatus(a)
1952#define IDirect3DDevice9Ex_GetClipStatus(p,a)                            (p)->GetClipStatus(a)
1953#define IDirect3DDevice9Ex_GetTexture(p,a,b)                             (p)->GetTexture(a,b)
1954#define IDirect3DDevice9Ex_SetTexture(p,a,b)                             (p)->SetTexture(a,b)
1955#define IDirect3DDevice9Ex_GetTextureStageState(p,a,b,c)                 (p)->GetTextureStageState(a,b,c)
1956#define IDirect3DDevice9Ex_SetTextureStageState(p,a,b,c)                 (p)->SetTextureStageState(a,b,c)
1957#define IDirect3DDevice9Ex_GetSamplerState(p,a,b,c)                      (p)->GetSamplerState(a,b,c)
1958#define IDirect3DDevice9Ex_SetSamplerState(p,a,b,c)                      (p)->SetSamplerState(a,b,c)
1959#define IDirect3DDevice9Ex_ValidateDevice(p,a)                           (p)->ValidateDevice(a)
1960#define IDirect3DDevice9Ex_SetPaletteEntries(p,a,b)                      (p)->SetPaletteEntries(a,b)
1961#define IDirect3DDevice9Ex_GetPaletteEntries(p,a,b)                      (p)->GetPaletteEntries(a,b)
1962#define IDirect3DDevice9Ex_SetCurrentTexturePalette(p,a)                 (p)->SetCurrentTexturePalette(a)
1963#define IDirect3DDevice9Ex_GetCurrentTexturePalette(p,a)                 (p)->GetCurrentTexturePalette(a)
1964#define IDirect3DDevice9Ex_SetScissorRect(p,a)                           (p)->SetScissorRect(a)
1965#define IDirect3DDevice9Ex_GetScissorRect(p,a)                           (p)->GetScissorRect(a)
1966#define IDirect3DDevice9Ex_SetSoftwareVertexProcessing(p,a)              (p)->SetSoftwareVertexProcessing(a)
1967#define IDirect3DDevice9Ex_GetSoftwareVertexProcessing(p)                (p)->GetSoftwareVertexProcessing()
1968#define IDirect3DDevice9Ex_SetNPatchMode(p,a)                            (p)->SetNPatchMode(a)
1969#define IDirect3DDevice9Ex_GetNPatchMode(p)                              (p)->GetNPatchMode()
1970#define IDirect3DDevice9Ex_DrawPrimitive(p,a,b,c)                        (p)->DrawPrimitive(a,b,c)
1971#define IDirect3DDevice9Ex_DrawIndexedPrimitive(p,a,b,c,d,e,f)           (p)->DrawIndexedPrimitive(a,b,c,d,e,f)
1972#define IDirect3DDevice9Ex_DrawPrimitiveUP(p,a,b,c,d)                    (p)->DrawPrimitiveUP(a,b,c,d)
1973#define IDirect3DDevice9Ex_DrawIndexedPrimitiveUP(p,a,b,c,d,e,f,g,h)     (p)->DrawIndexedPrimitiveUP(a,b,c,d,e,f,g,h)
1974#define IDirect3DDevice9Ex_ProcessVertices(p,a,b,c,d,e,f)                (p)->ProcessVertices(a,b,c,d,e,f)
1975#define IDirect3DDevice9Ex_CreateVertexDeclaration(p,a,b)                (p)->CreateVertexDeclaration(a,b)
1976#define IDirect3DDevice9Ex_SetVertexDeclaration(p,a)                     (p)->SetVertexDeclaration(a)
1977#define IDirect3DDevice9Ex_GetVertexDeclaration(p,a)                     (p)->GetVertexDeclaration(a)
1978#define IDirect3DDevice9Ex_SetFVF(p,a)                                   (p)->SetFVF(a)
1979#define IDirect3DDevice9Ex_GetFVF(p,a)                                   (p)->GetFVF(a)
1980#define IDirect3DDevice9Ex_CreateVertexShader(p,a,b)                     (p)->CreateVertexShader(a,b)
1981#define IDirect3DDevice9Ex_SetVertexShader(p,a)                          (p)->SetVertexShader(a)
1982#define IDirect3DDevice9Ex_GetVertexShader(p,a)                          (p)->GetVertexShader(a)
1983#define IDirect3DDevice9Ex_SetVertexShaderConstantF(p,a,b,c)             (p)->SetVertexShaderConstantF(a,b,c)
1984#define IDirect3DDevice9Ex_GetVertexShaderConstantF(p,a,b,c)             (p)->GetVertexShaderConstantF(a,b,c)
1985#define IDirect3DDevice9Ex_SetVertexShaderConstantI(p,a,b,c)             (p)->SetVertexShaderConstantI(a,b,c)
1986#define IDirect3DDevice9Ex_GetVertexShaderConstantI(p,a,b,c)             (p)->GetVertexShaderConstantI(a,b,c)
1987#define IDirect3DDevice9Ex_SetVertexShaderConstantB(p,a,b,c)             (p)->SetVertexShaderConstantB(a,b,c)
1988#define IDirect3DDevice9Ex_GetVertexShaderConstantB(p,a,b,c)             (p)->GetVertexShaderConstantB(a,b,c)
1989#define IDirect3DDevice9Ex_SetStreamSource(p,a,b,c,d)                    (p)->SetStreamSource(a,b,c,d)
1990#define IDirect3DDevice9Ex_GetStreamSource(p,a,b,c,d)                    (p)->GetStreamSource(a,b,c,d)
1991#define IDirect3DDevice9Ex_SetStreamSourceFreq(p,a,b)                    (p)->SetStreamSourceFreq(a,b)
1992#define IDirect3DDevice9Ex_GetStreamSourceFreq(p,a,b)                    (p)->GetStreamSourceFreq(a,b)
1993#define IDirect3DDevice9Ex_SetIndices(p,a)                               (p)->SetIndices(a)
1994#define IDirect3DDevice9Ex_GetIndices(p,a)                               (p)->GetIndices(a)
1995#define IDirect3DDevice9Ex_CreatePixelShader(p,a,b)                      (p)->CreatePixelShader(a,b)
1996#define IDirect3DDevice9Ex_SetPixelShader(p,a)                           (p)->SetPixelShader(a)
1997#define IDirect3DDevice9Ex_GetPixelShader(p,a)                           (p)->GetPixelShader(a)
1998#define IDirect3DDevice9Ex_SetPixelShaderConstantF(p,a,b,c)              (p)->SetPixelShaderConstantF(a,b,c)
1999#define IDirect3DDevice9Ex_GetPixelShaderConstantF(p,a,b,c)              (p)->GetPixelShaderConstantF(a,b,c)
2000#define IDirect3DDevice9Ex_SetPixelShaderConstantI(p,a,b,c)              (p)->SetPixelShaderConstantI(a,b,c)
2001#define IDirect3DDevice9Ex_GetPixelShaderConstantI(p,a,b,c)              (p)->GetPixelShaderConstantI(a,b,c)
2002#define IDirect3DDevice9Ex_SetPixelShaderConstantB(p,a,b,c)              (p)->SetPixelShaderConstantB(a,b,c)
2003#define IDirect3DDevice9Ex_GetPixelShaderConstantB(p,a,b,c)              (p)->GetPixelShaderConstantB(a,b,c)
2004#define IDirect3DDevice9Ex_DrawRectPatch(p,a,b,c)                        (p)->DrawRectPatch(a,b,c)
2005#define IDirect3DDevice9Ex_DrawTriPatch(p,a,b,c)                         (p)->DrawTriPatch(a,b,c)
2006#define IDirect3DDevice9Ex_DeletePatch(p,a)                              (p)->DeletePatch(a)
2007#define IDirect3DDevice9Ex_CreateQuery(p,a,b)                            (p)->CreateQuery(a,b)
2008/* IDirect3DDevice9Ex */
2009#define IDirect3DDevice9Ex_SetConvolutionMonoKernel(p,a,b,c,d)           (p)->SetConvolutionMonoKernel(a,b,c,d)
2010#define IDirect3DDevice9Ex_ComposeRects(p,a,b,c,d,e,f,g,h)               (p)->ComposeRects(a,b,c,d,e,f,g,h)
2011#define IDirect3DDevice9Ex_PresentEx(p,a,b,c,d,e)                        (p)->PresentEx(a,b,c,d,e)
2012#define IDirect3DDevice9Ex_GetGPUThreadPriority(p,a)                     (p)->GetGPUThreadPriority(a)
2013#define IDirect3DDevice9Ex_SetGPUThreadPriority(p,a)                     (p)->SetGPUThreadPriority(a)
2014#define IDirect3DDevice9Ex_WaitForVBlank(p,a)                            (p)->WaitForVBlank(a)
2015#define IDirect3DDevice9Ex_CheckResourceResidency(p,a,b)                 (p)->CheckResourceResidency(a,b)
2016#define IDirect3DDevice9Ex_SetMaximumFrameLatency(p,a)                   (p)->SetMaximumFrameLatency(a)
2017#define IDirect3DDevice9Ex_GetMaximumFrameLatency(p,a)                   (p)->GetMaximumFrameLatency(a)
2018#define IDirect3DDevice9Ex_CheckDeviceState(p,a)                         (p)->CheckDeviceState(a)
2019#define IDirect3DDevice9Ex_CreateRenderTargetEx(p,a,b,c,d,e,f,g,h,i)     (p)->CreateRenderTargetEx(a,b,c,d,e,f,g,h,i)
2020#define IDirect3DDevice9Ex_CreateOffscreenPlainSurfaceEx(p,a,b,c,d,e,f,g)(p)->CreateOffscreenPlainSurfaceEx(a,b,c,d,e,f,g)
2021#define IDirect3DDevice9Ex_CreateDepthStencilSurfaceEx(p,a,b,c,d,e,f,g,h,i)(p)->CreateDepthStencilSurfaceEx(a,b,c,d,e,f,g,h,i)
2022#define IDirect3DDevice9Ex_ResetEx(p,a,b)                                (p)->ResetEx(a,b)
2023#define IDirect3DDevice9Ex_GetDisplayModeEx(p,a,b,c)                     (p)->GetDisplayModeEx(a,b,c)
2024#endif
2025
2026#ifdef __cplusplus
2027extern "C" {
2028#endif  /* defined(__cplusplus) */
2029
2030int         WINAPI D3DPERF_BeginEvent(D3DCOLOR,LPCWSTR);
2031int         WINAPI D3DPERF_EndEvent(void);
2032DWORD       WINAPI D3DPERF_GetStatus(void);
2033WINBOOL     WINAPI D3DPERF_QueryRepeatFrame(void);
2034void        WINAPI D3DPERF_SetMarker(D3DCOLOR,LPCWSTR);
2035void        WINAPI D3DPERF_SetOptions(DWORD);
2036void        WINAPI D3DPERF_SetRegion(D3DCOLOR,LPCWSTR);
2037
2038/* Define the main entrypoint as well */
2039IDirect3D9* WINAPI Direct3DCreate9(UINT SDKVersion);
2040
2041#ifdef __cplusplus
2042} /* extern "C" */
2043#endif /* defined(__cplusplus) */
2044
2045
2046#endif /* __WINE_D3D9_H */
2047