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