/*** Autogenerated by WIDL 1.1.43 from ../../include/wine/wined3d.idl - Do not edit ***/

#include <rpc.h>
#include <rpcndr.h>

#ifndef __WIDL_WINED3D_H
#define __WIDL_WINED3D_H

#ifdef VBOX_WITH_WDDM
#include "../../../vbox/VBoxWineEx.h"
#endif

# undef DECLSPEC_HIDDEN
# define DECLSPEC_HIDDEN

#ifdef __cplusplus
extern "C" {
#endif

/* Headers for imported files */

#include <unknwn.h>

/* Forward declarations */

#ifndef __IWineD3DDeviceParent_FWD_DEFINED__
#define __IWineD3DDeviceParent_FWD_DEFINED__
typedef interface IWineD3DDeviceParent IWineD3DDeviceParent;
#endif

#ifndef __IWineD3DBase_FWD_DEFINED__
#define __IWineD3DBase_FWD_DEFINED__
typedef interface IWineD3DBase IWineD3DBase;
#endif

#ifndef __IWineD3D_FWD_DEFINED__
#define __IWineD3D_FWD_DEFINED__
typedef interface IWineD3D IWineD3D;
#endif

#ifndef __IWineD3DResource_FWD_DEFINED__
#define __IWineD3DResource_FWD_DEFINED__
typedef interface IWineD3DResource IWineD3DResource;
#endif

#ifndef __IWineD3DRendertargetView_FWD_DEFINED__
#define __IWineD3DRendertargetView_FWD_DEFINED__
typedef interface IWineD3DRendertargetView IWineD3DRendertargetView;
#endif

#ifndef __IWineD3DPalette_FWD_DEFINED__
#define __IWineD3DPalette_FWD_DEFINED__
typedef interface IWineD3DPalette IWineD3DPalette;
#endif

#ifndef __IWineD3DClipper_FWD_DEFINED__
#define __IWineD3DClipper_FWD_DEFINED__
typedef interface IWineD3DClipper IWineD3DClipper;
#endif

#ifndef __IWineD3DSurface_FWD_DEFINED__
#define __IWineD3DSurface_FWD_DEFINED__
typedef interface IWineD3DSurface IWineD3DSurface;
#endif

#ifndef __IWineD3DVolume_FWD_DEFINED__
#define __IWineD3DVolume_FWD_DEFINED__
typedef interface IWineD3DVolume IWineD3DVolume;
#endif

#ifndef __IWineD3DBaseTexture_FWD_DEFINED__
#define __IWineD3DBaseTexture_FWD_DEFINED__
typedef interface IWineD3DBaseTexture IWineD3DBaseTexture;
#endif

#ifndef __IWineD3DTexture_FWD_DEFINED__
#define __IWineD3DTexture_FWD_DEFINED__
typedef interface IWineD3DTexture IWineD3DTexture;
#endif

#ifndef __IWineD3DCubeTexture_FWD_DEFINED__
#define __IWineD3DCubeTexture_FWD_DEFINED__
typedef interface IWineD3DCubeTexture IWineD3DCubeTexture;
#endif

#ifndef __IWineD3DVolumeTexture_FWD_DEFINED__
#define __IWineD3DVolumeTexture_FWD_DEFINED__
typedef interface IWineD3DVolumeTexture IWineD3DVolumeTexture;
#endif

#ifndef __IWineD3DVertexDeclaration_FWD_DEFINED__
#define __IWineD3DVertexDeclaration_FWD_DEFINED__
typedef interface IWineD3DVertexDeclaration IWineD3DVertexDeclaration;
#endif

#ifndef __IWineD3DStateBlock_FWD_DEFINED__
#define __IWineD3DStateBlock_FWD_DEFINED__
typedef interface IWineD3DStateBlock IWineD3DStateBlock;
#endif

#ifndef __IWineD3DQuery_FWD_DEFINED__
#define __IWineD3DQuery_FWD_DEFINED__
typedef interface IWineD3DQuery IWineD3DQuery;
#endif

#ifndef __IWineD3DSwapChain_FWD_DEFINED__
#define __IWineD3DSwapChain_FWD_DEFINED__
typedef interface IWineD3DSwapChain IWineD3DSwapChain;
#endif

#ifndef __IWineD3DBuffer_FWD_DEFINED__
#define __IWineD3DBuffer_FWD_DEFINED__
typedef interface IWineD3DBuffer IWineD3DBuffer;
#endif

#ifndef __IWineD3DBaseShader_FWD_DEFINED__
#define __IWineD3DBaseShader_FWD_DEFINED__
typedef interface IWineD3DBaseShader IWineD3DBaseShader;
#endif

#ifndef __IWineD3DVertexShader_FWD_DEFINED__
#define __IWineD3DVertexShader_FWD_DEFINED__
typedef interface IWineD3DVertexShader IWineD3DVertexShader;
#endif

#ifndef __IWineD3DGeometryShader_FWD_DEFINED__
#define __IWineD3DGeometryShader_FWD_DEFINED__
typedef interface IWineD3DGeometryShader IWineD3DGeometryShader;
#endif

#ifndef __IWineD3DPixelShader_FWD_DEFINED__
#define __IWineD3DPixelShader_FWD_DEFINED__
typedef interface IWineD3DPixelShader IWineD3DPixelShader;
#endif

#ifndef __IWineD3DDevice_FWD_DEFINED__
#define __IWineD3DDevice_FWD_DEFINED__
typedef interface IWineD3DDevice IWineD3DDevice;
#endif


#if 0
typedef HANDLE HMONITOR;
typedef struct _RGNDATAHEADER {
    DWORD dwSize;
    DWORD iType;
    DWORD nCount;
    DWORD nRgnSize;
    RECT rcBound;
} RGNDATAHEADER;
typedef struct _RGNDATA {
    RGNDATAHEADER rdh;
    char Buffer[1];
} RGNDATA;
typedef struct _LUID {
    DWORD LowPart;
    LONG HighPart;
} LUID;
typedef struct _LUID *PLUID;
#endif
#define WINED3D_OK                                  S_OK
#define _FACWINED3D (0x876)

#define MAKE_WINED3DSTATUS(code)                    MAKE_HRESULT(0, _FACWINED3D, code)
#define WINED3DOK_NOAUTOGEN                         MAKE_WINED3DSTATUS(2159)
#define MAKE_WINED3DHRESULT(code)                   MAKE_HRESULT(1, _FACWINED3D, code)
#define WINED3DERR_WRONGTEXTUREFORMAT               MAKE_WINED3DHRESULT(2072)
#define WINED3DERR_UNSUPPORTEDCOLOROPERATION        MAKE_WINED3DHRESULT(2073)
#define WINED3DERR_UNSUPPORTEDCOLORARG              MAKE_WINED3DHRESULT(2074)
#define WINED3DERR_UNSUPPORTEDALPHAOPERATION        MAKE_WINED3DHRESULT(2075)
#define WINED3DERR_UNSUPPORTEDALPHAARG              MAKE_WINED3DHRESULT(2076)
#define WINED3DERR_TOOMANYOPERATIONS                MAKE_WINED3DHRESULT(2077)
#define WINED3DERR_CONFLICTINGTEXTUREFILTER         MAKE_WINED3DHRESULT(2078)
#define WINED3DERR_UNSUPPORTEDFACTORVALUE           MAKE_WINED3DHRESULT(2079)
#define WINED3DERR_CONFLICTINGRENDERSTATE           MAKE_WINED3DHRESULT(2081)
#define WINED3DERR_UNSUPPORTEDTEXTUREFILTER         MAKE_WINED3DHRESULT(2082)
#define WINED3DERR_CONFLICTINGTEXTUREPALETTE        MAKE_WINED3DHRESULT(2086)
#define WINED3DERR_DRIVERINTERNALERROR              MAKE_WINED3DHRESULT(2087)
#define WINED3DERR_NOTFOUND                         MAKE_WINED3DHRESULT(2150)
#define WINED3DERR_MOREDATA                         MAKE_WINED3DHRESULT(2151)
#define WINED3DERR_DEVICELOST                       MAKE_WINED3DHRESULT(2152)
#define WINED3DERR_DEVICENOTRESET                   MAKE_WINED3DHRESULT(2153)
#define WINED3DERR_NOTAVAILABLE                     MAKE_WINED3DHRESULT(2154)
#define WINED3DERR_OUTOFVIDEOMEMORY                 MAKE_WINED3DHRESULT(380)
#define WINED3DERR_INVALIDDEVICE                    MAKE_WINED3DHRESULT(2155)
#define WINED3DERR_INVALIDCALL                      MAKE_WINED3DHRESULT(2156)
#define WINED3DERR_DRIVERINVALIDCALL                MAKE_WINED3DHRESULT(2157)
#define WINED3DERR_WASSTILLDRAWING                  MAKE_WINED3DHRESULT(540)
#define WINEDDERR_NOTAOVERLAYSURFACE                MAKE_WINED3DHRESULT(580)
#define WINEDDERR_NOTLOCKED                         MAKE_WINED3DHRESULT(584)
#define WINEDDERR_NODC                              MAKE_WINED3DHRESULT(586)
#define WINEDDERR_DCALREADYCREATED                  MAKE_WINED3DHRESULT(620)
#define WINEDDERR_NOTFLIPPABLE                      MAKE_WINED3DHRESULT(582)
#define WINEDDERR_SURFACEBUSY                       MAKE_WINED3DHRESULT(430)
#define WINEDDERR_INVALIDRECT                       MAKE_WINED3DHRESULT(150)
#define WINEDDERR_NOCLIPLIST                        MAKE_WINED3DHRESULT(205)
#define WINEDDERR_OVERLAYNOTVISIBLE                 MAKE_WINED3DHRESULT(577)
typedef DWORD WINED3DCOLOR;
typedef enum _WINED3DLIGHTTYPE {
    WINED3DLIGHT_POINT = 1,
    WINED3DLIGHT_SPOT = 2,
    WINED3DLIGHT_DIRECTIONAL = 3,
    WINED3DLIGHT_PARALLELPOINT = 4,
    WINED3DLIGHT_GLSPOT = 5,
    WINED3DLIGHT_FORCE_DWORD = 0x7fffffff
} WINED3DLIGHTTYPE;
typedef enum _WINED3DPRIMITIVETYPE {
    WINED3DPT_UNDEFINED = 0,
    WINED3DPT_POINTLIST = 1,
    WINED3DPT_LINELIST = 2,
    WINED3DPT_LINESTRIP = 3,
    WINED3DPT_TRIANGLELIST = 4,
    WINED3DPT_TRIANGLESTRIP = 5,
    WINED3DPT_TRIANGLEFAN = 6,
    WINED3DPT_LINELIST_ADJ = 10,
    WINED3DPT_LINESTRIP_ADJ = 11,
    WINED3DPT_TRIANGLELIST_ADJ = 12,
    WINED3DPT_TRIANGLESTRIP_ADJ = 13,
    WINED3DPT_FORCE_DWORD = 0x7fffffff
} WINED3DPRIMITIVETYPE;
typedef enum _WINED3DDEVTYPE {
    WINED3DDEVTYPE_HAL = 1,
    WINED3DDEVTYPE_REF = 2,
    WINED3DDEVTYPE_SW = 3,
    WINED3DDEVTYPE_NULLREF = 4,
    WINED3DDEVTYPE_FORCE_DWORD = 0xffffffff
} WINED3DDEVTYPE;
typedef enum _WINED3DDEGREETYPE {
    WINED3DDEGREE_LINEAR = 1,
    WINED3DDEGREE_QUADRATIC = 2,
    WINED3DDEGREE_CUBIC = 3,
    WINED3DDEGREE_QUINTIC = 5,
    WINED3DDEGREE_FORCE_DWORD = 0x7fffffff
} WINED3DDEGREETYPE;
typedef enum _WINED3DFORMAT {
    WINED3DFMT_UNKNOWN = 0,
    WINED3DFMT_B8G8R8_UNORM = 1,
    WINED3DFMT_B5G5R5X1_UNORM = 2,
    WINED3DFMT_B4G4R4A4_UNORM = 3,
    WINED3DFMT_B2G3R3_UNORM = 4,
    WINED3DFMT_B2G3R3A8_UNORM = 5,
    WINED3DFMT_B4G4R4X4_UNORM = 6,
    WINED3DFMT_R8G8B8X8_UNORM = 7,
    WINED3DFMT_B10G10R10A2_UNORM = 8,
    WINED3DFMT_P8_UINT_A8_UNORM = 9,
    WINED3DFMT_P8_UINT = 10,
    WINED3DFMT_L8_UNORM = 11,
    WINED3DFMT_L8A8_UNORM = 12,
    WINED3DFMT_L4A4_UNORM = 13,
    WINED3DFMT_R5G5_SNORM_L6_UNORM = 14,
    WINED3DFMT_R8G8_SNORM_L8X8_UNORM = 15,
    WINED3DFMT_R10G11B11_SNORM = 16,
    WINED3DFMT_R10G10B10_SNORM_A2_UNORM = 17,
    WINED3DFMT_D16_LOCKABLE = 18,
    WINED3DFMT_D32_UNORM = 19,
    WINED3DFMT_S1_UINT_D15_UNORM = 20,
    WINED3DFMT_X8D24_UNORM = 21,
    WINED3DFMT_S4X4_UINT_D24_UNORM = 22,
    WINED3DFMT_L16_UNORM = 23,
    WINED3DFMT_S8_UINT_D24_FLOAT = 24,
    WINED3DFMT_VERTEXDATA = 25,
    WINED3DFMT_R8G8_SNORM_Cx = 26,
    WINED3DFMT_R32G32B32A32_TYPELESS = 27,
    WINED3DFMT_R32G32B32A32_FLOAT = 28,
    WINED3DFMT_R32G32B32A32_UINT = 29,
    WINED3DFMT_R32G32B32A32_SINT = 30,
    WINED3DFMT_R32G32B32_TYPELESS = 31,
    WINED3DFMT_R32G32B32_FLOAT = 32,
    WINED3DFMT_R32G32B32_UINT = 33,
    WINED3DFMT_R32G32B32_SINT = 34,
    WINED3DFMT_R16G16B16A16_TYPELESS = 35,
    WINED3DFMT_R16G16B16A16_FLOAT = 36,
    WINED3DFMT_R16G16B16A16_UNORM = 37,
    WINED3DFMT_R16G16B16A16_UINT = 38,
    WINED3DFMT_R16G16B16A16_SNORM = 39,
    WINED3DFMT_R16G16B16A16_SINT = 40,
    WINED3DFMT_R32G32_TYPELESS = 41,
    WINED3DFMT_R32G32_FLOAT = 42,
    WINED3DFMT_R32G32_UINT = 43,
    WINED3DFMT_R32G32_SINT = 44,
    WINED3DFMT_R32G8X24_TYPELESS = 45,
    WINED3DFMT_D32_FLOAT_S8X24_UINT = 46,
    WINED3DFMT_R32_FLOAT_X8X24_TYPELESS = 47,
    WINED3DFMT_X32_TYPELESS_G8X24_UINT = 48,
    WINED3DFMT_R10G10B10A2_TYPELESS = 49,
    WINED3DFMT_R10G10B10A2_UNORM = 50,
    WINED3DFMT_R10G10B10A2_UINT = 51,
    WINED3DFMT_R10G10B10A2_SNORM = 52,
    WINED3DFMT_R11G11B10_FLOAT = 53,
    WINED3DFMT_R8G8B8A8_TYPELESS = 54,
    WINED3DFMT_R8G8B8A8_UNORM = 55,
    WINED3DFMT_R8G8B8A8_UNORM_SRGB = 56,
    WINED3DFMT_R8G8B8A8_UINT = 57,
    WINED3DFMT_R8G8B8A8_SNORM = 58,
    WINED3DFMT_R8G8B8A8_SINT = 59,
    WINED3DFMT_R16G16_TYPELESS = 60,
    WINED3DFMT_R16G16_FLOAT = 61,
    WINED3DFMT_R16G16_UNORM = 62,
    WINED3DFMT_R16G16_UINT = 63,
    WINED3DFMT_R16G16_SNORM = 64,
    WINED3DFMT_R16G16_SINT = 65,
    WINED3DFMT_R32_TYPELESS = 66,
    WINED3DFMT_D32_FLOAT = 67,
    WINED3DFMT_R32_FLOAT = 68,
    WINED3DFMT_R32_UINT = 69,
    WINED3DFMT_R32_SINT = 70,
    WINED3DFMT_R24G8_TYPELESS = 71,
    WINED3DFMT_D24_UNORM_S8_UINT = 72,
    WINED3DFMT_R24_UNORM_X8_TYPELESS = 73,
    WINED3DFMT_X24_TYPELESS_G8_UINT = 74,
    WINED3DFMT_R8G8_TYPELESS = 75,
    WINED3DFMT_R8G8_UNORM = 76,
    WINED3DFMT_R8G8_UINT = 77,
    WINED3DFMT_R8G8_SNORM = 78,
    WINED3DFMT_R8G8_SINT = 79,
    WINED3DFMT_R16_TYPELESS = 80,
    WINED3DFMT_R16_FLOAT = 81,
    WINED3DFMT_D16_UNORM = 82,
    WINED3DFMT_R16_UNORM = 83,
    WINED3DFMT_R16_UINT = 84,
    WINED3DFMT_R16_SNORM = 85,
    WINED3DFMT_R16_SINT = 86,
    WINED3DFMT_R8_TYPELESS = 87,
    WINED3DFMT_R8_UNORM = 88,
    WINED3DFMT_R8_UINT = 89,
    WINED3DFMT_R8_SNORM = 90,
    WINED3DFMT_R8_SINT = 91,
    WINED3DFMT_A8_UNORM = 92,
    WINED3DFMT_R1_UNORM = 93,
    WINED3DFMT_R9G9B9E5_SHAREDEXP = 94,
    WINED3DFMT_R8G8_B8G8_UNORM = 95,
    WINED3DFMT_G8R8_G8B8_UNORM = 96,
    WINED3DFMT_BC1_TYPELESS = 97,
    WINED3DFMT_BC1_UNORM = 98,
    WINED3DFMT_BC1_UNORM_SRGB = 99,
    WINED3DFMT_BC2_TYPELESS = 100,
    WINED3DFMT_BC2_UNORM = 101,
    WINED3DFMT_BC2_UNORM_SRGB = 102,
    WINED3DFMT_BC3_TYPELESS = 103,
    WINED3DFMT_BC3_UNORM = 104,
    WINED3DFMT_BC3_UNORM_SRGB = 105,
    WINED3DFMT_BC4_TYPELESS = 106,
    WINED3DFMT_BC4_UNORM = 107,
    WINED3DFMT_BC4_SNORM = 108,
    WINED3DFMT_BC5_TYPELESS = 109,
    WINED3DFMT_BC5_UNORM = 110,
    WINED3DFMT_BC5_SNORM = 111,
    WINED3DFMT_B5G6R5_UNORM = 112,
    WINED3DFMT_B5G5R5A1_UNORM = 113,
    WINED3DFMT_B8G8R8A8_UNORM = 114,
    WINED3DFMT_B8G8R8X8_UNORM = 115,
    WINED3DFMT_UYVY = (((ULONG)(unsigned char)'U' | ((ULONG)(unsigned char)'Y' << 8)) | ((ULONG)(unsigned char)'V' << 16)) | ((ULONG)(unsigned char)'Y' << 24),
    WINED3DFMT_YUY2 = (((ULONG)(unsigned char)'Y' | ((ULONG)(unsigned char)'U' << 8)) | ((ULONG)(unsigned char)'Y' << 16)) | ((ULONG)(unsigned char)'2' << 24),
    WINED3DFMT_YV12 = (((ULONG)(unsigned char)'Y' | ((ULONG)(unsigned char)'V' << 8)) | ((ULONG)(unsigned char)'1' << 16)) | ((ULONG)(unsigned char)'2' << 24),
    WINED3DFMT_DXT1 = (((ULONG)(unsigned char)'D' | ((ULONG)(unsigned char)'X' << 8)) | ((ULONG)(unsigned char)'T' << 16)) | ((ULONG)(unsigned char)'1' << 24),
    WINED3DFMT_DXT2 = (((ULONG)(unsigned char)'D' | ((ULONG)(unsigned char)'X' << 8)) | ((ULONG)(unsigned char)'T' << 16)) | ((ULONG)(unsigned char)'2' << 24),
    WINED3DFMT_DXT3 = (((ULONG)(unsigned char)'D' | ((ULONG)(unsigned char)'X' << 8)) | ((ULONG)(unsigned char)'T' << 16)) | ((ULONG)(unsigned char)'3' << 24),
    WINED3DFMT_DXT4 = (((ULONG)(unsigned char)'D' | ((ULONG)(unsigned char)'X' << 8)) | ((ULONG)(unsigned char)'T' << 16)) | ((ULONG)(unsigned char)'4' << 24),
    WINED3DFMT_DXT5 = (((ULONG)(unsigned char)'D' | ((ULONG)(unsigned char)'X' << 8)) | ((ULONG)(unsigned char)'T' << 16)) | ((ULONG)(unsigned char)'5' << 24),
    WINED3DFMT_MULTI2_ARGB8 = (((ULONG)(unsigned char)'M' | ((ULONG)(unsigned char)'E' << 8)) | ((ULONG)(unsigned char)'T' << 16)) | ((ULONG)(unsigned char)'1' << 24),
    WINED3DFMT_G8R8_G8B8 = (((ULONG)(unsigned char)'G' | ((ULONG)(unsigned char)'R' << 8)) | ((ULONG)(unsigned char)'G' << 16)) | ((ULONG)(unsigned char)'B' << 24),
    WINED3DFMT_R8G8_B8G8 = (((ULONG)(unsigned char)'R' | ((ULONG)(unsigned char)'G' << 8)) | ((ULONG)(unsigned char)'B' << 16)) | ((ULONG)(unsigned char)'G' << 24),
    WINED3DFMT_ATI2N = (((ULONG)(unsigned char)'A' | ((ULONG)(unsigned char)'T' << 8)) | ((ULONG)(unsigned char)'I' << 16)) | ((ULONG)(unsigned char)'2' << 24),
    WINED3DFMT_INST = (((ULONG)(unsigned char)'I' | ((ULONG)(unsigned char)'N' << 8)) | ((ULONG)(unsigned char)'S' << 16)) | ((ULONG)(unsigned char)'T' << 24),
    WINED3DFMT_NVHU = (((ULONG)(unsigned char)'N' | ((ULONG)(unsigned char)'V' << 8)) | ((ULONG)(unsigned char)'H' << 16)) | ((ULONG)(unsigned char)'U' << 24),
    WINED3DFMT_NVHS = (((ULONG)(unsigned char)'N' | ((ULONG)(unsigned char)'V' << 8)) | ((ULONG)(unsigned char)'H' << 16)) | ((ULONG)(unsigned char)'S' << 24),
    WINED3DFMT_FORCE_DWORD = 0xffffffff
} WINED3DFORMAT;
typedef enum _WINED3DRENDERSTATETYPE {
    WINED3DRS_ANTIALIAS = 2,
    WINED3DRS_TEXTUREPERSPECTIVE = 4,
    WINED3DRS_WRAPU = 5,
    WINED3DRS_WRAPV = 6,
    WINED3DRS_ZENABLE = 7,
    WINED3DRS_FILLMODE = 8,
    WINED3DRS_SHADEMODE = 9,
    WINED3DRS_LINEPATTERN = 10,
    WINED3DRS_MONOENABLE = 11,
    WINED3DRS_ROP2 = 12,
    WINED3DRS_PLANEMASK = 13,
    WINED3DRS_ZWRITEENABLE = 14,
    WINED3DRS_ALPHATESTENABLE = 15,
    WINED3DRS_LASTPIXEL = 16,
    WINED3DRS_SRCBLEND = 19,
    WINED3DRS_DESTBLEND = 20,
    WINED3DRS_CULLMODE = 22,
    WINED3DRS_ZFUNC = 23,
    WINED3DRS_ALPHAREF = 24,
    WINED3DRS_ALPHAFUNC = 25,
    WINED3DRS_DITHERENABLE = 26,
    WINED3DRS_ALPHABLENDENABLE = 27,
    WINED3DRS_FOGENABLE = 28,
    WINED3DRS_SPECULARENABLE = 29,
    WINED3DRS_ZVISIBLE = 30,
    WINED3DRS_SUBPIXEL = 31,
    WINED3DRS_SUBPIXELX = 32,
    WINED3DRS_STIPPLEDALPHA = 33,
    WINED3DRS_FOGCOLOR = 34,
    WINED3DRS_FOGTABLEMODE = 35,
    WINED3DRS_FOGSTART = 36,
    WINED3DRS_FOGEND = 37,
    WINED3DRS_FOGDENSITY = 38,
    WINED3DRS_STIPPLEENABLE = 39,
    WINED3DRS_EDGEANTIALIAS = 40,
    WINED3DRS_COLORKEYENABLE = 41,
    WINED3DRS_MIPMAPLODBIAS = 46,
    WINED3DRS_ZBIAS = 47,
    WINED3DRS_RANGEFOGENABLE = 48,
    WINED3DRS_ANISOTROPY = 49,
    WINED3DRS_FLUSHBATCH = 50,
    WINED3DRS_TRANSLUCENTSORTINDEPENDENT = 51,
    WINED3DRS_STENCILENABLE = 52,
    WINED3DRS_STENCILFAIL = 53,
    WINED3DRS_STENCILZFAIL = 54,
    WINED3DRS_STENCILPASS = 55,
    WINED3DRS_STENCILFUNC = 56,
    WINED3DRS_STENCILREF = 57,
    WINED3DRS_STENCILMASK = 58,
    WINED3DRS_STENCILWRITEMASK = 59,
    WINED3DRS_TEXTUREFACTOR = 60,
    WINED3DRS_WRAP0 = 128,
    WINED3DRS_WRAP1 = 129,
    WINED3DRS_WRAP2 = 130,
    WINED3DRS_WRAP3 = 131,
    WINED3DRS_WRAP4 = 132,
    WINED3DRS_WRAP5 = 133,
    WINED3DRS_WRAP6 = 134,
    WINED3DRS_WRAP7 = 135,
    WINED3DRS_CLIPPING = 136,
    WINED3DRS_LIGHTING = 137,
    WINED3DRS_EXTENTS = 138,
    WINED3DRS_AMBIENT = 139,
    WINED3DRS_FOGVERTEXMODE = 140,
    WINED3DRS_COLORVERTEX = 141,
    WINED3DRS_LOCALVIEWER = 142,
    WINED3DRS_NORMALIZENORMALS = 143,
    WINED3DRS_COLORKEYBLENDENABLE = 144,
    WINED3DRS_DIFFUSEMATERIALSOURCE = 145,
    WINED3DRS_SPECULARMATERIALSOURCE = 146,
    WINED3DRS_AMBIENTMATERIALSOURCE = 147,
    WINED3DRS_EMISSIVEMATERIALSOURCE = 148,
    WINED3DRS_VERTEXBLEND = 151,
    WINED3DRS_CLIPPLANEENABLE = 152,
    WINED3DRS_SOFTWAREVERTEXPROCESSING = 153,
    WINED3DRS_POINTSIZE = 154,
    WINED3DRS_POINTSIZE_MIN = 155,
    WINED3DRS_POINTSPRITEENABLE = 156,
    WINED3DRS_POINTSCALEENABLE = 157,
    WINED3DRS_POINTSCALE_A = 158,
    WINED3DRS_POINTSCALE_B = 159,
    WINED3DRS_POINTSCALE_C = 160,
    WINED3DRS_MULTISAMPLEANTIALIAS = 161,
    WINED3DRS_MULTISAMPLEMASK = 162,
    WINED3DRS_PATCHEDGESTYLE = 163,
    WINED3DRS_PATCHSEGMENTS = 164,
    WINED3DRS_DEBUGMONITORTOKEN = 165,
    WINED3DRS_POINTSIZE_MAX = 166,
    WINED3DRS_INDEXEDVERTEXBLENDENABLE = 167,
    WINED3DRS_COLORWRITEENABLE = 168,
    WINED3DRS_TWEENFACTOR = 170,
    WINED3DRS_BLENDOP = 171,
    WINED3DRS_POSITIONDEGREE = 172,
    WINED3DRS_NORMALDEGREE = 173,
    WINED3DRS_SCISSORTESTENABLE = 174,
    WINED3DRS_SLOPESCALEDEPTHBIAS = 175,
    WINED3DRS_ANTIALIASEDLINEENABLE = 176,
    WINED3DRS_MINTESSELLATIONLEVEL = 178,
    WINED3DRS_MAXTESSELLATIONLEVEL = 179,
    WINED3DRS_ADAPTIVETESS_X = 180,
    WINED3DRS_ADAPTIVETESS_Y = 181,
    WINED3DRS_ADAPTIVETESS_Z = 182,
    WINED3DRS_ADAPTIVETESS_W = 183,
    WINED3DRS_ENABLEADAPTIVETESSELLATION = 184,
    WINED3DRS_TWOSIDEDSTENCILMODE = 185,
    WINED3DRS_CCW_STENCILFAIL = 186,
    WINED3DRS_CCW_STENCILZFAIL = 187,
    WINED3DRS_CCW_STENCILPASS = 188,
    WINED3DRS_CCW_STENCILFUNC = 189,
    WINED3DRS_COLORWRITEENABLE1 = 190,
    WINED3DRS_COLORWRITEENABLE2 = 191,
    WINED3DRS_COLORWRITEENABLE3 = 192,
    WINED3DRS_BLENDFACTOR = 193,
    WINED3DRS_SRGBWRITEENABLE = 194,
    WINED3DRS_DEPTHBIAS = 195,
    WINED3DRS_WRAP8 = 198,
    WINED3DRS_WRAP9 = 199,
    WINED3DRS_WRAP10 = 200,
    WINED3DRS_WRAP11 = 201,
    WINED3DRS_WRAP12 = 202,
    WINED3DRS_WRAP13 = 203,
    WINED3DRS_WRAP14 = 204,
    WINED3DRS_WRAP15 = 205,
    WINED3DRS_SEPARATEALPHABLENDENABLE = 206,
    WINED3DRS_SRCBLENDALPHA = 207,
    WINED3DRS_DESTBLENDALPHA = 208,
    WINED3DRS_BLENDOPALPHA = 209,
    WINED3DRS_FORCE_DWORD = 0x7fffffff
} WINED3DRENDERSTATETYPE;
#define WINEHIGHEST_RENDER_STATE (WINED3DRS_BLENDOPALPHA)

typedef enum _WINED3DBLEND {
    WINED3DBLEND_ZERO = 1,
    WINED3DBLEND_ONE = 2,
    WINED3DBLEND_SRCCOLOR = 3,
    WINED3DBLEND_INVSRCCOLOR = 4,
    WINED3DBLEND_SRCALPHA = 5,
    WINED3DBLEND_INVSRCALPHA = 6,
    WINED3DBLEND_DESTALPHA = 7,
    WINED3DBLEND_INVDESTALPHA = 8,
    WINED3DBLEND_DESTCOLOR = 9,
    WINED3DBLEND_INVDESTCOLOR = 10,
    WINED3DBLEND_SRCALPHASAT = 11,
    WINED3DBLEND_BOTHSRCALPHA = 12,
    WINED3DBLEND_BOTHINVSRCALPHA = 13,
    WINED3DBLEND_BLENDFACTOR = 14,
    WINED3DBLEND_INVBLENDFACTOR = 15,
    WINED3DBLEND_FORCE_DWORD = 0x7fffffff
} WINED3DBLEND;
typedef enum _WINED3DBLENDOP {
    WINED3DBLENDOP_ADD = 1,
    WINED3DBLENDOP_SUBTRACT = 2,
    WINED3DBLENDOP_REVSUBTRACT = 3,
    WINED3DBLENDOP_MIN = 4,
    WINED3DBLENDOP_MAX = 5,
    WINED3DBLENDOP_FORCE_DWORD = 0x7fffffff
} WINED3DBLENDOP;
typedef enum _WINED3DVERTEXBLENDFLAGS {
    WINED3DVBF_DISABLE = 0,
    WINED3DVBF_1WEIGHTS = 1,
    WINED3DVBF_2WEIGHTS = 2,
    WINED3DVBF_3WEIGHTS = 3,
    WINED3DVBF_TWEENING = 255,
    WINED3DVBF_0WEIGHTS = 256
} WINED3DVERTEXBLENDFLAGS;
typedef enum _WINED3DCMPFUNC {
    WINED3DCMP_NEVER = 1,
    WINED3DCMP_LESS = 2,
    WINED3DCMP_EQUAL = 3,
    WINED3DCMP_LESSEQUAL = 4,
    WINED3DCMP_GREATER = 5,
    WINED3DCMP_NOTEQUAL = 6,
    WINED3DCMP_GREATEREQUAL = 7,
    WINED3DCMP_ALWAYS = 8,
    WINED3DCMP_FORCE_DWORD = 0x7fffffff
} WINED3DCMPFUNC;
typedef enum _WINED3DZBUFFERTYPE {
    WINED3DZB_FALSE = 0,
    WINED3DZB_TRUE = 1,
    WINED3DZB_USEW = 2,
    WINED3DZB_FORCE_DWORD = 0x7fffffff
} WINED3DZBUFFERTYPE;
typedef enum _WINED3DFOGMODE {
    WINED3DFOG_NONE = 0,
    WINED3DFOG_EXP = 1,
    WINED3DFOG_EXP2 = 2,
    WINED3DFOG_LINEAR = 3,
    WINED3DFOG_FORCE_DWORD = 0x7fffffff
} WINED3DFOGMODE;
typedef enum _WINED3DSHADEMODE {
    WINED3DSHADE_FLAT = 1,
    WINED3DSHADE_GOURAUD = 2,
    WINED3DSHADE_PHONG = 3,
    WINED3DSHADE_FORCE_DWORD = 0x7fffffff
} WINED3DSHADEMODE;
typedef enum _WINED3DFILLMODE {
    WINED3DFILL_POINT = 1,
    WINED3DFILL_WIREFRAME = 2,
    WINED3DFILL_SOLID = 3,
    WINED3DFILL_FORCE_DWORD = 0x7fffffff
} WINED3DFILLMODE;
typedef enum _WINED3DCULL {
    WINED3DCULL_NONE = 1,
    WINED3DCULL_CW = 2,
    WINED3DCULL_CCW = 3,
    WINED3DCULL_FORCE_DWORD = 0x7fffffff
} WINED3DCULL;
typedef enum _WINED3DSTENCILOP {
    WINED3DSTENCILOP_KEEP = 1,
    WINED3DSTENCILOP_ZERO = 2,
    WINED3DSTENCILOP_REPLACE = 3,
    WINED3DSTENCILOP_INCRSAT = 4,
    WINED3DSTENCILOP_DECRSAT = 5,
    WINED3DSTENCILOP_INVERT = 6,
    WINED3DSTENCILOP_INCR = 7,
    WINED3DSTENCILOP_DECR = 8,
    WINED3DSTENCILOP_FORCE_DWORD = 0x7fffffff
} WINED3DSTENCILOP;
typedef enum _WINED3DMATERIALCOLORSOURCE {
    WINED3DMCS_MATERIAL = 0,
    WINED3DMCS_COLOR1 = 1,
    WINED3DMCS_COLOR2 = 2,
    WINED3DMCS_FORCE_DWORD = 0x7fffffff
} WINED3DMATERIALCOLORSOURCE;
typedef enum _WINED3DPATCHEDGESTYLE {
    WINED3DPATCHEDGE_DISCRETE = 0,
    WINED3DPATCHEDGE_CONTINUOUS = 1,
    WINED3DPATCHEDGE_FORCE_DWORD = 0x7fffffff
} WINED3DPATCHEDGESTYLE;
typedef enum _WINED3DBACKBUFFER_TYPE {
    WINED3DBACKBUFFER_TYPE_MONO = 0,
    WINED3DBACKBUFFER_TYPE_LEFT = 1,
    WINED3DBACKBUFFER_TYPE_RIGHT = 2,
    WINED3DBACKBUFFER_TYPE_FORCE_DWORD = 0x7fffffff
} WINED3DBACKBUFFER_TYPE;
typedef enum _WINED3DSWAPEFFECT {
    WINED3DSWAPEFFECT_DISCARD = 1,
    WINED3DSWAPEFFECT_FLIP = 2,
    WINED3DSWAPEFFECT_COPY = 3,
    WINED3DSWAPEFFECT_COPY_VSYNC = 4,
    WINED3DSWAPEFFECT_FORCE_DWORD = 0xffffffff
} WINED3DSWAPEFFECT;
typedef enum _WINED3DSAMPLERSTATETYPE {
    WINED3DSAMP_ADDRESSU = 1,
    WINED3DSAMP_ADDRESSV = 2,
    WINED3DSAMP_ADDRESSW = 3,
    WINED3DSAMP_BORDERCOLOR = 4,
    WINED3DSAMP_MAGFILTER = 5,
    WINED3DSAMP_MINFILTER = 6,
    WINED3DSAMP_MIPFILTER = 7,
    WINED3DSAMP_MIPMAPLODBIAS = 8,
    WINED3DSAMP_MAXMIPLEVEL = 9,
    WINED3DSAMP_MAXANISOTROPY = 10,
    WINED3DSAMP_SRGBTEXTURE = 11,
    WINED3DSAMP_ELEMENTINDEX = 12,
    WINED3DSAMP_DMAPOFFSET = 13,
    WINED3DSAMP_FORCE_DWORD = 0x7fffffff
} WINED3DSAMPLERSTATETYPE;
#define WINED3D_HIGHEST_SAMPLER_STATE (WINED3DSAMP_DMAPOFFSET)

typedef enum _WINED3DMULTISAMPLE_TYPE {
    WINED3DMULTISAMPLE_NONE = 0,
    WINED3DMULTISAMPLE_NONMASKABLE = 1,
    WINED3DMULTISAMPLE_2_SAMPLES = 2,
    WINED3DMULTISAMPLE_3_SAMPLES = 3,
    WINED3DMULTISAMPLE_4_SAMPLES = 4,
    WINED3DMULTISAMPLE_5_SAMPLES = 5,
    WINED3DMULTISAMPLE_6_SAMPLES = 6,
    WINED3DMULTISAMPLE_7_SAMPLES = 7,
    WINED3DMULTISAMPLE_8_SAMPLES = 8,
    WINED3DMULTISAMPLE_9_SAMPLES = 9,
    WINED3DMULTISAMPLE_10_SAMPLES = 10,
    WINED3DMULTISAMPLE_11_SAMPLES = 11,
    WINED3DMULTISAMPLE_12_SAMPLES = 12,
    WINED3DMULTISAMPLE_13_SAMPLES = 13,
    WINED3DMULTISAMPLE_14_SAMPLES = 14,
    WINED3DMULTISAMPLE_15_SAMPLES = 15,
    WINED3DMULTISAMPLE_16_SAMPLES = 16,
    WINED3DMULTISAMPLE_FORCE_DWORD = 0xffffffff
} WINED3DMULTISAMPLE_TYPE;
typedef enum _WINED3DTEXTURESTAGESTATETYPE {
    WINED3DTSS_COLOROP = 0,
    WINED3DTSS_COLORARG1 = 1,
    WINED3DTSS_COLORARG2 = 2,
    WINED3DTSS_ALPHAOP = 3,
    WINED3DTSS_ALPHAARG1 = 4,
    WINED3DTSS_ALPHAARG2 = 5,
    WINED3DTSS_BUMPENVMAT00 = 6,
    WINED3DTSS_BUMPENVMAT01 = 7,
    WINED3DTSS_BUMPENVMAT10 = 8,
    WINED3DTSS_BUMPENVMAT11 = 9,
    WINED3DTSS_TEXCOORDINDEX = 10,
    WINED3DTSS_BUMPENVLSCALE = 11,
    WINED3DTSS_BUMPENVLOFFSET = 12,
    WINED3DTSS_TEXTURETRANSFORMFLAGS = 13,
    WINED3DTSS_COLORARG0 = 14,
    WINED3DTSS_ALPHAARG0 = 15,
    WINED3DTSS_RESULTARG = 16,
    WINED3DTSS_CONSTANT = 17,
    WINED3DTSS_FORCE_DWORD = 0x7fffffff
} WINED3DTEXTURESTAGESTATETYPE;
#define WINED3D_HIGHEST_TEXTURE_STATE (WINED3DTSS_CONSTANT)

typedef enum _WINED3DTEXTURETRANSFORMFLAGS {
    WINED3DTTFF_DISABLE = 0,
    WINED3DTTFF_COUNT1 = 1,
    WINED3DTTFF_COUNT2 = 2,
    WINED3DTTFF_COUNT3 = 3,
    WINED3DTTFF_COUNT4 = 4,
    WINED3DTTFF_PROJECTED = 256,
    WINED3DTTFF_FORCE_DWORD = 0x7fffffff
} WINED3DTEXTURETRANSFORMFLAGS;
typedef enum _WINED3DTEXTUREOP {
    WINED3DTOP_DISABLE = 1,
    WINED3DTOP_SELECTARG1 = 2,
    WINED3DTOP_SELECTARG2 = 3,
    WINED3DTOP_MODULATE = 4,
    WINED3DTOP_MODULATE2X = 5,
    WINED3DTOP_MODULATE4X = 6,
    WINED3DTOP_ADD = 7,
    WINED3DTOP_ADDSIGNED = 8,
    WINED3DTOP_ADDSIGNED2X = 9,
    WINED3DTOP_SUBTRACT = 10,
    WINED3DTOP_ADDSMOOTH = 11,
    WINED3DTOP_BLENDDIFFUSEALPHA = 12,
    WINED3DTOP_BLENDTEXTUREALPHA = 13,
    WINED3DTOP_BLENDFACTORALPHA = 14,
    WINED3DTOP_BLENDTEXTUREALPHAPM = 15,
    WINED3DTOP_BLENDCURRENTALPHA = 16,
    WINED3DTOP_PREMODULATE = 17,
    WINED3DTOP_MODULATEALPHA_ADDCOLOR = 18,
    WINED3DTOP_MODULATECOLOR_ADDALPHA = 19,
    WINED3DTOP_MODULATEINVALPHA_ADDCOLOR = 20,
    WINED3DTOP_MODULATEINVCOLOR_ADDALPHA = 21,
    WINED3DTOP_BUMPENVMAP = 22,
    WINED3DTOP_BUMPENVMAPLUMINANCE = 23,
    WINED3DTOP_DOTPRODUCT3 = 24,
    WINED3DTOP_MULTIPLYADD = 25,
    WINED3DTOP_LERP = 26,
    WINED3DTOP_FORCE_DWORD = 0x7fffffff
} WINED3DTEXTUREOP;
typedef enum _WINED3DTEXTUREADDRESS {
    WINED3DTADDRESS_WRAP = 1,
    WINED3DTADDRESS_MIRROR = 2,
    WINED3DTADDRESS_CLAMP = 3,
    WINED3DTADDRESS_BORDER = 4,
    WINED3DTADDRESS_MIRRORONCE = 5,
    WINED3DTADDRESS_FORCE_DWORD = 0x7fffffff
} WINED3DTEXTUREADDRESS;
typedef enum _WINED3DTRANSFORMSTATETYPE {
    WINED3DTS_VIEW = 2,
    WINED3DTS_PROJECTION = 3,
    WINED3DTS_TEXTURE0 = 16,
    WINED3DTS_TEXTURE1 = 17,
    WINED3DTS_TEXTURE2 = 18,
    WINED3DTS_TEXTURE3 = 19,
    WINED3DTS_TEXTURE4 = 20,
    WINED3DTS_TEXTURE5 = 21,
    WINED3DTS_TEXTURE6 = 22,
    WINED3DTS_TEXTURE7 = 23,
    WINED3DTS_WORLD = 256,
    WINED3DTS_WORLD1 = 257,
    WINED3DTS_WORLD2 = 258,
    WINED3DTS_WORLD3 = 259,
    WINED3DTS_FORCE_DWORD = 0x7fffffff
} WINED3DTRANSFORMSTATETYPE;
#define WINED3DTS_WORLDMATRIX(index) (WINED3DTRANSFORMSTATETYPE)(index + 256)
typedef enum _WINED3DBASISTYPE {
    WINED3DBASIS_BEZIER = 0,
    WINED3DBASIS_BSPLINE = 1,
    WINED3DBASIS_INTERPOLATE = 2,
    WINED3DBASIS_FORCE_DWORD = 0x7fffffff
} WINED3DBASISTYPE;
typedef enum _WINED3DCUBEMAP_FACES {
    WINED3DCUBEMAP_FACE_POSITIVE_X = 0,
    WINED3DCUBEMAP_FACE_NEGATIVE_X = 1,
    WINED3DCUBEMAP_FACE_POSITIVE_Y = 2,
    WINED3DCUBEMAP_FACE_NEGATIVE_Y = 3,
    WINED3DCUBEMAP_FACE_POSITIVE_Z = 4,
    WINED3DCUBEMAP_FACE_NEGATIVE_Z = 5,
    WINED3DCUBEMAP_FACE_FORCE_DWORD = 0xffffffff
} WINED3DCUBEMAP_FACES;
typedef enum _WINED3DTEXTUREFILTERTYPE {
    WINED3DTEXF_NONE = 0,
    WINED3DTEXF_POINT = 1,
    WINED3DTEXF_LINEAR = 2,
    WINED3DTEXF_ANISOTROPIC = 3,
    WINED3DTEXF_FLATCUBIC = 4,
    WINED3DTEXF_GAUSSIANCUBIC = 5,
    WINED3DTEXF_PYRAMIDALQUAD = 6,
    WINED3DTEXF_GAUSSIANQUAD = 7,
    WINED3DTEXF_FORCE_DWORD = 0x7fffffff
} WINED3DTEXTUREFILTERTYPE;
typedef enum _WINED3DRESOURCETYPE {
    WINED3DRTYPE_SURFACE = 1,
    WINED3DRTYPE_VOLUME = 2,
    WINED3DRTYPE_TEXTURE = 3,
    WINED3DRTYPE_VOLUMETEXTURE = 4,
    WINED3DRTYPE_CUBETEXTURE = 5,
    WINED3DRTYPE_BUFFER = 6,
    WINED3DRTYPE_FORCE_DWORD = 0x7fffffff
} WINED3DRESOURCETYPE;
#define WINED3DRTYPECOUNT (WINED3DRTYPE_BUFFER + 1)

typedef enum _WINED3DPOOL {
    WINED3DPOOL_DEFAULT = 0,
    WINED3DPOOL_MANAGED = 1,
    WINED3DPOOL_SYSTEMMEM = 2,
    WINED3DPOOL_SCRATCH = 3,
    WINED3DPOOL_FORCE_DWORD = 0x7fffffff
} WINED3DPOOL;
typedef enum _WINED3DQUERYTYPE {
    WINED3DQUERYTYPE_VCACHE = 4,
    WINED3DQUERYTYPE_RESOURCEMANAGER = 5,
    WINED3DQUERYTYPE_VERTEXSTATS = 6,
    WINED3DQUERYTYPE_EVENT = 8,
    WINED3DQUERYTYPE_OCCLUSION = 9,
    WINED3DQUERYTYPE_TIMESTAMP = 10,
    WINED3DQUERYTYPE_TIMESTAMPDISJOINT = 11,
    WINED3DQUERYTYPE_TIMESTAMPFREQ = 12,
    WINED3DQUERYTYPE_PIPELINETIMINGS = 13,
    WINED3DQUERYTYPE_INTERFACETIMINGS = 14,
    WINED3DQUERYTYPE_VERTEXTIMINGS = 15,
    WINED3DQUERYTYPE_PIXELTIMINGS = 16,
    WINED3DQUERYTYPE_BANDWIDTHTIMINGS = 17,
    WINED3DQUERYTYPE_CACHEUTILIZATION = 18
} WINED3DQUERYTYPE;
#define WINED3DISSUE_BEGIN (1 << 1)

#define WINED3DISSUE_END (1 << 0)

#define WINED3DGETDATA_FLUSH (1 << 0)

typedef enum _WINED3DSTATEBLOCKTYPE {
    WINED3DSBT_INIT = 0,
    WINED3DSBT_ALL = 1,
    WINED3DSBT_PIXELSTATE = 2,
    WINED3DSBT_VERTEXSTATE = 3,
    WINED3DSBT_RECORDED = 4,
    WINED3DSBT_FORCE_DWORD = 0xffffffff
} WINED3DSTATEBLOCKTYPE;
typedef enum _WINED3DDECLMETHOD {
    WINED3DDECLMETHOD_DEFAULT = 0,
    WINED3DDECLMETHOD_PARTIALU = 1,
    WINED3DDECLMETHOD_PARTIALV = 2,
    WINED3DDECLMETHOD_CROSSUV = 3,
    WINED3DDECLMETHOD_UV = 4,
    WINED3DDECLMETHOD_LOOKUP = 5,
    WINED3DDECLMETHOD_LOOKUPPRESAMPLED = 6
} WINED3DDECLMETHOD;
typedef enum _WINED3DDECLUSAGE {
    WINED3DDECLUSAGE_POSITION = 0,
    WINED3DDECLUSAGE_BLENDWEIGHT = 1,
    WINED3DDECLUSAGE_BLENDINDICES = 2,
    WINED3DDECLUSAGE_NORMAL = 3,
    WINED3DDECLUSAGE_PSIZE = 4,
    WINED3DDECLUSAGE_TEXCOORD = 5,
    WINED3DDECLUSAGE_TANGENT = 6,
    WINED3DDECLUSAGE_BINORMAL = 7,
    WINED3DDECLUSAGE_TESSFACTOR = 8,
    WINED3DDECLUSAGE_POSITIONT = 9,
    WINED3DDECLUSAGE_COLOR = 10,
    WINED3DDECLUSAGE_FOG = 11,
    WINED3DDECLUSAGE_DEPTH = 12,
    WINED3DDECLUSAGE_SAMPLE = 13
} WINED3DDECLUSAGE;
typedef enum _WINED3DSURFTYPE {
    SURFACE_UNKNOWN = 0,
    SURFACE_OPENGL = 1,
    SURFACE_GDI = 2
} WINED3DSURFTYPE;
enum wined3d_sysval_semantic {
    WINED3D_SV_DEPTH = 0xffffffff,
    WINED3D_SV_TARGET0 = 0,
    WINED3D_SV_TARGET1 = 1,
    WINED3D_SV_TARGET2 = 2,
    WINED3D_SV_TARGET3 = 3,
    WINED3D_SV_TARGET4 = 4,
    WINED3D_SV_TARGET5 = 5,
    WINED3D_SV_TARGET6 = 6,
    WINED3D_SV_TARGET7 = 7
};

#define WINED3DCOLORWRITEENABLE_RED (1 << 0)

#define WINED3DCOLORWRITEENABLE_GREEN (1 << 1)

#define WINED3DCOLORWRITEENABLE_BLUE (1 << 2)

#define WINED3DCOLORWRITEENABLE_ALPHA (1 << 3)

#define WINED3DADAPTER_DEFAULT (0)

#define WINED3DENUM_NO_WHQL_LEVEL (2)

#define WINED3DPRESENT_BACK_BUFFER_MAX (3)

#define WINED3DTSS_TCI_PASSTHRU (0x0)

#define WINED3DTSS_TCI_CAMERASPACENORMAL (0x10000)

#define WINED3DTSS_TCI_CAMERASPACEPOSITION (0x20000)

#define WINED3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR (0x30000)

#define WINED3DTSS_TCI_SPHEREMAP (0x40000)

#define WINED3DTA_SELECTMASK (0xf)

#define WINED3DTA_DIFFUSE (0x0)

#define WINED3DTA_CURRENT (0x1)

#define WINED3DTA_TEXTURE (0x2)

#define WINED3DTA_TFACTOR (0x3)

#define WINED3DTA_SPECULAR (0x4)

#define WINED3DTA_TEMP (0x5)

#define WINED3DTA_CONSTANT (0x6)

#define WINED3DTA_COMPLEMENT (0x10)

#define WINED3DTA_ALPHAREPLICATE (0x20)

#define WINED3DPRESENTFLAG_LOCKABLE_BACKBUFFER (0x1)

#define WINED3DPRESENTFLAG_DISCARD_DEPTHSTENCIL (0x2)

#define WINED3DPRESENTFLAG_DEVICECLIP (0x4)

#define WINED3DPRESENTFLAG_VIDEO (0x10)

#define WINED3DPRESENTFLAG_NOAUTOROTATE (0x20)

#define WINED3DPRESENTFLAG_UNPRUNEDMODE (0x40)

#define WINED3DDP_MAXTEXCOORD (8)

#define WINED3DUSAGE_RENDERTARGET (0x1)

#define WINED3DUSAGE_DEPTHSTENCIL (0x2)

#define WINED3DUSAGE_WRITEONLY (0x8)

#define WINED3DUSAGE_SOFTWAREPROCESSING (0x10)

#define WINED3DUSAGE_DONOTCLIP (0x20)

#define WINED3DUSAGE_POINTS (0x40)

#define WINED3DUSAGE_RTPATCHES (0x80)

#define WINED3DUSAGE_NPATCHES (0x100)

#define WINED3DUSAGE_DYNAMIC (0x200)

#define WINED3DUSAGE_AUTOGENMIPMAP (0x400)

#define WINED3DUSAGE_DMAP (0x4000)

#define WINED3DUSAGE_MASK (0x4fff)

#define WINED3DUSAGE_STATICDECL (0x40000000)

#define WINED3DUSAGE_OVERLAY (0x80000000)

#define WINED3DUSAGE_QUERY_LEGACYBUMPMAP (0x8000)

#define WINED3DUSAGE_QUERY_FILTER (0x20000)

#define WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING (0x80000)

#define WINED3DUSAGE_QUERY_SRGBREAD (0x10000)

#define WINED3DUSAGE_QUERY_SRGBWRITE (0x40000)

#define WINED3DUSAGE_QUERY_VERTEXTEXTURE (0x100000)

#define WINED3DUSAGE_QUERY_WRAPANDMIP (0x200000)

#define WINED3DUSAGE_QUERY_MASK (0x3f8000)

#define WINED3DLOCK_READONLY (0x10)

#define WINED3DLOCK_NOSYSLOCK (0x800)

#define WINED3DLOCK_NOOVERWRITE (0x1000)

#define WINED3DLOCK_DISCARD (0x2000)

#define WINED3DLOCK_DONOTWAIT (0x4000)

#define WINED3DLOCK_NO_DIRTY_UPDATE (0x8000)

#define WINED3DPRESENT_RATE_DEFAULT (0x0)

#define WINED3DPRESENT_INTERVAL_DEFAULT (0x0)

#define WINED3DPRESENT_INTERVAL_ONE (0x1)

#define WINED3DPRESENT_INTERVAL_TWO (0x2)

#define WINED3DPRESENT_INTERVAL_THREE (0x4)

#define WINED3DPRESENT_INTERVAL_FOUR (0x8)

#define WINED3DPRESENT_INTERVAL_IMMEDIATE (0x80000000)

#define WINED3DMAXUSERCLIPPLANES (32)

#define WINED3DCLIPPLANE0 (1 << 0)

#define WINED3DCLIPPLANE1 (1 << 1)

#define WINED3DCLIPPLANE2 (1 << 2)

#define WINED3DCLIPPLANE3 (1 << 3)

#define WINED3DCLIPPLANE4 (1 << 4)

#define WINED3DCLIPPLANE5 (1 << 5)

#define WINED3DFVF_RESERVED0 (0x1)

#define WINED3DFVF_POSITION_MASK (0x400e)

#define WINED3DFVF_XYZ (0x2)

#define WINED3DFVF_XYZRHW (0x4)

#define WINED3DFVF_XYZB1 (0x6)

#define WINED3DFVF_XYZB2 (0x8)

#define WINED3DFVF_XYZB3 (0xa)

#define WINED3DFVF_XYZB4 (0xc)

#define WINED3DFVF_XYZB5 (0xe)

#define WINED3DFVF_XYZW (0x4002)

#define WINED3DFVF_NORMAL (0x10)

#define WINED3DFVF_PSIZE (0x20)

#define WINED3DFVF_DIFFUSE (0x40)

#define WINED3DFVF_SPECULAR (0x80)

#define WINED3DFVF_TEXCOUNT_MASK (0xf00)

#define WINED3DFVF_TEXCOUNT_SHIFT (8)

#define WINED3DFVF_TEX0 (0x0)

#define WINED3DFVF_TEX1 (0x100)

#define WINED3DFVF_TEX2 (0x200)

#define WINED3DFVF_TEX3 (0x300)

#define WINED3DFVF_TEX4 (0x400)

#define WINED3DFVF_TEX5 (0x500)

#define WINED3DFVF_TEX6 (0x600)

#define WINED3DFVF_TEX7 (0x700)

#define WINED3DFVF_TEX8 (0x800)

#define WINED3DFVF_LASTBETA_UBYTE4 (0x1000)

#define WINED3DFVF_LASTBETA_D3DCOLOR (0x8000)

#define WINED3DFVF_RESERVED2 (0x6000)

#define WINED3DFVF_TEXTUREFORMAT1 (3)

#define WINED3DFVF_TEXTUREFORMAT2 (0)

#define WINED3DFVF_TEXTUREFORMAT3 (1)

#define WINED3DFVF_TEXTUREFORMAT4 (2)

#define WINED3DFVF_TEXCOORDSIZE1(CoordIndex) (WINED3DFVF_TEXTUREFORMAT1 << (CoordIndex*2 + 16))
#define WINED3DFVF_TEXCOORDSIZE2(CoordIndex) (WINED3DFVF_TEXTUREFORMAT2)
#define WINED3DFVF_TEXCOORDSIZE3(CoordIndex) (WINED3DFVF_TEXTUREFORMAT3 << (CoordIndex*2 + 16))
#define WINED3DFVF_TEXCOORDSIZE4(CoordIndex) (WINED3DFVF_TEXTUREFORMAT4 << (CoordIndex*2 + 16))
#define WINED3DCLEAR_TARGET (0x1)

#define WINED3DCLEAR_ZBUFFER (0x2)

#define WINED3DCLEAR_STENCIL (0x4)

#define WINED3DSTREAMSOURCE_INDEXEDDATA (1 << 30)

#define WINED3DSTREAMSOURCE_INSTANCEDATA (2 << 30)

#define WINED3DSPD_IUNKNOWN (0x1)

#define WINED3DCREATE_FPU_PRESERVE (0x2)

#define WINED3DCREATE_PUREDEVICE (0x10)

#define WINED3DCREATE_SOFTWARE_VERTEXPROCESSING (0x20)

#define WINED3DCREATE_HARDWARE_VERTEXPROCESSING (0x40)

#define WINED3DCREATE_MIXED_VERTEXPROCESSING (0x80)

#define WINED3DCREATE_DISABLE_DRIVER_MANAGEMENT (0x100)

#define WINED3DCREATE_ADAPTERGROUP_DEVICE (0x200)

#define WINED3DDMAPSAMPLER (0x100)

#define WINED3DVERTEXTEXTURESAMPLER0 (WINED3DDMAPSAMPLER + 1)

#define WINED3DVERTEXTEXTURESAMPLER1 (WINED3DDMAPSAMPLER + 2)

#define WINED3DVERTEXTEXTURESAMPLER2 (WINED3DDMAPSAMPLER + 3)

#define WINED3DVERTEXTEXTURESAMPLER3 (WINED3DDMAPSAMPLER + 4)

#define WINED3DCAPS3_ALPHA_FULLSCREEN_FLIP_OR_DISCARD (0x20)

#define WINED3DCAPS3_LINEAR_TO_SRGB_PRESENTATION (0x80)

#define WINED3DCAPS3_COPY_TO_VIDMEM (0x100)

#define WINED3DCAPS3_COPY_TO_SYSTEMMEM (0x200)

#define WINED3DCAPS3_RESERVED (0x8000001f)

#define WINED3DDEVCAPS2_STREAMOFFSET (0x1)

#define WINED3DDEVCAPS2_DMAPNPATCH (0x2)

#define WINED3DDEVCAPS2_ADAPTIVETESSRTPATCH (0x4)

#define WINED3DDEVCAPS2_ADAPTIVETESSNPATCH (0x8)

#define WINED3DDEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES (0x10)

#define WINED3DDEVCAPS2_PRESAMPLEDDMAPNPATCH (0x20)

#define WINED3DDEVCAPS2_VERTEXELEMENTSCANSHARESTREAMOFFSET (0x40)

#define WINED3DDTCAPS_UBYTE4 (0x1)

#define WINED3DDTCAPS_UBYTE4N (0x2)

#define WINED3DDTCAPS_SHORT2N (0x4)

#define WINED3DDTCAPS_SHORT4N (0x8)

#define WINED3DDTCAPS_USHORT2N (0x10)

#define WINED3DDTCAPS_USHORT4N (0x20)

#define WINED3DDTCAPS_UDEC3 (0x40)

#define WINED3DDTCAPS_DEC3N (0x80)

#define WINED3DDTCAPS_FLOAT16_2 (0x100)

#define WINED3DDTCAPS_FLOAT16_4 (0x200)

#define WINED3DFVFCAPS_TEXCOORDCOUNTMASK (0xffff)

#define WINED3DFVFCAPS_DONOTSTRIPELEMENTS (0x80000)

#define WINED3DFVFCAPS_PSIZE (0x100000)

#define WINED3DLINECAPS_TEXTURE (0x1)

#define WINED3DLINECAPS_ZTEST (0x2)

#define WINED3DLINECAPS_BLEND (0x4)

#define WINED3DLINECAPS_ALPHACMP (0x8)

#define WINED3DLINECAPS_FOG (0x10)

#define WINED3DLINECAPS_ANTIALIAS (0x20)

#define WINED3DMAX30SHADERINSTRUCTIONS (32768)

#define WINED3DMIN30SHADERINSTRUCTIONS (512)

#define WINED3DPBLENDCAPS_ZERO (0x1)

#define WINED3DPBLENDCAPS_ONE (0x2)

#define WINED3DPBLENDCAPS_SRCCOLOR (0x4)

#define WINED3DPBLENDCAPS_INVSRCCOLOR (0x8)

#define WINED3DPBLENDCAPS_SRCALPHA (0x10)

#define WINED3DPBLENDCAPS_INVSRCALPHA (0x20)

#define WINED3DPBLENDCAPS_DESTALPHA (0x40)

#define WINED3DPBLENDCAPS_INVDESTALPHA (0x80)

#define WINED3DPBLENDCAPS_DESTCOLOR (0x100)

#define WINED3DPBLENDCAPS_INVDESTCOLOR (0x200)

#define WINED3DPBLENDCAPS_SRCALPHASAT (0x400)

#define WINED3DPBLENDCAPS_BOTHSRCALPHA (0x800)

#define WINED3DPBLENDCAPS_BOTHINVSRCALPHA (0x1000)

#define WINED3DPBLENDCAPS_BLENDFACTOR (0x2000)

#define WINED3DPCMPCAPS_NEVER (0x1)

#define WINED3DPCMPCAPS_LESS (0x2)

#define WINED3DPCMPCAPS_EQUAL (0x4)

#define WINED3DPCMPCAPS_LESSEQUAL (0x8)

#define WINED3DPCMPCAPS_GREATER (0x10)

#define WINED3DPCMPCAPS_NOTEQUAL (0x20)

#define WINED3DPCMPCAPS_GREATEREQUAL (0x40)

#define WINED3DPCMPCAPS_ALWAYS (0x80)

#define WINED3DPMISCCAPS_MASKZ (0x2)

#define WINED3DPMISCCAPS_LINEPATTERNREP (0x4)

#define WINED3DPMISCCAPS_CULLNONE (0x10)

#define WINED3DPMISCCAPS_CULLCW (0x20)

#define WINED3DPMISCCAPS_CULLCCW (0x40)

#define WINED3DPMISCCAPS_COLORWRITEENABLE (0x80)

#define WINED3DPMISCCAPS_CLIPPLANESCALEDPOINTS (0x100)

#define WINED3DPMISCCAPS_CLIPTLVERTS (0x200)

#define WINED3DPMISCCAPS_TSSARGTEMP (0x400)

#define WINED3DPMISCCAPS_BLENDOP (0x800)

#define WINED3DPMISCCAPS_NULLREFERENCE (0x1000)

#define WINED3DPMISCCAPS_INDEPENDENTWRITEMASKS (0x4000)

#define WINED3DPMISCCAPS_PERSTAGECONSTANT (0x8000)

#define WINED3DPMISCCAPS_FOGANDSPECULARALPHA (0x10000)

#define WINED3DPMISCCAPS_SEPARATEALPHABLEND (0x20000)

#define WINED3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS (0x40000)

#define WINED3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING (0x80000)

#define WINED3DPMISCCAPS_FOGVERTEXCLAMPED (0x100000)

#define WINED3DPS20_MAX_DYNAMICFLOWCONTROLDEPTH (24)

#define WINED3DPS20_MIN_DYNAMICFLOWCONTROLDEPTH (0)

#define WINED3DPS20_MAX_NUMTEMPS (32)

#define WINED3DPS20_MIN_NUMTEMPS (12)

#define WINED3DPS20_MAX_STATICFLOWCONTROLDEPTH (4)

#define WINED3DPS20_MIN_STATICFLOWCONTROLDEPTH (0)

#define WINED3DPS20_MAX_NUMINSTRUCTIONSLOTS (512)

#define WINED3DPS20_MIN_NUMINSTRUCTIONSLOTS (96)

#define WINED3DPS20CAPS_ARBITRARYSWIZZLE (0x1)

#define WINED3DPS20CAPS_GRADIENTINSTRUCTIONS (0x2)

#define WINED3DPS20CAPS_PREDICATION (0x4)

#define WINED3DPS20CAPS_NODEPENDENTREADLIMIT (0x8)

#define WINED3DPS20CAPS_NOTEXINSTRUCTIONLIMIT (0x10)

#define WINED3DPTADDRESSCAPS_WRAP (0x1)

#define WINED3DPTADDRESSCAPS_MIRROR (0x2)

#define WINED3DPTADDRESSCAPS_CLAMP (0x4)

#define WINED3DPTADDRESSCAPS_BORDER (0x8)

#define WINED3DPTADDRESSCAPS_INDEPENDENTUV (0x10)

#define WINED3DPTADDRESSCAPS_MIRRORONCE (0x20)

#define WINED3DSTENCILCAPS_KEEP (0x1)

#define WINED3DSTENCILCAPS_ZERO (0x2)

#define WINED3DSTENCILCAPS_REPLACE (0x4)

#define WINED3DSTENCILCAPS_INCRSAT (0x8)

#define WINED3DSTENCILCAPS_DECRSAT (0x10)

#define WINED3DSTENCILCAPS_INVERT (0x20)

#define WINED3DSTENCILCAPS_INCR (0x40)

#define WINED3DSTENCILCAPS_DECR (0x80)

#define WINED3DSTENCILCAPS_TWOSIDED (0x100)

#define WINED3DTEXOPCAPS_DISABLE (0x1)

#define WINED3DTEXOPCAPS_SELECTARG1 (0x2)

#define WINED3DTEXOPCAPS_SELECTARG2 (0x4)

#define WINED3DTEXOPCAPS_MODULATE (0x8)

#define WINED3DTEXOPCAPS_MODULATE2X (0x10)

#define WINED3DTEXOPCAPS_MODULATE4X (0x20)

#define WINED3DTEXOPCAPS_ADD (0x40)

#define WINED3DTEXOPCAPS_ADDSIGNED (0x80)

#define WINED3DTEXOPCAPS_ADDSIGNED2X (0x100)

#define WINED3DTEXOPCAPS_SUBTRACT (0x200)

#define WINED3DTEXOPCAPS_ADDSMOOTH (0x400)

#define WINED3DTEXOPCAPS_BLENDDIFFUSEALPHA (0x800)

#define WINED3DTEXOPCAPS_BLENDTEXTUREALPHA (0x1000)

#define WINED3DTEXOPCAPS_BLENDFACTORALPHA (0x2000)

#define WINED3DTEXOPCAPS_BLENDTEXTUREALPHAPM (0x4000)

#define WINED3DTEXOPCAPS_BLENDCURRENTALPHA (0x8000)

#define WINED3DTEXOPCAPS_PREMODULATE (0x10000)

#define WINED3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR (0x20000)

#define WINED3DTEXOPCAPS_MODULATECOLOR_ADDALPHA (0x40000)

#define WINED3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR (0x80000)

#define WINED3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA (0x100000)

#define WINED3DTEXOPCAPS_BUMPENVMAP (0x200000)

#define WINED3DTEXOPCAPS_BUMPENVMAPLUMINANCE (0x400000)

#define WINED3DTEXOPCAPS_DOTPRODUCT3 (0x800000)

#define WINED3DTEXOPCAPS_MULTIPLYADD (0x1000000)

#define WINED3DTEXOPCAPS_LERP (0x2000000)

#define WINED3DVS20_MAX_DYNAMICFLOWCONTROLDEPTH (24)

#define WINED3DVS20_MIN_DYNAMICFLOWCONTROLDEPTH (0)

#define WINED3DVS20_MAX_NUMTEMPS (32)

#define WINED3DVS20_MIN_NUMTEMPS (12)

#define WINED3DVS20_MAX_STATICFLOWCONTROLDEPTH (4)

#define WINED3DVS20_MIN_STATICFLOWCONTROLDEPTH (1)

#define WINED3DVS20CAPS_PREDICATION (0x1)

#define WINED3DCAPS2_NO2DDURING3DSCENE (0x2)

#define WINED3DCAPS2_FULLSCREENGAMMA (0x20000)

#define WINED3DCAPS2_CANRENDERWINDOWED (0x80000)

#define WINED3DCAPS2_CANCALIBRATEGAMMA (0x100000)

#define WINED3DCAPS2_RESERVED (0x2000000)

#define WINED3DCAPS2_CANMANAGERESOURCE (0x10000000)

#define WINED3DCAPS2_DYNAMICTEXTURES (0x20000000)

#define WINED3DCAPS2_CANAUTOGENMIPMAP (0x40000000)

#define WINED3DPRASTERCAPS_DITHER (0x1)

#define WINED3DPRASTERCAPS_ROP2 (0x2)

#define WINED3DPRASTERCAPS_XOR (0x4)

#define WINED3DPRASTERCAPS_PAT (0x8)

#define WINED3DPRASTERCAPS_ZTEST (0x10)

#define WINED3DPRASTERCAPS_SUBPIXEL (0x20)

#define WINED3DPRASTERCAPS_SUBPIXELX (0x40)

#define WINED3DPRASTERCAPS_FOGVERTEX (0x80)

#define WINED3DPRASTERCAPS_FOGTABLE (0x100)

#define WINED3DPRASTERCAPS_STIPPLE (0x200)

#define WINED3DPRASTERCAPS_ANTIALIASSORTDEPENDENT (0x400)

#define WINED3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT (0x800)

#define WINED3DPRASTERCAPS_ANTIALIASEDGES (0x1000)

#define WINED3DPRASTERCAPS_MIPMAPLODBIAS (0x2000)

#define WINED3DPRASTERCAPS_ZBIAS (0x4000)

#define WINED3DPRASTERCAPS_ZBUFFERLESSHSR (0x8000)

#define WINED3DPRASTERCAPS_FOGRANGE (0x10000)

#define WINED3DPRASTERCAPS_ANISOTROPY (0x20000)

#define WINED3DPRASTERCAPS_WBUFFER (0x40000)

#define WINED3DPRASTERCAPS_TRANSLUCENTSORTINDEPENDENT (0x80000)

#define WINED3DPRASTERCAPS_WFOG (0x100000)

#define WINED3DPRASTERCAPS_ZFOG (0x200000)

#define WINED3DPRASTERCAPS_COLORPERSPECTIVE (0x400000)

#define WINED3DPRASTERCAPS_SCISSORTEST (0x1000000)

#define WINED3DPRASTERCAPS_SLOPESCALEDEPTHBIAS (0x2000000)

#define WINED3DPRASTERCAPS_DEPTHBIAS (0x4000000)

#define WINED3DPRASTERCAPS_MULTISAMPLE_TOGGLE (0x8000000)

#define WINED3DPSHADECAPS_COLORFLATMONO (0x1)

#define WINED3DPSHADECAPS_COLORFLATRGB (0x2)

#define WINED3DPSHADECAPS_COLORGOURAUDMONO (0x4)

#define WINED3DPSHADECAPS_COLORGOURAUDRGB (0x8)

#define WINED3DPSHADECAPS_COLORPHONGMONO (0x10)

#define WINED3DPSHADECAPS_COLORPHONGRGB (0x20)

#define WINED3DPSHADECAPS_SPECULARFLATMONO (0x40)

#define WINED3DPSHADECAPS_SPECULARFLATRGB (0x80)

#define WINED3DPSHADECAPS_SPECULARGOURAUDMONO (0x100)

#define WINED3DPSHADECAPS_SPECULARGOURAUDRGB (0x200)

#define WINED3DPSHADECAPS_SPECULARPHONGMONO (0x400)

#define WINED3DPSHADECAPS_SPECULARPHONGRGB (0x800)

#define WINED3DPSHADECAPS_ALPHAFLATBLEND (0x1000)

#define WINED3DPSHADECAPS_ALPHAFLATSTIPPLED (0x2000)

#define WINED3DPSHADECAPS_ALPHAGOURAUDBLEND (0x4000)

#define WINED3DPSHADECAPS_ALPHAGOURAUDSTIPPLED (0x8000)

#define WINED3DPSHADECAPS_ALPHAPHONGBLEND (0x10000)

#define WINED3DPSHADECAPS_ALPHAPHONGSTIPPLED (0x20000)

#define WINED3DPSHADECAPS_FOGFLAT (0x40000)

#define WINED3DPSHADECAPS_FOGGOURAUD (0x80000)

#define WINED3DPSHADECAPS_FOGPHONG (0x100000)

#define WINED3DPTEXTURECAPS_PERSPECTIVE (0x1)

#define WINED3DPTEXTURECAPS_POW2 (0x2)

#define WINED3DPTEXTURECAPS_ALPHA (0x4)

#define WINED3DPTEXTURECAPS_TRANSPARENCY (0x8)

#define WINED3DPTEXTURECAPS_BORDER (0x10)

#define WINED3DPTEXTURECAPS_SQUAREONLY (0x20)

#define WINED3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE (0x40)

#define WINED3DPTEXTURECAPS_ALPHAPALETTE (0x80)

#define WINED3DPTEXTURECAPS_NONPOW2CONDITIONAL (0x100)

#define WINED3DPTEXTURECAPS_PROJECTED (0x400)

#define WINED3DPTEXTURECAPS_CUBEMAP (0x800)

#define WINED3DPTEXTURECAPS_COLORKEYBLEND (0x1000)

#define WINED3DPTEXTURECAPS_VOLUMEMAP (0x2000)

#define WINED3DPTEXTURECAPS_MIPMAP (0x4000)

#define WINED3DPTEXTURECAPS_MIPVOLUMEMAP (0x8000)

#define WINED3DPTEXTURECAPS_MIPCUBEMAP (0x10000)

#define WINED3DPTEXTURECAPS_CUBEMAP_POW2 (0x20000)

#define WINED3DPTEXTURECAPS_VOLUMEMAP_POW2 (0x40000)

#define WINED3DPTEXTURECAPS_NOPROJECTEDBUMPENV (0x200000)

#define WINED3DPTFILTERCAPS_NEAREST (0x1)

#define WINED3DPTFILTERCAPS_LINEAR (0x2)

#define WINED3DPTFILTERCAPS_MIPNEAREST (0x4)

#define WINED3DPTFILTERCAPS_MIPLINEAR (0x8)

#define WINED3DPTFILTERCAPS_LINEARMIPNEAREST (0x10)

#define WINED3DPTFILTERCAPS_LINEARMIPLINEAR (0x20)

#define WINED3DPTFILTERCAPS_MINFPOINT (0x100)

#define WINED3DPTFILTERCAPS_MINFLINEAR (0x200)

#define WINED3DPTFILTERCAPS_MINFANISOTROPIC (0x400)

#define WINED3DPTFILTERCAPS_MIPFPOINT (0x10000)

#define WINED3DPTFILTERCAPS_MIPFLINEAR (0x20000)

#define WINED3DPTFILTERCAPS_MAGFPOINT (0x1000000)

#define WINED3DPTFILTERCAPS_MAGFLINEAR (0x2000000)

#define WINED3DPTFILTERCAPS_MAGFANISOTROPIC (0x4000000)

#define WINED3DPTFILTERCAPS_MAGFPYRAMIDALQUAD (0x8000000)

#define WINED3DPTFILTERCAPS_MAGFGAUSSIANQUAD (0x10000000)

#define WINED3DVTXPCAPS_TEXGEN (0x1)

#define WINED3DVTXPCAPS_MATERIALSOURCE7 (0x2)

#define WINED3DVTXPCAPS_VERTEXFOG (0x4)

#define WINED3DVTXPCAPS_DIRECTIONALLIGHTS (0x8)

#define WINED3DVTXPCAPS_POSITIONALLIGHTS (0x10)

#define WINED3DVTXPCAPS_LOCALVIEWER (0x20)

#define WINED3DVTXPCAPS_TWEENING (0x40)

#define WINED3DVTXPCAPS_TEXGEN_SPHEREMAP (0x100)

#define WINED3DVTXPCAPS_NO_TEXGEN_NONLOCALVIEWER (0x200)

#define WINED3DCURSORCAPS_COLOR (0x1)

#define WINED3DCURSORCAPS_LOWRES (0x2)

#define WINED3DDEVCAPS_FLOATTLVERTEX (0x1)

#define WINED3DDEVCAPS_SORTINCREASINGZ (0x2)

#define WINED3DDEVCAPS_SORTDECREASINGZ (0x4)

#define WINED3DDEVCAPS_SORTEXACT (0x8)

#define WINED3DDEVCAPS_EXECUTESYSTEMMEMORY (0x10)

#define WINED3DDEVCAPS_EXECUTEVIDEOMEMORY (0x20)

#define WINED3DDEVCAPS_TLVERTEXSYSTEMMEMORY (0x40)

#define WINED3DDEVCAPS_TLVERTEXVIDEOMEMORY (0x80)

#define WINED3DDEVCAPS_TEXTURESYSTEMMEMORY (0x100)

#define WINED3DDEVCAPS_TEXTUREVIDEOMEMORY (0x200)

#define WINED3DDEVCAPS_DRAWPRIMTLVERTEX (0x400)

#define WINED3DDEVCAPS_CANRENDERAFTERFLIP (0x800)

#define WINED3DDEVCAPS_TEXTURENONLOCALVIDMEM (0x1000)

#define WINED3DDEVCAPS_DRAWPRIMITIVES2 (0x2000)

#define WINED3DDEVCAPS_SEPARATETEXTUREMEMORIES (0x4000)

#define WINED3DDEVCAPS_DRAWPRIMITIVES2EX (0x8000)

#define WINED3DDEVCAPS_HWTRANSFORMANDLIGHT (0x10000)

#define WINED3DDEVCAPS_CANBLTSYSTONONLOCAL (0x20000)

#define WINED3DDEVCAPS_HWRASTERIZATION (0x80000)

#define WINED3DDEVCAPS_PUREDEVICE (0x100000)

#define WINED3DDEVCAPS_QUINTICRTPATCHES (0x200000)

#define WINED3DDEVCAPS_RTPATCHES (0x400000)

#define WINED3DDEVCAPS_RTPATCHHANDLEZERO (0x800000)

#define WINED3DDEVCAPS_NPATCHES (0x1000000)

#define WINEDDBLTFX_ARITHSTRETCHY (0x1)

#define WINEDDBLTFX_MIRRORLEFTRIGHT (0x2)

#define WINEDDBLTFX_MIRRORUPDOWN (0x4)

#define WINEDDBLTFX_NOTEARING (0x8)

#define WINEDDBLTFX_ROTATE180 (0x10)

#define WINEDDBLTFX_ROTATE270 (0x20)

#define WINEDDBLTFX_ROTATE90 (0x40)

#define WINEDDBLTFX_ZBUFFERRANGE (0x80)

#define WINEDDBLTFX_ZBUFFERBASEDEST (0x100)

#define WINEDDBLT_ALPHADEST (0x1)

#define WINEDDBLT_ALPHADESTCONSTOVERRIDE (0x2)

#define WINEDDBLT_ALPHADESTNEG (0x4)

#define WINEDDBLT_ALPHADESTSURFACEOVERRIDE (0x8)

#define WINEDDBLT_ALPHAEDGEBLEND (0x10)

#define WINEDDBLT_ALPHASRC (0x20)

#define WINEDDBLT_ALPHASRCCONSTOVERRIDE (0x40)

#define WINEDDBLT_ALPHASRCNEG (0x80)

#define WINEDDBLT_ALPHASRCSURFACEOVERRIDE (0x100)

#define WINEDDBLT_ASYNC (0x200)

#define WINEDDBLT_COLORFILL (0x400)

#define WINEDDBLT_DDFX (0x800)

#define WINEDDBLT_DDROPS (0x1000)

#define WINEDDBLT_KEYDEST (0x2000)

#define WINEDDBLT_KEYDESTOVERRIDE (0x4000)

#define WINEDDBLT_KEYSRC (0x8000)

#define WINEDDBLT_KEYSRCOVERRIDE (0x10000)

#define WINEDDBLT_ROP (0x20000)

#define WINEDDBLT_ROTATIONANGLE (0x40000)

#define WINEDDBLT_ZBUFFER (0x80000)

#define WINEDDBLT_ZBUFFERDESTCONSTOVERRIDE (0x100000)

#define WINEDDBLT_ZBUFFERDESTOVERRIDE (0x200000)

#define WINEDDBLT_ZBUFFERSRCCONSTOVERRIDE (0x400000)

#define WINEDDBLT_ZBUFFERSRCOVERRIDE (0x800000)

#define WINEDDBLT_WAIT (0x1000000)

#define WINEDDBLT_DEPTHFILL (0x2000000)

#define WINEDDBLT_DONOTWAIT (0x8000000)

#define WINEDDBLTFAST_NOCOLORKEY (0x0)

#define WINEDDBLTFAST_SRCCOLORKEY (0x1)

#define WINEDDBLTFAST_DESTCOLORKEY (0x2)

#define WINEDDBLTFAST_WAIT (0x10)

#define WINEDDBLTFAST_DONOTWAIT (0x20)

#define WINEDDSD_CAPS (0x1)

#define WINEDDSD_HEIGHT (0x2)

#define WINEDDSD_WIDTH (0x4)

#define WINEDDSD_PITCH (0x8)

#define WINEDDSD_BACKBUFFERCOUNT (0x20)

#define WINEDDSD_ZBUFFERBITDEPTH (0x40)

#define WINEDDSD_ALPHABITDEPTH (0x80)

#define WINEDDSD_LPSURFACE (0x800)

#define WINEDDSD_PIXELFORMAT (0x1000)

#define WINEDDSD_CKDESTOVERLAY (0x2000)

#define WINEDDSD_CKDESTBLT (0x4000)

#define WINEDDSD_CKSRCOVERLAY (0x8000)

#define WINEDDSD_CKSRCBLT (0x10000)

#define WINEDDSD_MIPMAPCOUNT (0x20000)

#define WINEDDSD_REFRESHRATE (0x40000)

#define WINEDDSD_LINEARSIZE (0x80000)

#define WINEDDSD_TEXTURESTAGE (0x100000)

#define WINEDDSD_FVF (0x200000)

#define WINEDDSD_SRCVBHANDLE (0x400000)

#define WINEDDSD_ALL (0x7ff9ee)

#define WINEDDCKEY_COLORSPACE (0x1)

#define WINEDDCKEY_DESTBLT (0x2)

#define WINEDDCKEY_DESTOVERLAY (0x4)

#define WINEDDCKEY_SRCBLT (0x8)

#define WINEDDCKEY_SRCOVERLAY (0x10)

#define WINEDDGBS_CANBLT (0x1)

#define WINEDDGBS_ISBLTDONE (0x2)

#define WINEDDGFS_CANFLIP (0x1)

#define WINEDDGFS_ISFLIPDONE (0x2)

#define WINEDDFLIP_WAIT (0x1)

#define WINEDDFLIP_EVEN (0x2)

#define WINEDDFLIP_ODD (0x4)

#define WINEDDFLIP_NOVSYNC (0x8)

#define WINEDDFLIP_STEREO (0x10)

#define WINEDDFLIP_DONOTWAIT (0x20)

#define WINEDDFLIP_INTERVAL2 (0x2000000)

#define WINEDDFLIP_INTERVAL3 (0x3000000)

#define WINEDDFLIP_INTERVAL4 (0x4000000)

#define WINEDDOVER_ALPHADEST (0x1)

#define WINEDDOVER_ALPHADESTCONSTOVERRIDE (0x2)

#define WINEDDOVER_ALPHADESTNEG (0x4)

#define WINEDDOVER_ALPHADESTSURFACEOVERRIDE (0x8)

#define WINEDDOVER_ALPHAEDGEBLEND (0x10)

#define WINEDDOVER_ALPHASRC (0x20)

#define WINEDDOVER_ALPHASRCCONSTOVERRIDE (0x40)

#define WINEDDOVER_ALPHASRCNEG (0x80)

#define WINEDDOVER_ALPHASRCSURFACEOVERRIDE (0x100)

#define WINEDDOVER_HIDE (0x200)

#define WINEDDOVER_KEYDEST (0x400)

#define WINEDDOVER_KEYDESTOVERRIDE (0x800)

#define WINEDDOVER_KEYSRC (0x1000)

#define WINEDDOVER_KEYSRCOVERRIDE (0x2000)

#define WINEDDOVER_SHOW (0x4000)

#define WINEDDOVER_ADDDIRTYRECT (0x8000)

#define WINEDDOVER_REFRESHDIRTYRECTS (0x10000)

#define WINEDDOVER_REFRESHALL (0x20000)

#define WINEDDOVER_DDFX (0x80000)

#define WINEDDOVER_AUTOFLIP (0x100000)

#define WINEDDOVER_BOB (0x200000)

#define WINEDDOVER_OVERRIDEBOBWEAVE (0x400000)

#define WINEDDOVER_INTERLEAVED (0x800000)

#define WINEDDSCAPS_RESERVED1 (0x1)

#define WINEDDSCAPS_ALPHA (0x2)

#define WINEDDSCAPS_BACKBUFFER (0x4)

#define WINEDDSCAPS_COMPLEX (0x8)

#define WINEDDSCAPS_FLIP (0x10)

#define WINEDDSCAPS_FRONTBUFFER (0x20)

#define WINEDDSCAPS_OFFSCREENPLAIN (0x40)

#define WINEDDSCAPS_OVERLAY (0x80)

#define WINEDDSCAPS_PALETTE (0x100)

#define WINEDDSCAPS_PRIMARYSURFACE (0x200)

#define WINEDDSCAPS_PRIMARYSURFACELEFT (0x400)

#define WINEDDSCAPS_SYSTEMMEMORY (0x800)

#define WINEDDSCAPS_TEXTURE (0x1000)

#define WINEDDSCAPS_3DDEVICE (0x2000)

#define WINEDDSCAPS_VIDEOMEMORY (0x4000)

#define WINEDDSCAPS_VISIBLE (0x8000)

#define WINEDDSCAPS_WRITEONLY (0x10000)

#define WINEDDSCAPS_ZBUFFER (0x20000)

#define WINEDDSCAPS_OWNDC (0x40000)

#define WINEDDSCAPS_LIVEVIDEO (0x80000)

#define WINEDDSCAPS_HWCODEC (0x100000)

#define WINEDDSCAPS_MODEX (0x200000)

#define WINEDDSCAPS_MIPMAP (0x400000)

#define WINEDDSCAPS_RESERVED2 (0x800000)

#define WINEDDSCAPS_ALLOCONLOAD (0x4000000)

#define WINEDDSCAPS_VIDEOPORT (0x8000000)

#define WINEDDSCAPS_LOCALVIDMEM (0x10000000)

#define WINEDDSCAPS_NONLOCALVIDMEM (0x20000000)

#define WINEDDSCAPS_STANDARDVGAMODE (0x40000000)

#define WINEDDSCAPS_OPTIMIZED (0x80000000)

#define WINEDDCKEYCAPS_DESTBLT (0x1)

#define WINEDDCKEYCAPS_DESTBLTCLRSPACE (0x2)

#define WINEDDCKEYCAPS_DESTBLTCLRSPACEYUV (0x4)

#define WINEDDCKEYCAPS_DESTBLTYUV (0x8)

#define WINEDDCKEYCAPS_DESTOVERLAY (0x10)

#define WINEDDCKEYCAPS_DESTOVERLAYCLRSPACE (0x20)

#define WINEDDCKEYCAPS_DESTOVERLAYCLRSPACEYUV (0x40)

#define WINEDDCKEYCAPS_DESTOVERLAYONEACTIVE (0x80)

#define WINEDDCKEYCAPS_DESTOVERLAYYUV (0x100)

#define WINEDDCKEYCAPS_SRCBLT (0x200)

#define WINEDDCKEYCAPS_SRCBLTCLRSPACE (0x400)

#define WINEDDCKEYCAPS_SRCBLTCLRSPACEYUV (0x800)

#define WINEDDCKEYCAPS_SRCBLTYUV (0x1000)

#define WINEDDCKEYCAPS_SRCOVERLAY (0x2000)

#define WINEDDCKEYCAPS_SRCOVERLAYCLRSPACE (0x4000)

#define WINEDDCKEYCAPS_SRCOVERLAYCLRSPACEYUV (0x8000)

#define WINEDDCKEYCAPS_SRCOVERLAYONEACTIVE (0x10000)

#define WINEDDCKEYCAPS_SRCOVERLAYYUV (0x20000)

#define WINEDDCKEYCAPS_NOCOSTOVERLAY (0x40000)

#define WINEDDFXCAPS_BLTALPHA (0x1)

#define WINEDDFXCAPS_OVERLAYALPHA (0x4)

#define WINEDDFXCAPS_BLTARITHSTRETCHYN (0x10)

#define WINEDDFXCAPS_BLTARITHSTRETCHY (0x20)

#define WINEDDFXCAPS_BLTMIRRORLEFTRIGHT (0x40)

#define WINEDDFXCAPS_BLTMIRRORUPDOWN (0x80)

#define WINEDDFXCAPS_BLTROTATION (0x100)

#define WINEDDFXCAPS_BLTROTATION90 (0x200)

#define WINEDDFXCAPS_BLTSHRINKX (0x400)

#define WINEDDFXCAPS_BLTSHRINKXN (0x800)

#define WINEDDFXCAPS_BLTSHRINKY (0x1000)

#define WINEDDFXCAPS_BLTSHRINKYN (0x2000)

#define WINEDDFXCAPS_BLTSTRETCHX (0x4000)

#define WINEDDFXCAPS_BLTSTRETCHXN (0x8000)

#define WINEDDFXCAPS_BLTSTRETCHY (0x10000)

#define WINEDDFXCAPS_BLTSTRETCHYN (0x20000)

#define WINEDDFXCAPS_OVERLAYARITHSTRETCHY (0x40000)

#define WINEDDFXCAPS_OVERLAYARITHSTRETCHYN (0x8)

#define WINEDDFXCAPS_OVERLAYSHRINKX (0x80000)

#define WINEDDFXCAPS_OVERLAYSHRINKXN (0x100000)

#define WINEDDFXCAPS_OVERLAYSHRINKY (0x200000)

#define WINEDDFXCAPS_OVERLAYSHRINKYN (0x400000)

#define WINEDDFXCAPS_OVERLAYSTRETCHX (0x800000)

#define WINEDDFXCAPS_OVERLAYSTRETCHXN (0x1000000)

#define WINEDDFXCAPS_OVERLAYSTRETCHY (0x2000000)

#define WINEDDFXCAPS_OVERLAYSTRETCHYN (0x4000000)

#define WINEDDFXCAPS_OVERLAYMIRRORLEFTRIGHT (0x8000000)

#define WINEDDFXCAPS_OVERLAYMIRRORUPDOWN (0x10000000)

#define WINEDDCAPS_3D (0x1)

#define WINEDDCAPS_ALIGNBOUNDARYDEST (0x2)

#define WINEDDCAPS_ALIGNSIZEDEST (0x4)

#define WINEDDCAPS_ALIGNBOUNDARYSRC (0x8)

#define WINEDDCAPS_ALIGNSIZESRC (0x10)

#define WINEDDCAPS_ALIGNSTRIDE (0x20)

#define WINEDDCAPS_BLT (0x40)

#define WINEDDCAPS_BLTQUEUE (0x80)

#define WINEDDCAPS_BLTFOURCC (0x100)

#define WINEDDCAPS_BLTSTRETCH (0x200)

#define WINEDDCAPS_GDI (0x400)

#define WINEDDCAPS_OVERLAY (0x800)

#define WINEDDCAPS_OVERLAYCANTCLIP (0x1000)

#define WINEDDCAPS_OVERLAYFOURCC (0x2000)

#define WINEDDCAPS_OVERLAYSTRETCH (0x4000)

#define WINEDDCAPS_PALETTE (0x8000)

#define WINEDDCAPS_PALETTEVSYNC (0x10000)

#define WINEDDCAPS_READSCANLINE (0x20000)

#define WINEDDCAPS_STEREOVIEW (0x40000)

#define WINEDDCAPS_VBI (0x80000)

#define WINEDDCAPS_ZBLTS (0x100000)

#define WINEDDCAPS_ZOVERLAYS (0x200000)

#define WINEDDCAPS_COLORKEY (0x400000)

#define WINEDDCAPS_ALPHA (0x800000)

#define WINEDDCAPS_COLORKEYHWASSIST (0x1000000)

#define WINEDDCAPS_NOHARDWARE (0x2000000)

#define WINEDDCAPS_BLTCOLORFILL (0x4000000)

#define WINEDDCAPS_BANKSWITCHED (0x8000000)

#define WINEDDCAPS_BLTDEPTHFILL (0x10000000)

#define WINEDDCAPS_CANCLIP (0x20000000)

#define WINEDDCAPS_CANCLIPSTRETCHED (0x40000000)

#define WINEDDCAPS_CANBLTSYSMEM (0x80000000)

#define WINEDDCAPS2_CERTIFIED (0x1)

#define WINEDDCAPS2_NO2DDURING3DSCENE (0x2)

#define WINEDDCAPS2_VIDEOPORT (0x4)

#define WINEDDCAPS2_AUTOFLIPOVERLAY (0x8)

#define WINEDDCAPS2_CANBOBINTERLEAVED (0x10)

#define WINEDDCAPS2_CANBOBNONINTERLEAVED (0x20)

#define WINEDDCAPS2_COLORCONTROLOVERLAY (0x40)

#define WINEDDCAPS2_COLORCONTROLPRIMARY (0x80)

#define WINEDDCAPS2_CANDROPZ16BIT (0x100)

#define WINEDDCAPS2_NONLOCALVIDMEM (0x200)

#define WINEDDCAPS2_NONLOCALVIDMEMCAPS (0x400)

#define WINEDDCAPS2_NOPAGELOCKREQUIRED (0x800)

#define WINEDDCAPS2_WIDESURFACES (0x1000)

#define WINEDDCAPS2_CANFLIPODDEVEN (0x2000)

#define WINEDDCAPS2_CANBOBHARDWARE (0x4000)

#define WINEDDCAPS2_COPYFOURCC (0x8000)

#define WINEDDCAPS2_PRIMARYGAMMA (0x20000)

#define WINEDDCAPS2_CANRENDERWINDOWED (0x80000)

#define WINEDDCAPS2_CANCALIBRATEGAMMA (0x100000)

#define WINEDDCAPS2_FLIPINTERVAL (0x200000)

#define WINEDDCAPS2_FLIPNOVSYNC (0x400000)

#define WINEDDCAPS2_CANMANAGETEXTURE (0x800000)

#define WINEDDCAPS2_TEXMANINNONLOCALVIDMEM (0x1000000)

#define WINEDDCAPS2_STEREO (0x2000000)

#define WINEDDCAPS2_SYSTONONLOCAL_AS_SYSTOLOCAL (0x4000000)

#define WINEDDPCAPS_4BIT (0x1)

#define WINEDDPCAPS_8BITENTRIES (0x2)

#define WINEDDPCAPS_8BIT (0x4)

#define WINEDDPCAPS_INITIALIZE (0x8)

#define WINEDDPCAPS_PRIMARYSURFACE (0x10)

#define WINEDDPCAPS_PRIMARYSURFACELEFT (0x20)

#define WINEDDPCAPS_ALLOW256 (0x40)

#define WINEDDPCAPS_VSYNC (0x80)

#define WINEDDPCAPS_1BIT (0x100)

#define WINEDDPCAPS_2BIT (0x200)

#define WINEDDPCAPS_ALPHA (0x400)

typedef struct _WINED3DDISPLAYMODE {
    UINT Width;
    UINT Height;
    UINT RefreshRate;
    WINED3DFORMAT Format;
} WINED3DDISPLAYMODE;
typedef enum _WINED3DSCANLINEORDERING {
  WINED3DSCANLINEORDERING_UNKNOWN    = 0,
  WINED3DSCANLINEORDERING_PROGRESSIVE   = 1,
  WINED3DSCANLINEORDERING_INTERLACED    = 2
} WINED3DSCANLINEORDERING;
typedef struct _WINED3DDISPLAYMODEEX {
    UINT Size;
    UINT Width;
    UINT Height;
    UINT RefreshRate;
    WINED3DFORMAT Format;
    WINED3DSCANLINEORDERING ScanLineOrdering;
} WINED3DDISPLAYMODEEX;
typedef enum _WINED3DDISPLAYROTATION {
  WINED3DDISPLAYROTATION_IDENTITY   = 1,
  WINED3DDISPLAYROTATION_90         = 2,
  WINED3DDISPLAYROTATION_180        = 3,
  WINED3DDISPLAYROTATION_270        = 4
} WINED3DDISPLAYROTATION;
typedef struct _WINED3DCOLORVALUE {
    float r;
    float g;
    float b;
    float a;
} WINED3DCOLORVALUE;
typedef struct _WINED3DVECTOR {
    float x;
    float y;
    float z;
} WINED3DVECTOR;
typedef struct _WINED3DMATRIX {
    union {
        struct {
            float _11;
            float _12;
            float _13;
            float _14;
            float _21;
            float _22;
            float _23;
            float _24;
            float _31;
            float _32;
            float _33;
            float _34;
            float _41;
            float _42;
            float _43;
            float _44;
        } s;
        float m[4][4];
    } u;
} WINED3DMATRIX;
typedef struct _WINED3DRECT {
    LONG x1;
    LONG y1;
    LONG x2;
    LONG y2;
} WINED3DRECT;
typedef struct _WINED3DLIGHT {
    WINED3DLIGHTTYPE Type;
    WINED3DCOLORVALUE Diffuse;
    WINED3DCOLORVALUE Specular;
    WINED3DCOLORVALUE Ambient;
    WINED3DVECTOR Position;
    WINED3DVECTOR Direction;
    float Range;
    float Falloff;
    float Attenuation0;
    float Attenuation1;
    float Attenuation2;
    float Theta;
    float Phi;
} WINED3DLIGHT;
typedef struct _WINED3DMATERIAL {
    WINED3DCOLORVALUE Diffuse;
    WINED3DCOLORVALUE Ambient;
    WINED3DCOLORVALUE Specular;
    WINED3DCOLORVALUE Emissive;
    float Power;
} WINED3DMATERIAL;
typedef struct _WINED3DVIEWPORT {
    DWORD X;
    DWORD Y;
    DWORD Width;
    DWORD Height;
    float MinZ;
    float MaxZ;
} WINED3DVIEWPORT;
typedef struct _WINED3DGAMMARAMP {
    WORD red[256];
    WORD green[256];
    WORD blue[256];
} WINED3DGAMMARAMP;
typedef struct _WINED3DLINEPATTERN {
    WORD wRepeatFactor;
    WORD wLinePattern;
} WINED3DLINEPATTERN;
typedef struct _WINEDD3DRECTPATCH_INFO {
    UINT StartVertexOffsetWidth;
    UINT StartVertexOffsetHeight;
    UINT Width;
    UINT Height;
    UINT Stride;
    WINED3DBASISTYPE Basis;
    WINED3DDEGREETYPE Degree;
} WINED3DRECTPATCH_INFO;
typedef struct _WINED3DTRIPATCH_INFO {
    UINT StartVertexOffset;
    UINT NumVertices;
    WINED3DBASISTYPE Basis;
    WINED3DDEGREETYPE Degree;
} WINED3DTRIPATCH_INFO;
typedef struct _WINED3DADAPTER_IDENTIFIER {
    char *driver;
    UINT driver_size;
    char *description;
    UINT description_size;
    char *device_name;
    UINT device_name_size;
    LARGE_INTEGER driver_version;
    DWORD vendor_id;
    DWORD device_id;
    DWORD subsystem_id;
    DWORD revision;
    GUID device_identifier;
    DWORD whql_level;
    LUID adapter_luid;
    SIZE_T video_memory;
} WINED3DADAPTER_IDENTIFIER;
typedef struct _WINED3DPRESENT_PARAMETERS {
    UINT BackBufferWidth;
    UINT BackBufferHeight;
    WINED3DFORMAT BackBufferFormat;
    UINT BackBufferCount;
    WINED3DMULTISAMPLE_TYPE MultiSampleType;
    DWORD MultiSampleQuality;
    WINED3DSWAPEFFECT SwapEffect;
    HWND hDeviceWindow;
    BOOL Windowed;
    BOOL EnableAutoDepthStencil;
    WINED3DFORMAT AutoDepthStencilFormat;
    DWORD Flags;
    UINT FullScreen_RefreshRateInHz;
    UINT PresentationInterval;
    BOOL AutoRestoreDisplayMode;
#ifdef VBOX_WITH_WDDM
    struct VBOXUHGSMI *pHgsmi;
#endif
} WINED3DPRESENT_PARAMETERS;
typedef struct _WINED3DSURFACE_DESC {
    WINED3DFORMAT format;
    WINED3DRESOURCETYPE resource_type;
    DWORD usage;
    WINED3DPOOL pool;
    UINT size;
    WINED3DMULTISAMPLE_TYPE multisample_type;
    DWORD multisample_quality;
    UINT width;
    UINT height;
} WINED3DSURFACE_DESC;
typedef struct _WINED3DVOLUME_DESC {
    WINED3DFORMAT Format;
    WINED3DRESOURCETYPE Type;
    DWORD Usage;
    WINED3DPOOL Pool;
    UINT Size;
    UINT Width;
    UINT Height;
    UINT Depth;
} WINED3DVOLUME_DESC;
typedef struct _WINED3DCLIPSTATUS {
    DWORD ClipUnion;
    DWORD ClipIntersection;
} WINED3DCLIPSTATUS;
typedef struct _WINED3DVERTEXELEMENT {
    WINED3DFORMAT format;
    WORD input_slot;
    WORD offset;
    UINT output_slot;
    BYTE method;
    BYTE usage;
    BYTE usage_idx;
} WINED3DVERTEXELEMENT;
typedef struct _WINED3DDEVICE_CREATION_PARAMETERS {
    UINT AdapterOrdinal;
    WINED3DDEVTYPE DeviceType;
    HWND hFocusWindow;
    DWORD BehaviorFlags;
} WINED3DDEVICE_CREATION_PARAMETERS;
typedef struct _WINED3DDEVINFO_BANDWIDTHTIMINGS {
    float MaxBandwidthUtilized;
    float FrontEndUploadMemoryUtilizedPercent;
    float VertexRateUtilizedPercent;
    float TriangleSetupRateUtilizedPercent;
    float FillRateUtilizedPercent;
} WINED3DDEVINFO_BANDWIDTHTIMINGS;
typedef struct _WINED3DDEVINFO_CACHEUTILIZATION {
    float TextureCacheHitRate;
    float PostTransformVertexCacheHitRate;
} WINED3DDEVINFO_CACHEUTILIZATION;
typedef struct _WINED3DDEVINFO_INTERFACETIMINGS {
    float WaitingForGPUToUseApplicationResourceTimePercent;
    float WaitingForGPUToAcceptMoreCommandsTimePercent;
    float WaitingForGPUToStayWithinLatencyTimePercent;
    float WaitingForGPUExclusiveResourceTimePercent;
    float WaitingForGPUOtherTimePercent;
} WINED3DDEVINFO_INTERFACETIMINGS;
typedef struct _WINED3DDEVINFO_PIPELINETIMINGS {
    float VertexProcessingTimePercent;
    float PixelProcessingTimePercent;
    float OtherGPUProcessingTimePercent;
    float GPUIdleTimePercent;
} WINED3DDEVINFO_PIPELINETIMINGS;
typedef struct _WINED3DDEVINFO_STAGETIMINGS {
    float MemoryProcessingPercent;
    float ComputationProcessingPercent;
} WINED3DDEVINFO_STAGETIMINGS;
typedef struct _WINED3DRASTER_STATUS {
    BOOL InVBlank;
    UINT ScanLine;
} WINED3DRASTER_STATUS;
typedef struct WINED3DRESOURCESTATS {
    BOOL bThrashing;
    DWORD ApproxBytesDownloaded;
    DWORD NumEvicts;
    DWORD NumVidCreates;
    DWORD LastPri;
    DWORD NumUsed;
    DWORD NumUsedInVidMem;
    DWORD WorkingSet;
    DWORD WorkingSetBytes;
    DWORD TotalManaged;
    DWORD TotalBytes;
} WINED3DRESOURCESTATS;
typedef struct _WINED3DDEVINFO_RESOURCEMANAGER {
    WINED3DRESOURCESTATS stats[7];
} WINED3DDEVINFO_RESOURCEMANAGER;
typedef struct _WINED3DDEVINFO_VERTEXSTATS {
    DWORD NumRenderedTriangles;
    DWORD NumExtraClippingTriangles;
} WINED3DDEVINFO_VERTEXSTATS;
typedef struct _WINED3DLOCKED_RECT {
    INT Pitch;
    void *pBits;
} WINED3DLOCKED_RECT;
typedef struct _WINED3DLOCKED_BOX {
    INT RowPitch;
    INT SlicePitch;
    void *pBits;
} WINED3DLOCKED_BOX;
typedef struct _WINED3DBOX {
    UINT Left;
    UINT Top;
    UINT Right;
    UINT Bottom;
    UINT Front;
    UINT Back;
} WINED3DBOX;
typedef struct WINED3DDEVINFO_VCACHE {
    DWORD Pattern;
    DWORD OptMethod;
    DWORD CacheSize;
    DWORD MagicNumber;
} WINED3DDEVINFO_VCACHE;
typedef struct _WINED3DBUFFER_DESC {
    WINED3DRESOURCETYPE Type;
    DWORD Usage;
    WINED3DPOOL Pool;
    UINT Size;
} WINED3DBUFFER_DESC;
typedef struct WineDirect3DStridedData {
    WINED3DFORMAT format;
    const BYTE *lpData;
    DWORD dwStride;
} WineDirect3DStridedData;
typedef struct WineDirect3DVertexStridedData {
    WineDirect3DStridedData position;
    WineDirect3DStridedData normal;
    WineDirect3DStridedData diffuse;
    WineDirect3DStridedData specular;
    WineDirect3DStridedData texCoords[8];
    BOOL position_transformed;
} WineDirect3DVertexStridedData;
typedef struct _WINED3DVSHADERCAPS2_0 {
    DWORD Caps;
    INT DynamicFlowControlDepth;
    INT NumTemps;
    INT StaticFlowControlDepth;
} WINED3DVSHADERCAPS2_0;
typedef struct _WINED3DPSHADERCAPS2_0 {
    DWORD Caps;
    INT DynamicFlowControlDepth;
    INT NumTemps;
    INT StaticFlowControlDepth;
    INT NumInstructionSlots;
} WINED3DPSHADERCAPS2_0;
typedef struct _WINEDDCAPS {
    DWORD Caps;
    DWORD Caps2;
    DWORD CKeyCaps;
    DWORD FXCaps;
    DWORD FXAlphaCaps;
    DWORD PalCaps;
    DWORD SVCaps;
    DWORD SVBCaps;
    DWORD SVBCKeyCaps;
    DWORD SVBFXCaps;
    DWORD VSBCaps;
    DWORD VSBCKeyCaps;
    DWORD VSBFXCaps;
    DWORD SSBCaps;
    DWORD SSBCKeyCaps;
    DWORD SSBFXCaps;
    DWORD ddsCaps;
    DWORD StrideAlign;
} WINEDDCAPS;
typedef struct _WINED3DCAPS {
    WINED3DDEVTYPE DeviceType;
    UINT AdapterOrdinal;
    DWORD Caps;
    DWORD Caps2;
    DWORD Caps3;
    DWORD PresentationIntervals;
    DWORD CursorCaps;
    DWORD DevCaps;
    DWORD PrimitiveMiscCaps;
    DWORD RasterCaps;
    DWORD ZCmpCaps;
    DWORD SrcBlendCaps;
    DWORD DestBlendCaps;
    DWORD AlphaCmpCaps;
    DWORD ShadeCaps;
    DWORD TextureCaps;
    DWORD TextureFilterCaps;
    DWORD CubeTextureFilterCaps;
    DWORD VolumeTextureFilterCaps;
    DWORD TextureAddressCaps;
    DWORD VolumeTextureAddressCaps;
    DWORD LineCaps;
    DWORD MaxTextureWidth;
    DWORD MaxTextureHeight;
    DWORD MaxVolumeExtent;
    DWORD MaxTextureRepeat;
    DWORD MaxTextureAspectRatio;
    DWORD MaxAnisotropy;
    float MaxVertexW;
    float GuardBandLeft;
    float GuardBandTop;
    float GuardBandRight;
    float GuardBandBottom;
    float ExtentsAdjust;
    DWORD StencilCaps;
    DWORD FVFCaps;
    DWORD TextureOpCaps;
    DWORD MaxTextureBlendStages;
    DWORD MaxSimultaneousTextures;
    DWORD VertexProcessingCaps;
    DWORD MaxActiveLights;
    DWORD MaxUserClipPlanes;
    DWORD MaxVertexBlendMatrices;
    DWORD MaxVertexBlendMatrixIndex;
    float MaxPointSize;
    DWORD MaxPrimitiveCount;
    DWORD MaxVertexIndex;
    DWORD MaxStreams;
    DWORD MaxStreamStride;
    DWORD VertexShaderVersion;
    DWORD MaxVertexShaderConst;
    DWORD PixelShaderVersion;
    float PixelShader1xMaxValue;
    DWORD DevCaps2;
    float MaxNpatchTessellationLevel;
    DWORD Reserved5;
    UINT MasterAdapterOrdinal;
    UINT AdapterOrdinalInGroup;
    UINT NumberOfAdaptersInGroup;
    DWORD DeclTypes;
    DWORD NumSimultaneousRTs;
    DWORD StretchRectFilterCaps;
    WINED3DVSHADERCAPS2_0 VS20Caps;
    WINED3DPSHADERCAPS2_0 PS20Caps;
    DWORD VertexTextureFilterCaps;
    DWORD MaxVShaderInstructionsExecuted;
    DWORD MaxPShaderInstructionsExecuted;
    DWORD MaxVertexShader30InstructionSlots;
    DWORD MaxPixelShader30InstructionSlots;
    DWORD Reserved2;
    DWORD Reserved3;
    WINEDDCAPS DirectDrawCaps;
} WINED3DCAPS;
typedef struct _WINEDDCOLORKEY {
    DWORD dwColorSpaceLowValue;
    DWORD dwColorSpaceHighValue;
} WINEDDCOLORKEY;
typedef struct _WINEDDCOLORKEY *LPWINEDDCOLORKEY;
typedef struct _WINEDDBLTFX {
    DWORD dwSize;
    DWORD dwDDFX;
    DWORD dwROP;
    DWORD dwDDROP;
    DWORD dwRotationAngle;
    DWORD dwZBufferOpCode;
    DWORD dwZBufferLow;
    DWORD dwZBufferHigh;
    DWORD dwZBufferBaseDest;
    DWORD dwZDestConstBitDepth;
    union {
        DWORD dwZDestConst;
        struct IWineD3DSurface *lpDDSZBufferDest;
    } DUMMYUNIONNAME1;
    DWORD dwZSrcConstBitDepth;
    union {
        DWORD dwZSrcConst;
        struct IWineD3DSurface *lpDDSZBufferSrc;
    } DUMMYUNIONNAME2;
    DWORD dwAlphaEdgeBlendBitDepth;
    DWORD dwAlphaEdgeBlend;
    DWORD dwReserved;
    DWORD dwAlphaDestConstBitDepth;
    union {
        DWORD dwAlphaDestConst;
        struct IWineD3DSurface *lpDDSAlphaDest;
    } DUMMYUNIONNAME3;
    DWORD dwAlphaSrcConstBitDepth;
    union {
        DWORD dwAlphaSrcConst;
        struct IWineD3DSurface *lpDDSAlphaSrc;
    } DUMMYUNIONNAME4;
    union {
        DWORD dwFillColor;
        DWORD dwFillDepth;
        DWORD dwFillPixel;
        struct IWineD3DSurface *lpDDSPattern;
    } DUMMYUNIONNAME5;
    WINEDDCOLORKEY ddckDestColorkey;
    WINEDDCOLORKEY ddckSrcColorkey;
} WINEDDBLTFX;
typedef struct _WINEDDBLTFX *LPWINEDDBLTFX;
typedef struct _WINEDDOVERLAYFX {
    DWORD dwSize;
    DWORD dwAlphaEdgeBlendBitDepth;
    DWORD dwAlphaEdgeBlend;
    DWORD dwReserved;
    DWORD dwAlphaDestConstBitDepth;
    union {
        DWORD dwAlphaDestConst;
        struct IWineD3DSurface *lpDDSAlphaDest;
    } DUMMYUNIONNAME1;
    DWORD dwAlphaSrcConstBitDepth;
    union {
        DWORD dwAlphaSrcConst;
        struct IWineD3DSurface *lpDDSAlphaSrc;
    } DUMMYUNIONNAME2;
    WINEDDCOLORKEY dckDestColorkey;
    WINEDDCOLORKEY dckSrcColorkey;
    DWORD dwDDFX;
    DWORD dwFlags;
} WINEDDOVERLAYFX;
struct wined3d_buffer_desc {
    UINT byte_width;
    DWORD usage;
    UINT bind_flags;
    UINT cpu_access_flags;
    UINT misc_flags;
};

struct wined3d_shader_signature_element {
    const char *semantic_name;
    UINT semantic_idx;
    enum wined3d_sysval_semantic sysval_semantic;
    DWORD component_type;
    UINT register_idx;
    DWORD mask;
};

struct wined3d_shader_signature {
    UINT element_count;
    struct wined3d_shader_signature_element *elements;
    char *string_data;
};

struct wined3d_parent_ops {
    void (STDMETHODCALLTYPE *wined3d_object_destroyed)(void *parent);
};

#ifndef __IWineD3DResource_FWD_DEFINED__
#define __IWineD3DResource_FWD_DEFINED__
typedef interface IWineD3DResource IWineD3DResource;
#endif

#ifndef __IWineD3DSurface_FWD_DEFINED__
#define __IWineD3DSurface_FWD_DEFINED__
typedef interface IWineD3DSurface IWineD3DSurface;
#endif

#ifndef __IWineD3DVolume_FWD_DEFINED__
#define __IWineD3DVolume_FWD_DEFINED__
typedef interface IWineD3DVolume IWineD3DVolume;
#endif

#ifndef __IWineD3DSwapChain_FWD_DEFINED__
#define __IWineD3DSwapChain_FWD_DEFINED__
typedef interface IWineD3DSwapChain IWineD3DSwapChain;
#endif

#ifndef __IWineD3DDevice_FWD_DEFINED__
#define __IWineD3DDevice_FWD_DEFINED__
typedef interface IWineD3DDevice IWineD3DDevice;
#endif

/*****************************************************************************
 * IWineD3DDeviceParent interface
 */
#ifndef __IWineD3DDeviceParent_INTERFACE_DEFINED__
#define __IWineD3DDeviceParent_INTERFACE_DEFINED__

DEFINE_GUID(IID_IWineD3DDeviceParent, 0xaeb62dfc, 0xbdcb, 0x4f02, 0x95,0x19, 0x1e,0xee,0xa0,0x0c,0x15,0xcd);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface IWineD3DDeviceParent : public IUnknown
{
    virtual void STDMETHODCALLTYPE WineD3DDeviceCreated(
        IWineD3DDevice *device) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateSurface(
        IUnknown *superior,
        UINT width,
        UINT height,
        WINED3DFORMAT format,
        DWORD usage,
        WINED3DPOOL pool,
        UINT level,
        WINED3DCUBEMAP_FACES face,
        IWineD3DSurface **surface) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateRenderTarget(
        IUnknown *superior,
        UINT width,
        UINT height,
        WINED3DFORMAT format,
        WINED3DMULTISAMPLE_TYPE multisample_type,
        DWORD multisample_quality,
        BOOL lockable,
        IWineD3DSurface **surface) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateDepthStencilSurface(
        IUnknown *superior,
        UINT width,
        UINT height,
        WINED3DFORMAT format,
        WINED3DMULTISAMPLE_TYPE multisample_type,
        DWORD multisample_quality,
        BOOL discard,
        IWineD3DSurface **surface) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateVolume(
        IUnknown *superior,
        UINT width,
        UINT height,
        UINT depth,
        WINED3DFORMAT format,
        WINED3DPOOL pool,
        DWORD usage,
        IWineD3DVolume **volume
#ifdef VBOX_WITH_WDDM
        , HANDLE *shared_handle
        , void *pvClientMem
#endif
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateSwapChain(
        WINED3DPRESENT_PARAMETERS *present_parameters,
        IWineD3DSwapChain **swapchain) = 0;

};
#else
typedef struct IWineD3DDeviceParentVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IWineD3DDeviceParent* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IWineD3DDeviceParent* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IWineD3DDeviceParent* This);

    /*** IWineD3DDeviceParent methods ***/
    void (STDMETHODCALLTYPE *WineD3DDeviceCreated)(
        IWineD3DDeviceParent* This,
        IWineD3DDevice *device);

    HRESULT (STDMETHODCALLTYPE *CreateSurface)(
        IWineD3DDeviceParent* This,
        IUnknown *superior,
        UINT width,
        UINT height,
        WINED3DFORMAT format,
        DWORD usage,
        WINED3DPOOL pool,
        UINT level,
        WINED3DCUBEMAP_FACES face,
        IWineD3DSurface **surface
#ifdef VBOX_WITH_WDDM
        , HANDLE *shared_handle
        , void *pvClientMem
#endif
        );

    HRESULT (STDMETHODCALLTYPE *CreateRenderTarget)(
        IWineD3DDeviceParent* This,
        IUnknown *superior,
        UINT width,
        UINT height,
        WINED3DFORMAT format,
        WINED3DMULTISAMPLE_TYPE multisample_type,
        DWORD multisample_quality,
        BOOL lockable,
        IWineD3DSurface **surface);

    HRESULT (STDMETHODCALLTYPE *CreateDepthStencilSurface)(
        IWineD3DDeviceParent* This,
        IUnknown *superior,
        UINT width,
        UINT height,
        WINED3DFORMAT format,
        WINED3DMULTISAMPLE_TYPE multisample_type,
        DWORD multisample_quality,
        BOOL discard,
        IWineD3DSurface **surface);

    HRESULT (STDMETHODCALLTYPE *CreateVolume)(
        IWineD3DDeviceParent* This,
        IUnknown *superior,
        UINT width,
        UINT height,
        UINT depth,
        WINED3DFORMAT format,
        WINED3DPOOL pool,
        DWORD usage,
        IWineD3DVolume **volume
#ifdef VBOX_WITH_WDDM
        , HANDLE *shared_handle
        , void *pvClientMem
#endif
        );

    HRESULT (STDMETHODCALLTYPE *CreateSwapChain)(
        IWineD3DDeviceParent* This,
        WINED3DPRESENT_PARAMETERS *present_parameters,
        IWineD3DSwapChain **swapchain);

    END_INTERFACE
} IWineD3DDeviceParentVtbl;
interface IWineD3DDeviceParent {
    CONST_VTBL IWineD3DDeviceParentVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IWineD3DDeviceParent_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IWineD3DDeviceParent_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IWineD3DDeviceParent_Release(This) (This)->lpVtbl->Release(This)
/*** IWineD3DDeviceParent methods ***/
#define IWineD3DDeviceParent_WineD3DDeviceCreated(This,device) (This)->lpVtbl->WineD3DDeviceCreated(This,device)
#ifdef VBOX_WITH_WDDM
#define IWineD3DDeviceParent_CreateSurface(This,superior,width,height,format,usage,pool,level,face,surface,shared_handle,pvClientMem) (This)->lpVtbl->CreateSurface(This,superior,width,height,format,usage,pool,level,face,surface,shared_handle,pvClientMem)
#else
#define IWineD3DDeviceParent_CreateSurface(This,superior,width,height,format,usage,pool,level,face,surface) (This)->lpVtbl->CreateSurface(This,superior,width,height,format,usage,pool,level,face,surface)
#endif
#define IWineD3DDeviceParent_CreateRenderTarget(This,superior,width,height,format,multisample_type,multisample_quality,lockable,surface) (This)->lpVtbl->CreateRenderTarget(This,superior,width,height,format,multisample_type,multisample_quality,lockable,surface)
#define IWineD3DDeviceParent_CreateDepthStencilSurface(This,superior,width,height,format,multisample_type,multisample_quality,discard,surface) (This)->lpVtbl->CreateDepthStencilSurface(This,superior,width,height,format,multisample_type,multisample_quality,discard,surface)
#ifdef VBOX_WITH_WDDM
#define IWineD3DDeviceParent_CreateVolume(This,superior,width,height,depth,format,pool,usage,volume,shared_handle,pvClientMem) (This)->lpVtbl->CreateVolume(This,superior,width,height,depth,format,pool,usage,volume,shared_handle,pvClientMem)
#else
#define IWineD3DDeviceParent_CreateVolume(This,superior,width,height,depth,format,pool,usage,volume) (This)->lpVtbl->CreateVolume(This,superior,width,height,depth,format,pool,usage,volume)
#endif
#define IWineD3DDeviceParent_CreateSwapChain(This,present_parameters,swapchain) (This)->lpVtbl->CreateSwapChain(This,present_parameters,swapchain)
#endif

#endif

void STDMETHODCALLTYPE IWineD3DDeviceParent_WineD3DDeviceCreated_Proxy(
    IWineD3DDeviceParent* This,
    IWineD3DDevice *device);
void __RPC_STUB IWineD3DDeviceParent_WineD3DDeviceCreated_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDeviceParent_CreateSurface_Proxy(
    IWineD3DDeviceParent* This,
    IUnknown *superior,
    UINT width,
    UINT height,
    WINED3DFORMAT format,
    DWORD usage,
    WINED3DPOOL pool,
    UINT level,
    WINED3DCUBEMAP_FACES face,
    IWineD3DSurface **surface);
void __RPC_STUB IWineD3DDeviceParent_CreateSurface_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDeviceParent_CreateRenderTarget_Proxy(
    IWineD3DDeviceParent* This,
    IUnknown *superior,
    UINT width,
    UINT height,
    WINED3DFORMAT format,
    WINED3DMULTISAMPLE_TYPE multisample_type,
    DWORD multisample_quality,
    BOOL lockable,
    IWineD3DSurface **surface);
void __RPC_STUB IWineD3DDeviceParent_CreateRenderTarget_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDeviceParent_CreateDepthStencilSurface_Proxy(
    IWineD3DDeviceParent* This,
    IUnknown *superior,
    UINT width,
    UINT height,
    WINED3DFORMAT format,
    WINED3DMULTISAMPLE_TYPE multisample_type,
    DWORD multisample_quality,
    BOOL discard,
    IWineD3DSurface **surface);
void __RPC_STUB IWineD3DDeviceParent_CreateDepthStencilSurface_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDeviceParent_CreateVolume_Proxy(
    IWineD3DDeviceParent* This,
    IUnknown *superior,
    UINT width,
    UINT height,
    UINT depth,
    WINED3DFORMAT format,
    WINED3DPOOL pool,
    DWORD usage,
    IWineD3DVolume **volume);
void __RPC_STUB IWineD3DDeviceParent_CreateVolume_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDeviceParent_CreateSwapChain_Proxy(
    IWineD3DDeviceParent* This,
    WINED3DPRESENT_PARAMETERS *present_parameters,
    IWineD3DSwapChain **swapchain);
void __RPC_STUB IWineD3DDeviceParent_CreateSwapChain_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IWineD3DDeviceParent_INTERFACE_DEFINED__ */

typedef ULONG (STDMETHODCALLTYPE *D3DCB_DESTROYSWAPCHAINFN)(IWineD3DSwapChain *pSwapChain);
typedef HRESULT (STDMETHODCALLTYPE *D3DCB_ENUMRESOURCES)(IWineD3DResource *resource,void *pData);
/*****************************************************************************
 * IWineD3DBase interface
 */
#ifndef __IWineD3DBase_INTERFACE_DEFINED__
#define __IWineD3DBase_INTERFACE_DEFINED__

DEFINE_GUID(IID_IWineD3DBase, 0x46799311, 0x8e0e, 0x40ce, 0xb2,0xec, 0xdd,0xb9,0x9f,0x18,0xfc,0xb4);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface IWineD3DBase : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE GetParent(
        IUnknown **parent) = 0;

};
#else
typedef struct IWineD3DBaseVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IWineD3DBase* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IWineD3DBase* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IWineD3DBase* This);

    /*** IWineD3DBase methods ***/
    HRESULT (STDMETHODCALLTYPE *GetParent)(
        IWineD3DBase* This,
        IUnknown **parent);

    END_INTERFACE
} IWineD3DBaseVtbl;
interface IWineD3DBase {
    CONST_VTBL IWineD3DBaseVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IWineD3DBase_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IWineD3DBase_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IWineD3DBase_Release(This) (This)->lpVtbl->Release(This)
/*** IWineD3DBase methods ***/
#define IWineD3DBase_GetParent(This,parent) (This)->lpVtbl->GetParent(This,parent)
#endif

#endif

HRESULT STDMETHODCALLTYPE IWineD3DBase_GetParent_Proxy(
    IWineD3DBase* This,
    IUnknown **parent);
void __RPC_STUB IWineD3DBase_GetParent_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IWineD3DBase_INTERFACE_DEFINED__ */

/*****************************************************************************
 * IWineD3D interface
 */
#ifndef __IWineD3D_INTERFACE_DEFINED__
#define __IWineD3D_INTERFACE_DEFINED__

DEFINE_GUID(IID_IWineD3D, 0x108f9c44, 0x6f30, 0x11d9, 0xc6,0x87, 0x00,0x04,0x61,0x42,0xc1,0x4f);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface IWineD3D : public IWineD3DBase
{
    virtual UINT STDMETHODCALLTYPE GetAdapterCount(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE RegisterSoftwareDevice(
        void *pInitializeFunction) = 0;

    virtual HMONITOR STDMETHODCALLTYPE GetAdapterMonitor(
        UINT adapter_idx) = 0;

    virtual UINT STDMETHODCALLTYPE GetAdapterModeCount(
        UINT adapter_idx,
        WINED3DFORMAT format) = 0;

    virtual HRESULT STDMETHODCALLTYPE EnumAdapterModes(
        UINT adapter_idx,
        WINED3DFORMAT format,
        UINT mode_idx,
        WINED3DDISPLAYMODE *mode) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetAdapterDisplayMode(
        UINT adapter_idx,
        WINED3DDISPLAYMODE *mode) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetAdapterDisplayModeEx(
        UINT adapter_idx,
        WINED3DDISPLAYMODEEX *mode,
        WINED3DDISPLAYROTATION *rotation) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetAdapterIdentifier(
        UINT adapter_idx,
        DWORD flags,
        WINED3DADAPTER_IDENTIFIER *identifier) = 0;

    virtual HRESULT STDMETHODCALLTYPE CheckDeviceMultiSampleType(
        UINT adapter_idx,
        WINED3DDEVTYPE device_type,
        WINED3DFORMAT surface_format,
        BOOL windowed,
        WINED3DMULTISAMPLE_TYPE multisample_type,
        DWORD *quality_levels) = 0;

    virtual HRESULT STDMETHODCALLTYPE CheckDepthStencilMatch(
        UINT adapter_idx,
        WINED3DDEVTYPE device_type,
        WINED3DFORMAT adapter_format,
        WINED3DFORMAT render_target_format,
        WINED3DFORMAT depth_stencil_format) = 0;

    virtual HRESULT STDMETHODCALLTYPE CheckDeviceType(
        UINT adapter_idx,
        WINED3DDEVTYPE device_type,
        WINED3DFORMAT display_format,
        WINED3DFORMAT backbuffer_format,
        BOOL windowed) = 0;

    virtual HRESULT STDMETHODCALLTYPE CheckDeviceFormat(
        UINT adaper_idx,
        WINED3DDEVTYPE device_type,
        WINED3DFORMAT adapter_format,
        DWORD usage,
        WINED3DRESOURCETYPE resource_type,
        WINED3DFORMAT check_format,
        WINED3DSURFTYPE surface_type) = 0;

    virtual HRESULT STDMETHODCALLTYPE CheckDeviceFormatConversion(
        UINT adapter_idx,
        WINED3DDEVTYPE device_type,
        WINED3DFORMAT source_format,
        WINED3DFORMAT target_format) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetDeviceCaps(
        UINT adapter_idx,
        WINED3DDEVTYPE device_type,
        WINED3DCAPS *caps) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateDevice(
        UINT adapter_idx,
        WINED3DDEVTYPE device_type,
        HWND focus_window,
        DWORD behaviour_flags,
        IUnknown *parent,
        IWineD3DDeviceParent *device_parent,
        IWineD3DDevice **device) = 0;

};
#else
typedef struct IWineD3DVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IWineD3D* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IWineD3D* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IWineD3D* This);

    /*** IWineD3DBase methods ***/
    HRESULT (STDMETHODCALLTYPE *GetParent)(
        IWineD3D* This,
        IUnknown **parent);

    /*** IWineD3D methods ***/
    UINT (STDMETHODCALLTYPE *GetAdapterCount)(
        IWineD3D* This);

    HRESULT (STDMETHODCALLTYPE *RegisterSoftwareDevice)(
        IWineD3D* This,
        void *pInitializeFunction);

    HMONITOR (STDMETHODCALLTYPE *GetAdapterMonitor)(
        IWineD3D* This,
        UINT adapter_idx);

    UINT (STDMETHODCALLTYPE *GetAdapterModeCount)(
        IWineD3D* This,
        UINT adapter_idx,
        WINED3DFORMAT format);

    HRESULT (STDMETHODCALLTYPE *EnumAdapterModes)(
        IWineD3D* This,
        UINT adapter_idx,
        WINED3DFORMAT format,
        UINT mode_idx,
        WINED3DDISPLAYMODE *mode);

    HRESULT (STDMETHODCALLTYPE *GetAdapterDisplayMode)(
        IWineD3D* This,
        UINT adapter_idx,
        WINED3DDISPLAYMODE *mode);

    HRESULT (STDMETHODCALLTYPE *GetAdapterDisplayModeEx)(
        IWineD3D* This,
        UINT adapter_idx,
        WINED3DDISPLAYMODEEX *mode,
        WINED3DDISPLAYROTATION *rotation);

    HRESULT (STDMETHODCALLTYPE *GetAdapterIdentifier)(
        IWineD3D* This,
        UINT adapter_idx,
        DWORD flags,
        WINED3DADAPTER_IDENTIFIER *identifier);

    HRESULT (STDMETHODCALLTYPE *CheckDeviceMultiSampleType)(
        IWineD3D* This,
        UINT adapter_idx,
        WINED3DDEVTYPE device_type,
        WINED3DFORMAT surface_format,
        BOOL windowed,
        WINED3DMULTISAMPLE_TYPE multisample_type,
        DWORD *quality_levels);

    HRESULT (STDMETHODCALLTYPE *CheckDepthStencilMatch)(
        IWineD3D* This,
        UINT adapter_idx,
        WINED3DDEVTYPE device_type,
        WINED3DFORMAT adapter_format,
        WINED3DFORMAT render_target_format,
        WINED3DFORMAT depth_stencil_format);

    HRESULT (STDMETHODCALLTYPE *CheckDeviceType)(
        IWineD3D* This,
        UINT adapter_idx,
        WINED3DDEVTYPE device_type,
        WINED3DFORMAT display_format,
        WINED3DFORMAT backbuffer_format,
        BOOL windowed);

    HRESULT (STDMETHODCALLTYPE *CheckDeviceFormat)(
        IWineD3D* This,
        UINT adaper_idx,
        WINED3DDEVTYPE device_type,
        WINED3DFORMAT adapter_format,
        DWORD usage,
        WINED3DRESOURCETYPE resource_type,
        WINED3DFORMAT check_format,
        WINED3DSURFTYPE surface_type);

    HRESULT (STDMETHODCALLTYPE *CheckDeviceFormatConversion)(
        IWineD3D* This,
        UINT adapter_idx,
        WINED3DDEVTYPE device_type,
        WINED3DFORMAT source_format,
        WINED3DFORMAT target_format);

    HRESULT (STDMETHODCALLTYPE *GetDeviceCaps)(
        IWineD3D* This,
        UINT adapter_idx,
        WINED3DDEVTYPE device_type,
        WINED3DCAPS *caps);

    HRESULT (STDMETHODCALLTYPE *CreateDevice)(
        IWineD3D* This,
        UINT adapter_idx,
        WINED3DDEVTYPE device_type,
        HWND focus_window,
        DWORD behaviour_flags,
        IUnknown *parent,
        IWineD3DDeviceParent *device_parent,
        IWineD3DDevice **device);

    END_INTERFACE
} IWineD3DVtbl;
interface IWineD3D {
    CONST_VTBL IWineD3DVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IWineD3D_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IWineD3D_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IWineD3D_Release(This) (This)->lpVtbl->Release(This)
/*** IWineD3DBase methods ***/
#define IWineD3D_GetParent(This,parent) (This)->lpVtbl->GetParent(This,parent)
/*** IWineD3D methods ***/
#define IWineD3D_GetAdapterCount(This) (This)->lpVtbl->GetAdapterCount(This)
#define IWineD3D_RegisterSoftwareDevice(This,pInitializeFunction) (This)->lpVtbl->RegisterSoftwareDevice(This,pInitializeFunction)
#define IWineD3D_GetAdapterMonitor(This,adapter_idx) (This)->lpVtbl->GetAdapterMonitor(This,adapter_idx)
#define IWineD3D_GetAdapterModeCount(This,adapter_idx,format) (This)->lpVtbl->GetAdapterModeCount(This,adapter_idx,format)
#define IWineD3D_EnumAdapterModes(This,adapter_idx,format,mode_idx,mode) (This)->lpVtbl->EnumAdapterModes(This,adapter_idx,format,mode_idx,mode)
#define IWineD3D_GetAdapterDisplayMode(This,adapter_idx,mode) (This)->lpVtbl->GetAdapterDisplayMode(This,adapter_idx,mode)
#define IWineD3D_GetAdapterDisplayModeEx(This,adapter_idx,mode,rotation) (This)->lpVtbl->GetAdapterDisplayModeEx(This,adapter_idx,mode,rotation)
#define IWineD3D_GetAdapterIdentifier(This,adapter_idx,flags,identifier) (This)->lpVtbl->GetAdapterIdentifier(This,adapter_idx,flags,identifier)
#define IWineD3D_CheckDeviceMultiSampleType(This,adapter_idx,device_type,surface_format,windowed,multisample_type,quality_levels) (This)->lpVtbl->CheckDeviceMultiSampleType(This,adapter_idx,device_type,surface_format,windowed,multisample_type,quality_levels)
#define IWineD3D_CheckDepthStencilMatch(This,adapter_idx,device_type,adapter_format,render_target_format,depth_stencil_format) (This)->lpVtbl->CheckDepthStencilMatch(This,adapter_idx,device_type,adapter_format,render_target_format,depth_stencil_format)
#define IWineD3D_CheckDeviceType(This,adapter_idx,device_type,display_format,backbuffer_format,windowed) (This)->lpVtbl->CheckDeviceType(This,adapter_idx,device_type,display_format,backbuffer_format,windowed)
#define IWineD3D_CheckDeviceFormat(This,adaper_idx,device_type,adapter_format,usage,resource_type,check_format,surface_type) (This)->lpVtbl->CheckDeviceFormat(This,adaper_idx,device_type,adapter_format,usage,resource_type,check_format,surface_type)
#define IWineD3D_CheckDeviceFormatConversion(This,adapter_idx,device_type,source_format,target_format) (This)->lpVtbl->CheckDeviceFormatConversion(This,adapter_idx,device_type,source_format,target_format)
#define IWineD3D_GetDeviceCaps(This,adapter_idx,device_type,caps) (This)->lpVtbl->GetDeviceCaps(This,adapter_idx,device_type,caps)
#define IWineD3D_CreateDevice(This,adapter_idx,device_type,focus_window,behaviour_flags,parent,device_parent,device) (This)->lpVtbl->CreateDevice(This,adapter_idx,device_type,focus_window,behaviour_flags,parent,device_parent,device)
#endif

#endif

UINT STDMETHODCALLTYPE IWineD3D_GetAdapterCount_Proxy(
    IWineD3D* This);
void __RPC_STUB IWineD3D_GetAdapterCount_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3D_RegisterSoftwareDevice_Proxy(
    IWineD3D* This,
    void *pInitializeFunction);
void __RPC_STUB IWineD3D_RegisterSoftwareDevice_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HMONITOR STDMETHODCALLTYPE IWineD3D_GetAdapterMonitor_Proxy(
    IWineD3D* This,
    UINT adapter_idx);
void __RPC_STUB IWineD3D_GetAdapterMonitor_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
UINT STDMETHODCALLTYPE IWineD3D_GetAdapterModeCount_Proxy(
    IWineD3D* This,
    UINT adapter_idx,
    WINED3DFORMAT format);
void __RPC_STUB IWineD3D_GetAdapterModeCount_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3D_EnumAdapterModes_Proxy(
    IWineD3D* This,
    UINT adapter_idx,
    WINED3DFORMAT format,
    UINT mode_idx,
    WINED3DDISPLAYMODE *mode);
void __RPC_STUB IWineD3D_EnumAdapterModes_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3D_GetAdapterDisplayMode_Proxy(
    IWineD3D* This,
    UINT adapter_idx,
    WINED3DDISPLAYMODE *mode);
void __RPC_STUB IWineD3D_GetAdapterDisplayMode_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3D_GetAdapterDisplayModeEx_Proxy(
    IWineD3D* This,
    UINT adapter_idx,
    WINED3DDISPLAYMODEEX *mode,
    WINED3DDISPLAYROTATION *rotation);
void __RPC_STUB IWineD3D_GetAdapterDisplayModeEx_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3D_GetAdapterIdentifier_Proxy(
    IWineD3D* This,
    UINT adapter_idx,
    DWORD flags,
    WINED3DADAPTER_IDENTIFIER *identifier);
void __RPC_STUB IWineD3D_GetAdapterIdentifier_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3D_CheckDeviceMultiSampleType_Proxy(
    IWineD3D* This,
    UINT adapter_idx,
    WINED3DDEVTYPE device_type,
    WINED3DFORMAT surface_format,
    BOOL windowed,
    WINED3DMULTISAMPLE_TYPE multisample_type,
    DWORD *quality_levels);
void __RPC_STUB IWineD3D_CheckDeviceMultiSampleType_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3D_CheckDepthStencilMatch_Proxy(
    IWineD3D* This,
    UINT adapter_idx,
    WINED3DDEVTYPE device_type,
    WINED3DFORMAT adapter_format,
    WINED3DFORMAT render_target_format,
    WINED3DFORMAT depth_stencil_format);
void __RPC_STUB IWineD3D_CheckDepthStencilMatch_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3D_CheckDeviceType_Proxy(
    IWineD3D* This,
    UINT adapter_idx,
    WINED3DDEVTYPE device_type,
    WINED3DFORMAT display_format,
    WINED3DFORMAT backbuffer_format,
    BOOL windowed);
void __RPC_STUB IWineD3D_CheckDeviceType_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3D_CheckDeviceFormat_Proxy(
    IWineD3D* This,
    UINT adaper_idx,
    WINED3DDEVTYPE device_type,
    WINED3DFORMAT adapter_format,
    DWORD usage,
    WINED3DRESOURCETYPE resource_type,
    WINED3DFORMAT check_format,
    WINED3DSURFTYPE surface_type);
void __RPC_STUB IWineD3D_CheckDeviceFormat_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3D_CheckDeviceFormatConversion_Proxy(
    IWineD3D* This,
    UINT adapter_idx,
    WINED3DDEVTYPE device_type,
    WINED3DFORMAT source_format,
    WINED3DFORMAT target_format);
void __RPC_STUB IWineD3D_CheckDeviceFormatConversion_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3D_GetDeviceCaps_Proxy(
    IWineD3D* This,
    UINT adapter_idx,
    WINED3DDEVTYPE device_type,
    WINED3DCAPS *caps);
void __RPC_STUB IWineD3D_GetDeviceCaps_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3D_CreateDevice_Proxy(
    IWineD3D* This,
    UINT adapter_idx,
    WINED3DDEVTYPE device_type,
    HWND focus_window,
    DWORD behaviour_flags,
    IUnknown *parent,
    IWineD3DDeviceParent *device_parent,
    IWineD3DDevice **device);
void __RPC_STUB IWineD3D_CreateDevice_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IWineD3D_INTERFACE_DEFINED__ */

/*****************************************************************************
 * IWineD3DResource interface
 */
#ifndef __IWineD3DResource_INTERFACE_DEFINED__
#define __IWineD3DResource_INTERFACE_DEFINED__

DEFINE_GUID(IID_IWineD3DResource, 0x1f3bfb34, 0x6f30, 0x11d9, 0xc6,0x87, 0x00,0x04,0x61,0x42,0xc1,0x4f);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface IWineD3DResource : public IWineD3DBase
{
    virtual HRESULT STDMETHODCALLTYPE SetPrivateData(
        REFGUID guid,
        const void *data,
        DWORD data_size,
        DWORD flags) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetPrivateData(
        REFGUID guid,
        void *data,
        DWORD *data_size) = 0;

    virtual HRESULT STDMETHODCALLTYPE FreePrivateData(
        REFGUID guid) = 0;

    virtual DWORD STDMETHODCALLTYPE SetPriority(
        DWORD new_priority) = 0;

    virtual DWORD STDMETHODCALLTYPE GetPriority(
        ) = 0;

    virtual void STDMETHODCALLTYPE PreLoad(
        ) = 0;

    virtual void STDMETHODCALLTYPE UnLoad(
        ) = 0;

    virtual WINED3DRESOURCETYPE STDMETHODCALLTYPE GetType(
        ) = 0;

};
#else
typedef struct IWineD3DResourceVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IWineD3DResource* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IWineD3DResource* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IWineD3DResource* This);

    /*** IWineD3DBase methods ***/
    HRESULT (STDMETHODCALLTYPE *GetParent)(
        IWineD3DResource* This,
        IUnknown **parent);

    /*** IWineD3DResource methods ***/
    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        IWineD3DResource* This,
        REFGUID guid,
        const void *data,
        DWORD data_size,
        DWORD flags);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        IWineD3DResource* This,
        REFGUID guid,
        void *data,
        DWORD *data_size);

    HRESULT (STDMETHODCALLTYPE *FreePrivateData)(
        IWineD3DResource* This,
        REFGUID guid);

    DWORD (STDMETHODCALLTYPE *SetPriority)(
        IWineD3DResource* This,
        DWORD new_priority);

    DWORD (STDMETHODCALLTYPE *GetPriority)(
        IWineD3DResource* This);

    void (STDMETHODCALLTYPE *PreLoad)(
        IWineD3DResource* This);

    void (STDMETHODCALLTYPE *UnLoad)(
        IWineD3DResource* This);

    WINED3DRESOURCETYPE (STDMETHODCALLTYPE *GetType)(
        IWineD3DResource* This);

#ifdef VBOX_WITH_WDDM
    HRESULT (STDMETHODCALLTYPE *SetShRcState)(
        IWineD3DResource* This,
        VBOXWINEEX_SHRC_STATE enmState);
#endif

    END_INTERFACE
} IWineD3DResourceVtbl;
interface IWineD3DResource {
    CONST_VTBL IWineD3DResourceVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IWineD3DResource_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IWineD3DResource_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IWineD3DResource_Release(This) (This)->lpVtbl->Release(This)
/*** IWineD3DBase methods ***/
#define IWineD3DResource_GetParent(This,parent) (This)->lpVtbl->GetParent(This,parent)
/*** IWineD3DResource methods ***/
#define IWineD3DResource_SetPrivateData(This,guid,data,data_size,flags) (This)->lpVtbl->SetPrivateData(This,guid,data,data_size,flags)
#define IWineD3DResource_GetPrivateData(This,guid,data,data_size) (This)->lpVtbl->GetPrivateData(This,guid,data,data_size)
#define IWineD3DResource_FreePrivateData(This,guid) (This)->lpVtbl->FreePrivateData(This,guid)
#define IWineD3DResource_SetPriority(This,new_priority) (This)->lpVtbl->SetPriority(This,new_priority)
#define IWineD3DResource_GetPriority(This) (This)->lpVtbl->GetPriority(This)
#define IWineD3DResource_PreLoad(This) (This)->lpVtbl->PreLoad(This)
#define IWineD3DResource_UnLoad(This) (This)->lpVtbl->UnLoad(This)
#define IWineD3DResource_GetType(This) (This)->lpVtbl->GetType(This)
# ifdef VBOX_WITH_WDDM
#  define IWineD3DResource_SetShRcState(This, enmState) (This)->lpVtbl->SetShRcState(This, enmState)
# endif
#endif

#endif

HRESULT STDMETHODCALLTYPE IWineD3DResource_SetPrivateData_Proxy(
    IWineD3DResource* This,
    REFGUID guid,
    const void *data,
    DWORD data_size,
    DWORD flags);
void __RPC_STUB IWineD3DResource_SetPrivateData_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DResource_GetPrivateData_Proxy(
    IWineD3DResource* This,
    REFGUID guid,
    void *data,
    DWORD *data_size);
void __RPC_STUB IWineD3DResource_GetPrivateData_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DResource_FreePrivateData_Proxy(
    IWineD3DResource* This,
    REFGUID guid);
void __RPC_STUB IWineD3DResource_FreePrivateData_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
DWORD STDMETHODCALLTYPE IWineD3DResource_SetPriority_Proxy(
    IWineD3DResource* This,
    DWORD new_priority);
void __RPC_STUB IWineD3DResource_SetPriority_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
DWORD STDMETHODCALLTYPE IWineD3DResource_GetPriority_Proxy(
    IWineD3DResource* This);
void __RPC_STUB IWineD3DResource_GetPriority_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE IWineD3DResource_PreLoad_Proxy(
    IWineD3DResource* This);
void __RPC_STUB IWineD3DResource_PreLoad_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE IWineD3DResource_UnLoad_Proxy(
    IWineD3DResource* This);
void __RPC_STUB IWineD3DResource_UnLoad_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
WINED3DRESOURCETYPE STDMETHODCALLTYPE IWineD3DResource_GetType_Proxy(
    IWineD3DResource* This);
void __RPC_STUB IWineD3DResource_GetType_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IWineD3DResource_INTERFACE_DEFINED__ */

/*****************************************************************************
 * IWineD3DRendertargetView interface
 */
#ifndef __IWineD3DRendertargetView_INTERFACE_DEFINED__
#define __IWineD3DRendertargetView_INTERFACE_DEFINED__

DEFINE_GUID(IID_IWineD3DRendertargetView, 0xf7d8abf4, 0xfb93, 0x43e4, 0x9c,0x96, 0x46,0x18,0xcf,0x9b,0x3c,0xbc);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface IWineD3DRendertargetView : public IWineD3DBase
{
    virtual HRESULT STDMETHODCALLTYPE GetResource(
        IWineD3DResource **resource) = 0;

};
#else
typedef struct IWineD3DRendertargetViewVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IWineD3DRendertargetView* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IWineD3DRendertargetView* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IWineD3DRendertargetView* This);

    /*** IWineD3DBase methods ***/
    HRESULT (STDMETHODCALLTYPE *GetParent)(
        IWineD3DRendertargetView* This,
        IUnknown **parent);

    /*** IWineD3DRendertargetView methods ***/
    HRESULT (STDMETHODCALLTYPE *GetResource)(
        IWineD3DRendertargetView* This,
        IWineD3DResource **resource);

    END_INTERFACE
} IWineD3DRendertargetViewVtbl;
interface IWineD3DRendertargetView {
    CONST_VTBL IWineD3DRendertargetViewVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IWineD3DRendertargetView_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IWineD3DRendertargetView_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IWineD3DRendertargetView_Release(This) (This)->lpVtbl->Release(This)
/*** IWineD3DBase methods ***/
#define IWineD3DRendertargetView_GetParent(This,parent) (This)->lpVtbl->GetParent(This,parent)
/*** IWineD3DRendertargetView methods ***/
#define IWineD3DRendertargetView_GetResource(This,resource) (This)->lpVtbl->GetResource(This,resource)
#endif

#endif

HRESULT STDMETHODCALLTYPE IWineD3DRendertargetView_GetResource_Proxy(
    IWineD3DRendertargetView* This,
    IWineD3DResource **resource);
void __RPC_STUB IWineD3DRendertargetView_GetResource_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IWineD3DRendertargetView_INTERFACE_DEFINED__ */

/*****************************************************************************
 * IWineD3DPalette interface
 */
#ifndef __IWineD3DPalette_INTERFACE_DEFINED__
#define __IWineD3DPalette_INTERFACE_DEFINED__

DEFINE_GUID(IID_IWineD3DPalette, 0xf756720c, 0x32b9, 0x4439, 0xb5,0xa3, 0x1d,0x6c,0x97,0x03,0x7d,0x9e);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface IWineD3DPalette : public IWineD3DBase
{
    virtual HRESULT STDMETHODCALLTYPE GetEntries(
        DWORD flags,
        DWORD start,
        DWORD count,
        PALETTEENTRY *entries) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetCaps(
        DWORD *caps) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetEntries(
        DWORD flags,
        DWORD start,
        DWORD count,
        const PALETTEENTRY *entries) = 0;

};
#else
typedef struct IWineD3DPaletteVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IWineD3DPalette* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IWineD3DPalette* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IWineD3DPalette* This);

    /*** IWineD3DBase methods ***/
    HRESULT (STDMETHODCALLTYPE *GetParent)(
        IWineD3DPalette* This,
        IUnknown **parent);

    /*** IWineD3DPalette methods ***/
    HRESULT (STDMETHODCALLTYPE *GetEntries)(
        IWineD3DPalette* This,
        DWORD flags,
        DWORD start,
        DWORD count,
        PALETTEENTRY *entries);

    HRESULT (STDMETHODCALLTYPE *GetCaps)(
        IWineD3DPalette* This,
        DWORD *caps);

    HRESULT (STDMETHODCALLTYPE *SetEntries)(
        IWineD3DPalette* This,
        DWORD flags,
        DWORD start,
        DWORD count,
        const PALETTEENTRY *entries);

    END_INTERFACE
} IWineD3DPaletteVtbl;
interface IWineD3DPalette {
    CONST_VTBL IWineD3DPaletteVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IWineD3DPalette_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IWineD3DPalette_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IWineD3DPalette_Release(This) (This)->lpVtbl->Release(This)
/*** IWineD3DBase methods ***/
#define IWineD3DPalette_GetParent(This,parent) (This)->lpVtbl->GetParent(This,parent)
/*** IWineD3DPalette methods ***/
#define IWineD3DPalette_GetEntries(This,flags,start,count,entries) (This)->lpVtbl->GetEntries(This,flags,start,count,entries)
#define IWineD3DPalette_GetCaps(This,caps) (This)->lpVtbl->GetCaps(This,caps)
#define IWineD3DPalette_SetEntries(This,flags,start,count,entries) (This)->lpVtbl->SetEntries(This,flags,start,count,entries)
#endif

#endif

HRESULT STDMETHODCALLTYPE IWineD3DPalette_GetEntries_Proxy(
    IWineD3DPalette* This,
    DWORD flags,
    DWORD start,
    DWORD count,
    PALETTEENTRY *entries);
void __RPC_STUB IWineD3DPalette_GetEntries_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DPalette_GetCaps_Proxy(
    IWineD3DPalette* This,
    DWORD *caps);
void __RPC_STUB IWineD3DPalette_GetCaps_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DPalette_SetEntries_Proxy(
    IWineD3DPalette* This,
    DWORD flags,
    DWORD start,
    DWORD count,
    const PALETTEENTRY *entries);
void __RPC_STUB IWineD3DPalette_SetEntries_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IWineD3DPalette_INTERFACE_DEFINED__ */

/*****************************************************************************
 * IWineD3DClipper interface
 */
#ifndef __IWineD3DClipper_INTERFACE_DEFINED__
#define __IWineD3DClipper_INTERFACE_DEFINED__

DEFINE_GUID(IID_IWineD3DClipper, 0x8f2bceb1, 0xd338, 0x488c, 0xab,0x7f, 0x0e,0xc9,0x80,0xbf,0x5d,0x2d);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface IWineD3DClipper : public IWineD3DBase
{
    virtual HRESULT STDMETHODCALLTYPE GetClipList(
        const RECT *rect,
        RGNDATA *clip_list,
        DWORD *clip_list_size) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetHWnd(
        HWND *hwnd) = 0;

    virtual HRESULT STDMETHODCALLTYPE IsClipListChanged(
        BOOL *changed) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetClipList(
        const RGNDATA *clip_list,
        DWORD flags) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetHWnd(
        DWORD flags,
        HWND hwnd) = 0;

};
#else
typedef struct IWineD3DClipperVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IWineD3DClipper* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IWineD3DClipper* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IWineD3DClipper* This);

    /*** IWineD3DBase methods ***/
    HRESULT (STDMETHODCALLTYPE *GetParent)(
        IWineD3DClipper* This,
        IUnknown **parent);

    /*** IWineD3DClipper methods ***/
    HRESULT (STDMETHODCALLTYPE *GetClipList)(
        IWineD3DClipper* This,
        const RECT *rect,
        RGNDATA *clip_list,
        DWORD *clip_list_size);

    HRESULT (STDMETHODCALLTYPE *GetHWnd)(
        IWineD3DClipper* This,
        HWND *hwnd);

    HRESULT (STDMETHODCALLTYPE *IsClipListChanged)(
        IWineD3DClipper* This,
        BOOL *changed);

    HRESULT (STDMETHODCALLTYPE *SetClipList)(
        IWineD3DClipper* This,
        const RGNDATA *clip_list,
        DWORD flags);

    HRESULT (STDMETHODCALLTYPE *SetHWnd)(
        IWineD3DClipper* This,
        DWORD flags,
        HWND hwnd);

    END_INTERFACE
} IWineD3DClipperVtbl;
interface IWineD3DClipper {
    CONST_VTBL IWineD3DClipperVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IWineD3DClipper_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IWineD3DClipper_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IWineD3DClipper_Release(This) (This)->lpVtbl->Release(This)
/*** IWineD3DBase methods ***/
#define IWineD3DClipper_GetParent(This,parent) (This)->lpVtbl->GetParent(This,parent)
/*** IWineD3DClipper methods ***/
#define IWineD3DClipper_GetClipList(This,rect,clip_list,clip_list_size) (This)->lpVtbl->GetClipList(This,rect,clip_list,clip_list_size)
#define IWineD3DClipper_GetHWnd(This,hwnd) (This)->lpVtbl->GetHWnd(This,hwnd)
#define IWineD3DClipper_IsClipListChanged(This,changed) (This)->lpVtbl->IsClipListChanged(This,changed)
#define IWineD3DClipper_SetClipList(This,clip_list,flags) (This)->lpVtbl->SetClipList(This,clip_list,flags)
#define IWineD3DClipper_SetHWnd(This,flags,hwnd) (This)->lpVtbl->SetHWnd(This,flags,hwnd)
#endif

#endif

HRESULT STDMETHODCALLTYPE IWineD3DClipper_GetClipList_Proxy(
    IWineD3DClipper* This,
    const RECT *rect,
    RGNDATA *clip_list,
    DWORD *clip_list_size);
void __RPC_STUB IWineD3DClipper_GetClipList_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DClipper_GetHWnd_Proxy(
    IWineD3DClipper* This,
    HWND *hwnd);
void __RPC_STUB IWineD3DClipper_GetHWnd_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DClipper_IsClipListChanged_Proxy(
    IWineD3DClipper* This,
    BOOL *changed);
void __RPC_STUB IWineD3DClipper_IsClipListChanged_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DClipper_SetClipList_Proxy(
    IWineD3DClipper* This,
    const RGNDATA *clip_list,
    DWORD flags);
void __RPC_STUB IWineD3DClipper_SetClipList_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DClipper_SetHWnd_Proxy(
    IWineD3DClipper* This,
    DWORD flags,
    HWND hwnd);
void __RPC_STUB IWineD3DClipper_SetHWnd_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IWineD3DClipper_INTERFACE_DEFINED__ */

/*****************************************************************************
 * IWineD3DSurface interface
 */
#ifndef __IWineD3DSurface_INTERFACE_DEFINED__
#define __IWineD3DSurface_INTERFACE_DEFINED__

DEFINE_GUID(IID_IWineD3DSurface, 0x37cd5526, 0x6f30, 0x11d9, 0xc6,0x87, 0x00,0x04,0x61,0x42,0xc1,0x4f);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface IWineD3DSurface : public IWineD3DResource
{
    virtual HRESULT STDMETHODCALLTYPE GetContainer(
        REFIID riid,
        void **container) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetDesc(
        WINED3DSURFACE_DESC *desc) = 0;

    virtual HRESULT STDMETHODCALLTYPE LockRect(
        WINED3DLOCKED_RECT *locked_rect,
        const RECT *rect,
        DWORD flags) = 0;

    virtual HRESULT STDMETHODCALLTYPE UnlockRect(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetDC(
        HDC *dc) = 0;

    virtual HRESULT STDMETHODCALLTYPE ReleaseDC(
        HDC dc) = 0;

    virtual HRESULT STDMETHODCALLTYPE Flip(
        IWineD3DSurface *override,
        DWORD flags) = 0;

    virtual HRESULT STDMETHODCALLTYPE Blt(
        const RECT *dst_rect,
        IWineD3DSurface *src_surface,
        const RECT *src_rect,
        DWORD flags,
        const WINEDDBLTFX *blt_fx,
        WINED3DTEXTUREFILTERTYPE filter) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetBltStatus(
        DWORD flags) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetFlipStatus(
        DWORD flags) = 0;

    virtual HRESULT STDMETHODCALLTYPE IsLost(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE Restore(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE BltFast(
        DWORD dst_x,
        DWORD dst_y,
        IWineD3DSurface *src_surface,
        const RECT *src_rect,
        DWORD trans) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetPalette(
        IWineD3DPalette **palette) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetPalette(
        IWineD3DPalette *palette) = 0;

    virtual HRESULT STDMETHODCALLTYPE RealizePalette(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetColorKey(
        DWORD flags,
        const WINEDDCOLORKEY *color_key) = 0;

    virtual DWORD STDMETHODCALLTYPE GetPitch(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetMem(
        void *mem) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetOverlayPosition(
        LONG x,
        LONG y) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetOverlayPosition(
        LONG *x,
        LONG *y) = 0;

    virtual HRESULT STDMETHODCALLTYPE UpdateOverlayZOrder(
        DWORD flags,
        IWineD3DSurface *ref) = 0;

    virtual HRESULT STDMETHODCALLTYPE UpdateOverlay(
        const RECT *src_rect,
        IWineD3DSurface *dst_surface,
        const RECT *dst_rect,
        DWORD flags,
        const WINEDDOVERLAYFX *fx) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetClipper(
        IWineD3DClipper *clipper) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetClipper(
        IWineD3DClipper **clipper) = 0;

    virtual HRESULT STDMETHODCALLTYPE LoadTexture(
        BOOL srgb_mode) = 0;

    virtual void STDMETHODCALLTYPE BindTexture(
        BOOL srgb) = 0;

    virtual HRESULT STDMETHODCALLTYPE SaveSnapshot(
        const char *filename) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetContainer(
        IWineD3DBase *container) = 0;

    virtual const void * STDMETHODCALLTYPE GetData(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetFormat(
        WINED3DFORMAT format) = 0;

    virtual HRESULT STDMETHODCALLTYPE PrivateSetup(
        ) = 0;

    virtual void STDMETHODCALLTYPE ModifyLocation(
        DWORD location,
        BOOL persistent) = 0;

    virtual HRESULT STDMETHODCALLTYPE LoadLocation(
        DWORD location,
        const RECT *rect) = 0;

    virtual WINED3DSURFTYPE STDMETHODCALLTYPE GetImplType(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE DrawOverlay(
        ) = 0;

};
#else
typedef struct IWineD3DSurfaceVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IWineD3DSurface* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IWineD3DSurface* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IWineD3DSurface* This);

    /*** IWineD3DBase methods ***/
    HRESULT (STDMETHODCALLTYPE *GetParent)(
        IWineD3DSurface* This,
        IUnknown **parent);

    /*** IWineD3DResource methods ***/
    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        IWineD3DSurface* This,
        REFGUID guid,
        const void *data,
        DWORD data_size,
        DWORD flags);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        IWineD3DSurface* This,
        REFGUID guid,
        void *data,
        DWORD *data_size);

    HRESULT (STDMETHODCALLTYPE *FreePrivateData)(
        IWineD3DSurface* This,
        REFGUID guid);

    DWORD (STDMETHODCALLTYPE *SetPriority)(
        IWineD3DSurface* This,
        DWORD new_priority);

    DWORD (STDMETHODCALLTYPE *GetPriority)(
        IWineD3DSurface* This);

    void (STDMETHODCALLTYPE *PreLoad)(
        IWineD3DSurface* This);

    void (STDMETHODCALLTYPE *UnLoad)(
        IWineD3DSurface* This);

    WINED3DRESOURCETYPE (STDMETHODCALLTYPE *GetType)(
        IWineD3DSurface* This);

#ifdef VBOX_WITH_WDDM
    HRESULT (STDMETHODCALLTYPE *SetShRcState)(
        IWineD3DResource* This,
        VBOXWINEEX_SHRC_STATE enmState);
#endif

    /*** IWineD3DSurface methods ***/
    HRESULT (STDMETHODCALLTYPE *GetContainer)(
        IWineD3DSurface* This,
        REFIID riid,
        void **container);

    HRESULT (STDMETHODCALLTYPE *GetDesc)(
        IWineD3DSurface* This,
        WINED3DSURFACE_DESC *desc);

    HRESULT (STDMETHODCALLTYPE *LockRect)(
        IWineD3DSurface* This,
        WINED3DLOCKED_RECT *locked_rect,
        const RECT *rect,
        DWORD flags);

    HRESULT (STDMETHODCALLTYPE *UnlockRect)(
        IWineD3DSurface* This);

    HRESULT (STDMETHODCALLTYPE *GetDC)(
        IWineD3DSurface* This,
        HDC *dc);

    HRESULT (STDMETHODCALLTYPE *ReleaseDC)(
        IWineD3DSurface* This,
        HDC dc);

    HRESULT (STDMETHODCALLTYPE *Flip)(
        IWineD3DSurface* This,
        IWineD3DSurface *override,
        DWORD flags);

    HRESULT (STDMETHODCALLTYPE *Blt)(
        IWineD3DSurface* This,
        const RECT *dst_rect,
        IWineD3DSurface *src_surface,
        const RECT *src_rect,
        DWORD flags,
        const WINEDDBLTFX *blt_fx,
        WINED3DTEXTUREFILTERTYPE filter);

    HRESULT (STDMETHODCALLTYPE *GetBltStatus)(
        IWineD3DSurface* This,
        DWORD flags);

    HRESULT (STDMETHODCALLTYPE *GetFlipStatus)(
        IWineD3DSurface* This,
        DWORD flags);

    HRESULT (STDMETHODCALLTYPE *IsLost)(
        IWineD3DSurface* This);

    HRESULT (STDMETHODCALLTYPE *Restore)(
        IWineD3DSurface* This);

    HRESULT (STDMETHODCALLTYPE *BltFast)(
        IWineD3DSurface* This,
        DWORD dst_x,
        DWORD dst_y,
        IWineD3DSurface *src_surface,
        const RECT *src_rect,
        DWORD trans);

    HRESULT (STDMETHODCALLTYPE *GetPalette)(
        IWineD3DSurface* This,
        IWineD3DPalette **palette);

    HRESULT (STDMETHODCALLTYPE *SetPalette)(
        IWineD3DSurface* This,
        IWineD3DPalette *palette);

    HRESULT (STDMETHODCALLTYPE *RealizePalette)(
        IWineD3DSurface* This);

    HRESULT (STDMETHODCALLTYPE *SetColorKey)(
        IWineD3DSurface* This,
        DWORD flags,
        const WINEDDCOLORKEY *color_key);

    DWORD (STDMETHODCALLTYPE *GetPitch)(
        IWineD3DSurface* This);

    HRESULT (STDMETHODCALLTYPE *SetMem)(
        IWineD3DSurface* This,
        void *mem);

    HRESULT (STDMETHODCALLTYPE *SetOverlayPosition)(
        IWineD3DSurface* This,
        LONG x,
        LONG y);

    HRESULT (STDMETHODCALLTYPE *GetOverlayPosition)(
        IWineD3DSurface* This,
        LONG *x,
        LONG *y);

    HRESULT (STDMETHODCALLTYPE *UpdateOverlayZOrder)(
        IWineD3DSurface* This,
        DWORD flags,
        IWineD3DSurface *ref);

    HRESULT (STDMETHODCALLTYPE *UpdateOverlay)(
        IWineD3DSurface* This,
        const RECT *src_rect,
        IWineD3DSurface *dst_surface,
        const RECT *dst_rect,
        DWORD flags,
        const WINEDDOVERLAYFX *fx);

    HRESULT (STDMETHODCALLTYPE *SetClipper)(
        IWineD3DSurface* This,
        IWineD3DClipper *clipper);

    HRESULT (STDMETHODCALLTYPE *GetClipper)(
        IWineD3DSurface* This,
        IWineD3DClipper **clipper);

    HRESULT (STDMETHODCALLTYPE *LoadTexture)(
        IWineD3DSurface* This,
        BOOL srgb_mode);

    void (STDMETHODCALLTYPE *BindTexture)(
        IWineD3DSurface* This,
        BOOL srgb);

    HRESULT (STDMETHODCALLTYPE *SaveSnapshot)(
        IWineD3DSurface* This,
        const char *filename);

    HRESULT (STDMETHODCALLTYPE *SetContainer)(
        IWineD3DSurface* This,
        IWineD3DBase *container);

    const void * (STDMETHODCALLTYPE *GetData)(
        IWineD3DSurface* This);

    HRESULT (STDMETHODCALLTYPE *SetFormat)(
        IWineD3DSurface* This,
        WINED3DFORMAT format);

    HRESULT (STDMETHODCALLTYPE *PrivateSetup)(
        IWineD3DSurface* This);

    void (STDMETHODCALLTYPE *ModifyLocation)(
        IWineD3DSurface* This,
        DWORD location,
        BOOL persistent);

    HRESULT (STDMETHODCALLTYPE *LoadLocation)(
        IWineD3DSurface* This,
        DWORD location,
        const RECT *rect);

    WINED3DSURFTYPE (STDMETHODCALLTYPE *GetImplType)(
        IWineD3DSurface* This);

    HRESULT (STDMETHODCALLTYPE *DrawOverlay)(
        IWineD3DSurface* This);

    END_INTERFACE
} IWineD3DSurfaceVtbl;
interface IWineD3DSurface {
    CONST_VTBL IWineD3DSurfaceVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IWineD3DSurface_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IWineD3DSurface_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IWineD3DSurface_Release(This) (This)->lpVtbl->Release(This)
/*** IWineD3DBase methods ***/
#define IWineD3DSurface_GetParent(This,parent) (This)->lpVtbl->GetParent(This,parent)
/*** IWineD3DResource methods ***/
#define IWineD3DSurface_SetPrivateData(This,guid,data,data_size,flags) (This)->lpVtbl->SetPrivateData(This,guid,data,data_size,flags)
#define IWineD3DSurface_GetPrivateData(This,guid,data,data_size) (This)->lpVtbl->GetPrivateData(This,guid,data,data_size)
#define IWineD3DSurface_FreePrivateData(This,guid) (This)->lpVtbl->FreePrivateData(This,guid)
#define IWineD3DSurface_SetPriority(This,new_priority) (This)->lpVtbl->SetPriority(This,new_priority)
#define IWineD3DSurface_GetPriority(This) (This)->lpVtbl->GetPriority(This)
#define IWineD3DSurface_PreLoad(This) (This)->lpVtbl->PreLoad(This)
#define IWineD3DSurface_UnLoad(This) (This)->lpVtbl->UnLoad(This)
#define IWineD3DSurface_GetType(This) (This)->lpVtbl->GetType(This)
/*** IWineD3DSurface methods ***/
#define IWineD3DSurface_GetContainer(This,riid,container) (This)->lpVtbl->GetContainer(This,riid,container)
#define IWineD3DSurface_GetDesc(This,desc) (This)->lpVtbl->GetDesc(This,desc)
#define IWineD3DSurface_LockRect(This,locked_rect,rect,flags) (This)->lpVtbl->LockRect(This,locked_rect,rect,flags)
#define IWineD3DSurface_UnlockRect(This) (This)->lpVtbl->UnlockRect(This)
#define IWineD3DSurface_GetDC(This,dc) (This)->lpVtbl->GetDC(This,dc)
#define IWineD3DSurface_ReleaseDC(This,dc) (This)->lpVtbl->ReleaseDC(This,dc)
#define IWineD3DSurface_Flip(This,override,flags) (This)->lpVtbl->Flip(This,override,flags)
#define IWineD3DSurface_Blt(This,dst_rect,src_surface,src_rect,flags,blt_fx,filter) (This)->lpVtbl->Blt(This,dst_rect,src_surface,src_rect,flags,blt_fx,filter)
#define IWineD3DSurface_GetBltStatus(This,flags) (This)->lpVtbl->GetBltStatus(This,flags)
#define IWineD3DSurface_GetFlipStatus(This,flags) (This)->lpVtbl->GetFlipStatus(This,flags)
#define IWineD3DSurface_IsLost(This) (This)->lpVtbl->IsLost(This)
#define IWineD3DSurface_Restore(This) (This)->lpVtbl->Restore(This)
#define IWineD3DSurface_BltFast(This,dst_x,dst_y,src_surface,src_rect,trans) (This)->lpVtbl->BltFast(This,dst_x,dst_y,src_surface,src_rect,trans)
#define IWineD3DSurface_GetPalette(This,palette) (This)->lpVtbl->GetPalette(This,palette)
#define IWineD3DSurface_SetPalette(This,palette) (This)->lpVtbl->SetPalette(This,palette)
#define IWineD3DSurface_RealizePalette(This) (This)->lpVtbl->RealizePalette(This)
#define IWineD3DSurface_SetColorKey(This,flags,color_key) (This)->lpVtbl->SetColorKey(This,flags,color_key)
#define IWineD3DSurface_GetPitch(This) (This)->lpVtbl->GetPitch(This)
#define IWineD3DSurface_SetMem(This,mem) (This)->lpVtbl->SetMem(This,mem)
#define IWineD3DSurface_SetOverlayPosition(This,x,y) (This)->lpVtbl->SetOverlayPosition(This,x,y)
#define IWineD3DSurface_GetOverlayPosition(This,x,y) (This)->lpVtbl->GetOverlayPosition(This,x,y)
#define IWineD3DSurface_UpdateOverlayZOrder(This,flags,ref) (This)->lpVtbl->UpdateOverlayZOrder(This,flags,ref)
#define IWineD3DSurface_UpdateOverlay(This,src_rect,dst_surface,dst_rect,flags,fx) (This)->lpVtbl->UpdateOverlay(This,src_rect,dst_surface,dst_rect,flags,fx)
#define IWineD3DSurface_SetClipper(This,clipper) (This)->lpVtbl->SetClipper(This,clipper)
#define IWineD3DSurface_GetClipper(This,clipper) (This)->lpVtbl->GetClipper(This,clipper)
#define IWineD3DSurface_LoadTexture(This,srgb_mode) (This)->lpVtbl->LoadTexture(This,srgb_mode)
#define IWineD3DSurface_BindTexture(This,srgb) (This)->lpVtbl->BindTexture(This,srgb)
#define IWineD3DSurface_SaveSnapshot(This,filename) (This)->lpVtbl->SaveSnapshot(This,filename)
#define IWineD3DSurface_SetContainer(This,container) (This)->lpVtbl->SetContainer(This,container)
#define IWineD3DSurface_GetData(This) (This)->lpVtbl->GetData(This)
#define IWineD3DSurface_SetFormat(This,format) (This)->lpVtbl->SetFormat(This,format)
#define IWineD3DSurface_PrivateSetup(This) (This)->lpVtbl->PrivateSetup(This)
#define IWineD3DSurface_ModifyLocation(This,location,persistent) (This)->lpVtbl->ModifyLocation(This,location,persistent)
#define IWineD3DSurface_LoadLocation(This,location,rect) (This)->lpVtbl->LoadLocation(This,location,rect)
#define IWineD3DSurface_GetImplType(This) (This)->lpVtbl->GetImplType(This)
#define IWineD3DSurface_DrawOverlay(This) (This)->lpVtbl->DrawOverlay(This)
#endif

#endif

HRESULT STDMETHODCALLTYPE IWineD3DSurface_GetContainer_Proxy(
    IWineD3DSurface* This,
    REFIID riid,
    void **container);
void __RPC_STUB IWineD3DSurface_GetContainer_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DSurface_GetDesc_Proxy(
    IWineD3DSurface* This,
    WINED3DSURFACE_DESC *desc);
void __RPC_STUB IWineD3DSurface_GetDesc_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DSurface_LockRect_Proxy(
    IWineD3DSurface* This,
    WINED3DLOCKED_RECT *locked_rect,
    const RECT *rect,
    DWORD flags);
void __RPC_STUB IWineD3DSurface_LockRect_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DSurface_UnlockRect_Proxy(
    IWineD3DSurface* This);
void __RPC_STUB IWineD3DSurface_UnlockRect_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DSurface_GetDC_Proxy(
    IWineD3DSurface* This,
    HDC *dc);
void __RPC_STUB IWineD3DSurface_GetDC_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DSurface_ReleaseDC_Proxy(
    IWineD3DSurface* This,
    HDC dc);
void __RPC_STUB IWineD3DSurface_ReleaseDC_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DSurface_Flip_Proxy(
    IWineD3DSurface* This,
    IWineD3DSurface *override,
    DWORD flags);
void __RPC_STUB IWineD3DSurface_Flip_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DSurface_Blt_Proxy(
    IWineD3DSurface* This,
    const RECT *dst_rect,
    IWineD3DSurface *src_surface,
    const RECT *src_rect,
    DWORD flags,
    const WINEDDBLTFX *blt_fx,
    WINED3DTEXTUREFILTERTYPE filter);
void __RPC_STUB IWineD3DSurface_Blt_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DSurface_GetBltStatus_Proxy(
    IWineD3DSurface* This,
    DWORD flags);
void __RPC_STUB IWineD3DSurface_GetBltStatus_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DSurface_GetFlipStatus_Proxy(
    IWineD3DSurface* This,
    DWORD flags);
void __RPC_STUB IWineD3DSurface_GetFlipStatus_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DSurface_IsLost_Proxy(
    IWineD3DSurface* This);
void __RPC_STUB IWineD3DSurface_IsLost_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DSurface_Restore_Proxy(
    IWineD3DSurface* This);
void __RPC_STUB IWineD3DSurface_Restore_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DSurface_BltFast_Proxy(
    IWineD3DSurface* This,
    DWORD dst_x,
    DWORD dst_y,
    IWineD3DSurface *src_surface,
    const RECT *src_rect,
    DWORD trans);
void __RPC_STUB IWineD3DSurface_BltFast_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DSurface_GetPalette_Proxy(
    IWineD3DSurface* This,
    IWineD3DPalette **palette);
void __RPC_STUB IWineD3DSurface_GetPalette_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DSurface_SetPalette_Proxy(
    IWineD3DSurface* This,
    IWineD3DPalette *palette);
void __RPC_STUB IWineD3DSurface_SetPalette_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DSurface_RealizePalette_Proxy(
    IWineD3DSurface* This);
void __RPC_STUB IWineD3DSurface_RealizePalette_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DSurface_SetColorKey_Proxy(
    IWineD3DSurface* This,
    DWORD flags,
    const WINEDDCOLORKEY *color_key);
void __RPC_STUB IWineD3DSurface_SetColorKey_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
DWORD STDMETHODCALLTYPE IWineD3DSurface_GetPitch_Proxy(
    IWineD3DSurface* This);
void __RPC_STUB IWineD3DSurface_GetPitch_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DSurface_SetMem_Proxy(
    IWineD3DSurface* This,
    void *mem);
void __RPC_STUB IWineD3DSurface_SetMem_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DSurface_SetOverlayPosition_Proxy(
    IWineD3DSurface* This,
    LONG x,
    LONG y);
void __RPC_STUB IWineD3DSurface_SetOverlayPosition_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DSurface_GetOverlayPosition_Proxy(
    IWineD3DSurface* This,
    LONG *x,
    LONG *y);
void __RPC_STUB IWineD3DSurface_GetOverlayPosition_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DSurface_UpdateOverlayZOrder_Proxy(
    IWineD3DSurface* This,
    DWORD flags,
    IWineD3DSurface *ref);
void __RPC_STUB IWineD3DSurface_UpdateOverlayZOrder_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DSurface_UpdateOverlay_Proxy(
    IWineD3DSurface* This,
    const RECT *src_rect,
    IWineD3DSurface *dst_surface,
    const RECT *dst_rect,
    DWORD flags,
    const WINEDDOVERLAYFX *fx);
void __RPC_STUB IWineD3DSurface_UpdateOverlay_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DSurface_SetClipper_Proxy(
    IWineD3DSurface* This,
    IWineD3DClipper *clipper);
void __RPC_STUB IWineD3DSurface_SetClipper_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DSurface_GetClipper_Proxy(
    IWineD3DSurface* This,
    IWineD3DClipper **clipper);
void __RPC_STUB IWineD3DSurface_GetClipper_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DSurface_LoadTexture_Proxy(
    IWineD3DSurface* This,
    BOOL srgb_mode);
void __RPC_STUB IWineD3DSurface_LoadTexture_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE IWineD3DSurface_BindTexture_Proxy(
    IWineD3DSurface* This,
    BOOL srgb);
void __RPC_STUB IWineD3DSurface_BindTexture_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DSurface_SaveSnapshot_Proxy(
    IWineD3DSurface* This,
    const char *filename);
void __RPC_STUB IWineD3DSurface_SaveSnapshot_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DSurface_SetContainer_Proxy(
    IWineD3DSurface* This,
    IWineD3DBase *container);
void __RPC_STUB IWineD3DSurface_SetContainer_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
const void * STDMETHODCALLTYPE IWineD3DSurface_GetData_Proxy(
    IWineD3DSurface* This);
void __RPC_STUB IWineD3DSurface_GetData_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DSurface_SetFormat_Proxy(
    IWineD3DSurface* This,
    WINED3DFORMAT format);
void __RPC_STUB IWineD3DSurface_SetFormat_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DSurface_PrivateSetup_Proxy(
    IWineD3DSurface* This);
void __RPC_STUB IWineD3DSurface_PrivateSetup_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE IWineD3DSurface_ModifyLocation_Proxy(
    IWineD3DSurface* This,
    DWORD location,
    BOOL persistent);
void __RPC_STUB IWineD3DSurface_ModifyLocation_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DSurface_LoadLocation_Proxy(
    IWineD3DSurface* This,
    DWORD location,
    const RECT *rect);
void __RPC_STUB IWineD3DSurface_LoadLocation_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
WINED3DSURFTYPE STDMETHODCALLTYPE IWineD3DSurface_GetImplType_Proxy(
    IWineD3DSurface* This);
void __RPC_STUB IWineD3DSurface_GetImplType_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DSurface_DrawOverlay_Proxy(
    IWineD3DSurface* This);
void __RPC_STUB IWineD3DSurface_DrawOverlay_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IWineD3DSurface_INTERFACE_DEFINED__ */

/*****************************************************************************
 * IWineD3DVolume interface
 */
#ifndef __IWineD3DVolume_INTERFACE_DEFINED__
#define __IWineD3DVolume_INTERFACE_DEFINED__

DEFINE_GUID(IID_IWineD3DVolume, 0x24769ed8, 0x6f30, 0x11d9, 0xc6,0x87, 0x00,0x04,0x61,0x42,0xc1,0x4f);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface IWineD3DVolume : public IWineD3DResource
{
    virtual HRESULT STDMETHODCALLTYPE GetContainer(
        REFIID riid,
        void **container) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetDesc(
        WINED3DVOLUME_DESC *desc) = 0;

    virtual HRESULT STDMETHODCALLTYPE LockBox(
        WINED3DLOCKED_BOX *locked_box,
        const WINED3DBOX *box,
        DWORD flags) = 0;

    virtual HRESULT STDMETHODCALLTYPE UnlockBox(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE LoadTexture(
        int gl_level,
        BOOL srgb_mode) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetContainer(
        IWineD3DBase *container) = 0;

};
#else
typedef struct IWineD3DVolumeVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IWineD3DVolume* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IWineD3DVolume* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IWineD3DVolume* This);

    /*** IWineD3DBase methods ***/
    HRESULT (STDMETHODCALLTYPE *GetParent)(
        IWineD3DVolume* This,
        IUnknown **parent);

    /*** IWineD3DResource methods ***/
    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        IWineD3DVolume* This,
        REFGUID guid,
        const void *data,
        DWORD data_size,
        DWORD flags);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        IWineD3DVolume* This,
        REFGUID guid,
        void *data,
        DWORD *data_size);

    HRESULT (STDMETHODCALLTYPE *FreePrivateData)(
        IWineD3DVolume* This,
        REFGUID guid);

    DWORD (STDMETHODCALLTYPE *SetPriority)(
        IWineD3DVolume* This,
        DWORD new_priority);

    DWORD (STDMETHODCALLTYPE *GetPriority)(
        IWineD3DVolume* This);

    void (STDMETHODCALLTYPE *PreLoad)(
        IWineD3DVolume* This);

    void (STDMETHODCALLTYPE *UnLoad)(
        IWineD3DVolume* This);

    WINED3DRESOURCETYPE (STDMETHODCALLTYPE *GetType)(
        IWineD3DVolume* This);

#ifdef VBOX_WITH_WDDM
    HRESULT (STDMETHODCALLTYPE *SetShRcState)(
        IWineD3DResource* This,
        VBOXWINEEX_SHRC_STATE enmState);
#endif

    /*** IWineD3DVolume methods ***/
    HRESULT (STDMETHODCALLTYPE *GetContainer)(
        IWineD3DVolume* This,
        REFIID riid,
        void **container);

    HRESULT (STDMETHODCALLTYPE *GetDesc)(
        IWineD3DVolume* This,
        WINED3DVOLUME_DESC *desc);

    HRESULT (STDMETHODCALLTYPE *LockBox)(
        IWineD3DVolume* This,
        WINED3DLOCKED_BOX *locked_box,
        const WINED3DBOX *box,
        DWORD flags);

    HRESULT (STDMETHODCALLTYPE *UnlockBox)(
        IWineD3DVolume* This);

    HRESULT (STDMETHODCALLTYPE *LoadTexture)(
        IWineD3DVolume* This,
        int gl_level,
        BOOL srgb_mode);

    HRESULT (STDMETHODCALLTYPE *SetContainer)(
        IWineD3DVolume* This,
        IWineD3DBase *container);

    END_INTERFACE
} IWineD3DVolumeVtbl;
interface IWineD3DVolume {
    CONST_VTBL IWineD3DVolumeVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IWineD3DVolume_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IWineD3DVolume_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IWineD3DVolume_Release(This) (This)->lpVtbl->Release(This)
/*** IWineD3DBase methods ***/
#define IWineD3DVolume_GetParent(This,parent) (This)->lpVtbl->GetParent(This,parent)
/*** IWineD3DResource methods ***/
#define IWineD3DVolume_SetPrivateData(This,guid,data,data_size,flags) (This)->lpVtbl->SetPrivateData(This,guid,data,data_size,flags)
#define IWineD3DVolume_GetPrivateData(This,guid,data,data_size) (This)->lpVtbl->GetPrivateData(This,guid,data,data_size)
#define IWineD3DVolume_FreePrivateData(This,guid) (This)->lpVtbl->FreePrivateData(This,guid)
#define IWineD3DVolume_SetPriority(This,new_priority) (This)->lpVtbl->SetPriority(This,new_priority)
#define IWineD3DVolume_GetPriority(This) (This)->lpVtbl->GetPriority(This)
#define IWineD3DVolume_PreLoad(This) (This)->lpVtbl->PreLoad(This)
#define IWineD3DVolume_UnLoad(This) (This)->lpVtbl->UnLoad(This)
#define IWineD3DVolume_GetType(This) (This)->lpVtbl->GetType(This)
/*** IWineD3DVolume methods ***/
#define IWineD3DVolume_GetContainer(This,riid,container) (This)->lpVtbl->GetContainer(This,riid,container)
#define IWineD3DVolume_GetDesc(This,desc) (This)->lpVtbl->GetDesc(This,desc)
#define IWineD3DVolume_LockBox(This,locked_box,box,flags) (This)->lpVtbl->LockBox(This,locked_box,box,flags)
#define IWineD3DVolume_UnlockBox(This) (This)->lpVtbl->UnlockBox(This)
#define IWineD3DVolume_LoadTexture(This,gl_level,srgb_mode) (This)->lpVtbl->LoadTexture(This,gl_level,srgb_mode)
#define IWineD3DVolume_SetContainer(This,container) (This)->lpVtbl->SetContainer(This,container)
#endif

#endif

HRESULT STDMETHODCALLTYPE IWineD3DVolume_GetContainer_Proxy(
    IWineD3DVolume* This,
    REFIID riid,
    void **container);
void __RPC_STUB IWineD3DVolume_GetContainer_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DVolume_GetDesc_Proxy(
    IWineD3DVolume* This,
    WINED3DVOLUME_DESC *desc);
void __RPC_STUB IWineD3DVolume_GetDesc_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DVolume_LockBox_Proxy(
    IWineD3DVolume* This,
    WINED3DLOCKED_BOX *locked_box,
    const WINED3DBOX *box,
    DWORD flags);
void __RPC_STUB IWineD3DVolume_LockBox_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DVolume_UnlockBox_Proxy(
    IWineD3DVolume* This);
void __RPC_STUB IWineD3DVolume_UnlockBox_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DVolume_LoadTexture_Proxy(
    IWineD3DVolume* This,
    int gl_level,
    BOOL srgb_mode);
void __RPC_STUB IWineD3DVolume_LoadTexture_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DVolume_SetContainer_Proxy(
    IWineD3DVolume* This,
    IWineD3DBase *container);
void __RPC_STUB IWineD3DVolume_SetContainer_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IWineD3DVolume_INTERFACE_DEFINED__ */

/*****************************************************************************
 * IWineD3DBaseTexture interface
 */
#ifndef __IWineD3DBaseTexture_INTERFACE_DEFINED__
#define __IWineD3DBaseTexture_INTERFACE_DEFINED__

DEFINE_GUID(IID_IWineD3DBaseTexture, 0x3c2aebf6, 0x6f30, 0x11d9, 0xc6,0x87, 0x00,0x04,0x61,0x42,0xc1,0x4f);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface IWineD3DBaseTexture : public IWineD3DResource
{
    virtual DWORD STDMETHODCALLTYPE SetLOD(
        DWORD new_lod) = 0;

    virtual DWORD STDMETHODCALLTYPE GetLOD(
        ) = 0;

    virtual DWORD STDMETHODCALLTYPE GetLevelCount(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetAutoGenFilterType(
        WINED3DTEXTUREFILTERTYPE filter_type) = 0;

    virtual WINED3DTEXTUREFILTERTYPE STDMETHODCALLTYPE GetAutoGenFilterType(
        ) = 0;

    virtual void STDMETHODCALLTYPE GenerateMipSubLevels(
        ) = 0;

    virtual BOOL STDMETHODCALLTYPE SetDirty(
        BOOL dirty) = 0;

    virtual BOOL STDMETHODCALLTYPE GetDirty(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE BindTexture(
        BOOL srgb) = 0;

    virtual UINT STDMETHODCALLTYPE GetTextureDimensions(
        ) = 0;

    virtual BOOL STDMETHODCALLTYPE IsCondNP2(
        ) = 0;

};
#else
typedef struct IWineD3DBaseTextureVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IWineD3DBaseTexture* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IWineD3DBaseTexture* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IWineD3DBaseTexture* This);

    /*** IWineD3DBase methods ***/
    HRESULT (STDMETHODCALLTYPE *GetParent)(
        IWineD3DBaseTexture* This,
        IUnknown **parent);

    /*** IWineD3DResource methods ***/
    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        IWineD3DBaseTexture* This,
        REFGUID guid,
        const void *data,
        DWORD data_size,
        DWORD flags);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        IWineD3DBaseTexture* This,
        REFGUID guid,
        void *data,
        DWORD *data_size);

    HRESULT (STDMETHODCALLTYPE *FreePrivateData)(
        IWineD3DBaseTexture* This,
        REFGUID guid);

    DWORD (STDMETHODCALLTYPE *SetPriority)(
        IWineD3DBaseTexture* This,
        DWORD new_priority);

    DWORD (STDMETHODCALLTYPE *GetPriority)(
        IWineD3DBaseTexture* This);

    void (STDMETHODCALLTYPE *PreLoad)(
        IWineD3DBaseTexture* This);

    void (STDMETHODCALLTYPE *UnLoad)(
        IWineD3DBaseTexture* This);

    WINED3DRESOURCETYPE (STDMETHODCALLTYPE *GetType)(
        IWineD3DBaseTexture* This);

#ifdef VBOX_WITH_WDDM
    HRESULT (STDMETHODCALLTYPE *SetShRcState)(
        IWineD3DResource* This,
        VBOXWINEEX_SHRC_STATE enmState);
#endif

    /*** IWineD3DBaseTexture methods ***/
    DWORD (STDMETHODCALLTYPE *SetLOD)(
        IWineD3DBaseTexture* This,
        DWORD new_lod);

    DWORD (STDMETHODCALLTYPE *GetLOD)(
        IWineD3DBaseTexture* This);

    DWORD (STDMETHODCALLTYPE *GetLevelCount)(
        IWineD3DBaseTexture* This);

    HRESULT (STDMETHODCALLTYPE *SetAutoGenFilterType)(
        IWineD3DBaseTexture* This,
        WINED3DTEXTUREFILTERTYPE filter_type);

    WINED3DTEXTUREFILTERTYPE (STDMETHODCALLTYPE *GetAutoGenFilterType)(
        IWineD3DBaseTexture* This);

    void (STDMETHODCALLTYPE *GenerateMipSubLevels)(
        IWineD3DBaseTexture* This);

    BOOL (STDMETHODCALLTYPE *SetDirty)(
        IWineD3DBaseTexture* This,
        BOOL dirty);

    BOOL (STDMETHODCALLTYPE *GetDirty)(
        IWineD3DBaseTexture* This);

    HRESULT (STDMETHODCALLTYPE *BindTexture)(
        IWineD3DBaseTexture* This,
        BOOL srgb);

    UINT (STDMETHODCALLTYPE *GetTextureDimensions)(
        IWineD3DBaseTexture* This);

    BOOL (STDMETHODCALLTYPE *IsCondNP2)(
        IWineD3DBaseTexture* This);

    END_INTERFACE
} IWineD3DBaseTextureVtbl;
interface IWineD3DBaseTexture {
    CONST_VTBL IWineD3DBaseTextureVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IWineD3DBaseTexture_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IWineD3DBaseTexture_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IWineD3DBaseTexture_Release(This) (This)->lpVtbl->Release(This)
/*** IWineD3DBase methods ***/
#define IWineD3DBaseTexture_GetParent(This,parent) (This)->lpVtbl->GetParent(This,parent)
/*** IWineD3DResource methods ***/
#define IWineD3DBaseTexture_SetPrivateData(This,guid,data,data_size,flags) (This)->lpVtbl->SetPrivateData(This,guid,data,data_size,flags)
#define IWineD3DBaseTexture_GetPrivateData(This,guid,data,data_size) (This)->lpVtbl->GetPrivateData(This,guid,data,data_size)
#define IWineD3DBaseTexture_FreePrivateData(This,guid) (This)->lpVtbl->FreePrivateData(This,guid)
#define IWineD3DBaseTexture_SetPriority(This,new_priority) (This)->lpVtbl->SetPriority(This,new_priority)
#define IWineD3DBaseTexture_GetPriority(This) (This)->lpVtbl->GetPriority(This)
#define IWineD3DBaseTexture_PreLoad(This) (This)->lpVtbl->PreLoad(This)
#define IWineD3DBaseTexture_UnLoad(This) (This)->lpVtbl->UnLoad(This)
#define IWineD3DBaseTexture_GetType(This) (This)->lpVtbl->GetType(This)
/*** IWineD3DBaseTexture methods ***/
#define IWineD3DBaseTexture_SetLOD(This,new_lod) (This)->lpVtbl->SetLOD(This,new_lod)
#define IWineD3DBaseTexture_GetLOD(This) (This)->lpVtbl->GetLOD(This)
#define IWineD3DBaseTexture_GetLevelCount(This) (This)->lpVtbl->GetLevelCount(This)
#define IWineD3DBaseTexture_SetAutoGenFilterType(This,filter_type) (This)->lpVtbl->SetAutoGenFilterType(This,filter_type)
#define IWineD3DBaseTexture_GetAutoGenFilterType(This) (This)->lpVtbl->GetAutoGenFilterType(This)
#define IWineD3DBaseTexture_GenerateMipSubLevels(This) (This)->lpVtbl->GenerateMipSubLevels(This)
#define IWineD3DBaseTexture_SetDirty(This,dirty) (This)->lpVtbl->SetDirty(This,dirty)
#define IWineD3DBaseTexture_GetDirty(This) (This)->lpVtbl->GetDirty(This)
#define IWineD3DBaseTexture_BindTexture(This,srgb) (This)->lpVtbl->BindTexture(This,srgb)
#define IWineD3DBaseTexture_GetTextureDimensions(This) (This)->lpVtbl->GetTextureDimensions(This)
#define IWineD3DBaseTexture_IsCondNP2(This) (This)->lpVtbl->IsCondNP2(This)
#endif

#endif

DWORD STDMETHODCALLTYPE IWineD3DBaseTexture_SetLOD_Proxy(
    IWineD3DBaseTexture* This,
    DWORD new_lod);
void __RPC_STUB IWineD3DBaseTexture_SetLOD_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
DWORD STDMETHODCALLTYPE IWineD3DBaseTexture_GetLOD_Proxy(
    IWineD3DBaseTexture* This);
void __RPC_STUB IWineD3DBaseTexture_GetLOD_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
DWORD STDMETHODCALLTYPE IWineD3DBaseTexture_GetLevelCount_Proxy(
    IWineD3DBaseTexture* This);
void __RPC_STUB IWineD3DBaseTexture_GetLevelCount_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DBaseTexture_SetAutoGenFilterType_Proxy(
    IWineD3DBaseTexture* This,
    WINED3DTEXTUREFILTERTYPE filter_type);
void __RPC_STUB IWineD3DBaseTexture_SetAutoGenFilterType_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
WINED3DTEXTUREFILTERTYPE STDMETHODCALLTYPE IWineD3DBaseTexture_GetAutoGenFilterType_Proxy(
    IWineD3DBaseTexture* This);
void __RPC_STUB IWineD3DBaseTexture_GetAutoGenFilterType_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE IWineD3DBaseTexture_GenerateMipSubLevels_Proxy(
    IWineD3DBaseTexture* This);
void __RPC_STUB IWineD3DBaseTexture_GenerateMipSubLevels_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
BOOL STDMETHODCALLTYPE IWineD3DBaseTexture_SetDirty_Proxy(
    IWineD3DBaseTexture* This,
    BOOL dirty);
void __RPC_STUB IWineD3DBaseTexture_SetDirty_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
BOOL STDMETHODCALLTYPE IWineD3DBaseTexture_GetDirty_Proxy(
    IWineD3DBaseTexture* This);
void __RPC_STUB IWineD3DBaseTexture_GetDirty_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DBaseTexture_BindTexture_Proxy(
    IWineD3DBaseTexture* This,
    BOOL srgb);
void __RPC_STUB IWineD3DBaseTexture_BindTexture_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
UINT STDMETHODCALLTYPE IWineD3DBaseTexture_GetTextureDimensions_Proxy(
    IWineD3DBaseTexture* This);
void __RPC_STUB IWineD3DBaseTexture_GetTextureDimensions_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
BOOL STDMETHODCALLTYPE IWineD3DBaseTexture_IsCondNP2_Proxy(
    IWineD3DBaseTexture* This);
void __RPC_STUB IWineD3DBaseTexture_IsCondNP2_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IWineD3DBaseTexture_INTERFACE_DEFINED__ */

/*****************************************************************************
 * IWineD3DTexture interface
 */
#ifndef __IWineD3DTexture_INTERFACE_DEFINED__
#define __IWineD3DTexture_INTERFACE_DEFINED__

DEFINE_GUID(IID_IWineD3DTexture, 0x3e72cc1c, 0x6f30, 0x11d9, 0xc6,0x87, 0x00,0x04,0x61,0x42,0xc1,0x4f);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface IWineD3DTexture : public IWineD3DBaseTexture
{
    virtual HRESULT STDMETHODCALLTYPE GetLevelDesc(
        UINT level,
        WINED3DSURFACE_DESC *desc) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetSurfaceLevel(
        UINT level,
        IWineD3DSurface **surface) = 0;

    virtual HRESULT STDMETHODCALLTYPE LockRect(
        UINT level,
        WINED3DLOCKED_RECT *locked_rect,
        const RECT *rect,
        DWORD flags) = 0;

    virtual HRESULT STDMETHODCALLTYPE UnlockRect(
        UINT level) = 0;

    virtual HRESULT STDMETHODCALLTYPE AddDirtyRect(
        const RECT *dirty_rect) = 0;

};
#else
typedef struct IWineD3DTextureVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IWineD3DTexture* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IWineD3DTexture* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IWineD3DTexture* This);

    /*** IWineD3DBase methods ***/
    HRESULT (STDMETHODCALLTYPE *GetParent)(
        IWineD3DTexture* This,
        IUnknown **parent);

    /*** IWineD3DResource methods ***/
    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        IWineD3DTexture* This,
        REFGUID guid,
        const void *data,
        DWORD data_size,
        DWORD flags);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        IWineD3DTexture* This,
        REFGUID guid,
        void *data,
        DWORD *data_size);

    HRESULT (STDMETHODCALLTYPE *FreePrivateData)(
        IWineD3DTexture* This,
        REFGUID guid);

    DWORD (STDMETHODCALLTYPE *SetPriority)(
        IWineD3DTexture* This,
        DWORD new_priority);

    DWORD (STDMETHODCALLTYPE *GetPriority)(
        IWineD3DTexture* This);

    void (STDMETHODCALLTYPE *PreLoad)(
        IWineD3DTexture* This);

    void (STDMETHODCALLTYPE *UnLoad)(
        IWineD3DTexture* This);

    WINED3DRESOURCETYPE (STDMETHODCALLTYPE *GetType)(
        IWineD3DTexture* This);

#ifdef VBOX_WITH_WDDM
    HRESULT (STDMETHODCALLTYPE *SetShRcState)(
        IWineD3DResource* This,
        VBOXWINEEX_SHRC_STATE enmState);
#endif

    /*** IWineD3DBaseTexture methods ***/
    DWORD (STDMETHODCALLTYPE *SetLOD)(
        IWineD3DTexture* This,
        DWORD new_lod);

    DWORD (STDMETHODCALLTYPE *GetLOD)(
        IWineD3DTexture* This);

    DWORD (STDMETHODCALLTYPE *GetLevelCount)(
        IWineD3DTexture* This);

    HRESULT (STDMETHODCALLTYPE *SetAutoGenFilterType)(
        IWineD3DTexture* This,
        WINED3DTEXTUREFILTERTYPE filter_type);

    WINED3DTEXTUREFILTERTYPE (STDMETHODCALLTYPE *GetAutoGenFilterType)(
        IWineD3DTexture* This);

    void (STDMETHODCALLTYPE *GenerateMipSubLevels)(
        IWineD3DTexture* This);

    BOOL (STDMETHODCALLTYPE *SetDirty)(
        IWineD3DTexture* This,
        BOOL dirty);

    BOOL (STDMETHODCALLTYPE *GetDirty)(
        IWineD3DTexture* This);

    HRESULT (STDMETHODCALLTYPE *BindTexture)(
        IWineD3DTexture* This,
        BOOL srgb);

    UINT (STDMETHODCALLTYPE *GetTextureDimensions)(
        IWineD3DTexture* This);

    BOOL (STDMETHODCALLTYPE *IsCondNP2)(
        IWineD3DTexture* This);

    /*** IWineD3DTexture methods ***/
    HRESULT (STDMETHODCALLTYPE *GetLevelDesc)(
        IWineD3DTexture* This,
        UINT level,
        WINED3DSURFACE_DESC *desc);

    HRESULT (STDMETHODCALLTYPE *GetSurfaceLevel)(
        IWineD3DTexture* This,
        UINT level,
        IWineD3DSurface **surface);

    HRESULT (STDMETHODCALLTYPE *LockRect)(
        IWineD3DTexture* This,
        UINT level,
        WINED3DLOCKED_RECT *locked_rect,
        const RECT *rect,
        DWORD flags);

    HRESULT (STDMETHODCALLTYPE *UnlockRect)(
        IWineD3DTexture* This,
        UINT level);

    HRESULT (STDMETHODCALLTYPE *AddDirtyRect)(
        IWineD3DTexture* This,
        const RECT *dirty_rect);

    END_INTERFACE
} IWineD3DTextureVtbl;
interface IWineD3DTexture {
    CONST_VTBL IWineD3DTextureVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IWineD3DTexture_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IWineD3DTexture_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IWineD3DTexture_Release(This) (This)->lpVtbl->Release(This)
/*** IWineD3DBase methods ***/
#define IWineD3DTexture_GetParent(This,parent) (This)->lpVtbl->GetParent(This,parent)
/*** IWineD3DResource methods ***/
#define IWineD3DTexture_SetPrivateData(This,guid,data,data_size,flags) (This)->lpVtbl->SetPrivateData(This,guid,data,data_size,flags)
#define IWineD3DTexture_GetPrivateData(This,guid,data,data_size) (This)->lpVtbl->GetPrivateData(This,guid,data,data_size)
#define IWineD3DTexture_FreePrivateData(This,guid) (This)->lpVtbl->FreePrivateData(This,guid)
#define IWineD3DTexture_SetPriority(This,new_priority) (This)->lpVtbl->SetPriority(This,new_priority)
#define IWineD3DTexture_GetPriority(This) (This)->lpVtbl->GetPriority(This)
#define IWineD3DTexture_PreLoad(This) (This)->lpVtbl->PreLoad(This)
#define IWineD3DTexture_UnLoad(This) (This)->lpVtbl->UnLoad(This)
#define IWineD3DTexture_GetType(This) (This)->lpVtbl->GetType(This)
/*** IWineD3DBaseTexture methods ***/
#define IWineD3DTexture_SetLOD(This,new_lod) (This)->lpVtbl->SetLOD(This,new_lod)
#define IWineD3DTexture_GetLOD(This) (This)->lpVtbl->GetLOD(This)
#define IWineD3DTexture_GetLevelCount(This) (This)->lpVtbl->GetLevelCount(This)
#define IWineD3DTexture_SetAutoGenFilterType(This,filter_type) (This)->lpVtbl->SetAutoGenFilterType(This,filter_type)
#define IWineD3DTexture_GetAutoGenFilterType(This) (This)->lpVtbl->GetAutoGenFilterType(This)
#define IWineD3DTexture_GenerateMipSubLevels(This) (This)->lpVtbl->GenerateMipSubLevels(This)
#define IWineD3DTexture_SetDirty(This,dirty) (This)->lpVtbl->SetDirty(This,dirty)
#define IWineD3DTexture_GetDirty(This) (This)->lpVtbl->GetDirty(This)
#define IWineD3DTexture_BindTexture(This,srgb) (This)->lpVtbl->BindTexture(This,srgb)
#define IWineD3DTexture_GetTextureDimensions(This) (This)->lpVtbl->GetTextureDimensions(This)
#define IWineD3DTexture_IsCondNP2(This) (This)->lpVtbl->IsCondNP2(This)
/*** IWineD3DTexture methods ***/
#define IWineD3DTexture_GetLevelDesc(This,level,desc) (This)->lpVtbl->GetLevelDesc(This,level,desc)
#define IWineD3DTexture_GetSurfaceLevel(This,level,surface) (This)->lpVtbl->GetSurfaceLevel(This,level,surface)
#define IWineD3DTexture_LockRect(This,level,locked_rect,rect,flags) (This)->lpVtbl->LockRect(This,level,locked_rect,rect,flags)
#define IWineD3DTexture_UnlockRect(This,level) (This)->lpVtbl->UnlockRect(This,level)
#define IWineD3DTexture_AddDirtyRect(This,dirty_rect) (This)->lpVtbl->AddDirtyRect(This,dirty_rect)
#endif

#endif

HRESULT STDMETHODCALLTYPE IWineD3DTexture_GetLevelDesc_Proxy(
    IWineD3DTexture* This,
    UINT level,
    WINED3DSURFACE_DESC *desc);
void __RPC_STUB IWineD3DTexture_GetLevelDesc_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DTexture_GetSurfaceLevel_Proxy(
    IWineD3DTexture* This,
    UINT level,
    IWineD3DSurface **surface);
void __RPC_STUB IWineD3DTexture_GetSurfaceLevel_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DTexture_LockRect_Proxy(
    IWineD3DTexture* This,
    UINT level,
    WINED3DLOCKED_RECT *locked_rect,
    const RECT *rect,
    DWORD flags);
void __RPC_STUB IWineD3DTexture_LockRect_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DTexture_UnlockRect_Proxy(
    IWineD3DTexture* This,
    UINT level);
void __RPC_STUB IWineD3DTexture_UnlockRect_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DTexture_AddDirtyRect_Proxy(
    IWineD3DTexture* This,
    const RECT *dirty_rect);
void __RPC_STUB IWineD3DTexture_AddDirtyRect_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IWineD3DTexture_INTERFACE_DEFINED__ */

/*****************************************************************************
 * IWineD3DCubeTexture interface
 */
#ifndef __IWineD3DCubeTexture_INTERFACE_DEFINED__
#define __IWineD3DCubeTexture_INTERFACE_DEFINED__

DEFINE_GUID(IID_IWineD3DCubeTexture, 0x41752900, 0x6f30, 0x11d9, 0xc6,0x87, 0x00,0x04,0x61,0x42,0xc1,0x4f);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface IWineD3DCubeTexture : public IWineD3DBaseTexture
{
    virtual HRESULT STDMETHODCALLTYPE GetLevelDesc(
        UINT level,
        WINED3DSURFACE_DESC *desc) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetCubeMapSurface(
        WINED3DCUBEMAP_FACES face,
        UINT level,
        IWineD3DSurface **surface) = 0;

    virtual HRESULT STDMETHODCALLTYPE LockRect(
        WINED3DCUBEMAP_FACES face,
        UINT level,
        WINED3DLOCKED_RECT *locked_rect,
        const RECT *rect,
        DWORD flags) = 0;

    virtual HRESULT STDMETHODCALLTYPE UnlockRect(
        WINED3DCUBEMAP_FACES face,
        UINT level) = 0;

    virtual HRESULT STDMETHODCALLTYPE AddDirtyRect(
        WINED3DCUBEMAP_FACES face,
        const RECT *dirty_rect) = 0;

};
#else
typedef struct IWineD3DCubeTextureVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IWineD3DCubeTexture* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IWineD3DCubeTexture* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IWineD3DCubeTexture* This);

    /*** IWineD3DBase methods ***/
    HRESULT (STDMETHODCALLTYPE *GetParent)(
        IWineD3DCubeTexture* This,
        IUnknown **parent);

    /*** IWineD3DResource methods ***/
    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        IWineD3DCubeTexture* This,
        REFGUID guid,
        const void *data,
        DWORD data_size,
        DWORD flags);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        IWineD3DCubeTexture* This,
        REFGUID guid,
        void *data,
        DWORD *data_size);

    HRESULT (STDMETHODCALLTYPE *FreePrivateData)(
        IWineD3DCubeTexture* This,
        REFGUID guid);

    DWORD (STDMETHODCALLTYPE *SetPriority)(
        IWineD3DCubeTexture* This,
        DWORD new_priority);

    DWORD (STDMETHODCALLTYPE *GetPriority)(
        IWineD3DCubeTexture* This);

    void (STDMETHODCALLTYPE *PreLoad)(
        IWineD3DCubeTexture* This);

    void (STDMETHODCALLTYPE *UnLoad)(
        IWineD3DCubeTexture* This);

    WINED3DRESOURCETYPE (STDMETHODCALLTYPE *GetType)(
        IWineD3DCubeTexture* This);

#ifdef VBOX_WITH_WDDM
    HRESULT (STDMETHODCALLTYPE *SetShRcState)(
        IWineD3DResource* This,
        VBOXWINEEX_SHRC_STATE enmState);
#endif

    /*** IWineD3DBaseTexture methods ***/
    DWORD (STDMETHODCALLTYPE *SetLOD)(
        IWineD3DCubeTexture* This,
        DWORD new_lod);

    DWORD (STDMETHODCALLTYPE *GetLOD)(
        IWineD3DCubeTexture* This);

    DWORD (STDMETHODCALLTYPE *GetLevelCount)(
        IWineD3DCubeTexture* This);

    HRESULT (STDMETHODCALLTYPE *SetAutoGenFilterType)(
        IWineD3DCubeTexture* This,
        WINED3DTEXTUREFILTERTYPE filter_type);

    WINED3DTEXTUREFILTERTYPE (STDMETHODCALLTYPE *GetAutoGenFilterType)(
        IWineD3DCubeTexture* This);

    void (STDMETHODCALLTYPE *GenerateMipSubLevels)(
        IWineD3DCubeTexture* This);

    BOOL (STDMETHODCALLTYPE *SetDirty)(
        IWineD3DCubeTexture* This,
        BOOL dirty);

    BOOL (STDMETHODCALLTYPE *GetDirty)(
        IWineD3DCubeTexture* This);

    HRESULT (STDMETHODCALLTYPE *BindTexture)(
        IWineD3DCubeTexture* This,
        BOOL srgb);

    UINT (STDMETHODCALLTYPE *GetTextureDimensions)(
        IWineD3DCubeTexture* This);

    BOOL (STDMETHODCALLTYPE *IsCondNP2)(
        IWineD3DCubeTexture* This);

    /*** IWineD3DCubeTexture methods ***/
    HRESULT (STDMETHODCALLTYPE *GetLevelDesc)(
        IWineD3DCubeTexture* This,
        UINT level,
        WINED3DSURFACE_DESC *desc);

    HRESULT (STDMETHODCALLTYPE *GetCubeMapSurface)(
        IWineD3DCubeTexture* This,
        WINED3DCUBEMAP_FACES face,
        UINT level,
        IWineD3DSurface **surface);

    HRESULT (STDMETHODCALLTYPE *LockRect)(
        IWineD3DCubeTexture* This,
        WINED3DCUBEMAP_FACES face,
        UINT level,
        WINED3DLOCKED_RECT *locked_rect,
        const RECT *rect,
        DWORD flags);

    HRESULT (STDMETHODCALLTYPE *UnlockRect)(
        IWineD3DCubeTexture* This,
        WINED3DCUBEMAP_FACES face,
        UINT level);

    HRESULT (STDMETHODCALLTYPE *AddDirtyRect)(
        IWineD3DCubeTexture* This,
        WINED3DCUBEMAP_FACES face,
        const RECT *dirty_rect);

    END_INTERFACE
} IWineD3DCubeTextureVtbl;
interface IWineD3DCubeTexture {
    CONST_VTBL IWineD3DCubeTextureVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IWineD3DCubeTexture_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IWineD3DCubeTexture_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IWineD3DCubeTexture_Release(This) (This)->lpVtbl->Release(This)
/*** IWineD3DBase methods ***/
#define IWineD3DCubeTexture_GetParent(This,parent) (This)->lpVtbl->GetParent(This,parent)
/*** IWineD3DResource methods ***/
#define IWineD3DCubeTexture_SetPrivateData(This,guid,data,data_size,flags) (This)->lpVtbl->SetPrivateData(This,guid,data,data_size,flags)
#define IWineD3DCubeTexture_GetPrivateData(This,guid,data,data_size) (This)->lpVtbl->GetPrivateData(This,guid,data,data_size)
#define IWineD3DCubeTexture_FreePrivateData(This,guid) (This)->lpVtbl->FreePrivateData(This,guid)
#define IWineD3DCubeTexture_SetPriority(This,new_priority) (This)->lpVtbl->SetPriority(This,new_priority)
#define IWineD3DCubeTexture_GetPriority(This) (This)->lpVtbl->GetPriority(This)
#define IWineD3DCubeTexture_PreLoad(This) (This)->lpVtbl->PreLoad(This)
#define IWineD3DCubeTexture_UnLoad(This) (This)->lpVtbl->UnLoad(This)
#define IWineD3DCubeTexture_GetType(This) (This)->lpVtbl->GetType(This)
/*** IWineD3DBaseTexture methods ***/
#define IWineD3DCubeTexture_SetLOD(This,new_lod) (This)->lpVtbl->SetLOD(This,new_lod)
#define IWineD3DCubeTexture_GetLOD(This) (This)->lpVtbl->GetLOD(This)
#define IWineD3DCubeTexture_GetLevelCount(This) (This)->lpVtbl->GetLevelCount(This)
#define IWineD3DCubeTexture_SetAutoGenFilterType(This,filter_type) (This)->lpVtbl->SetAutoGenFilterType(This,filter_type)
#define IWineD3DCubeTexture_GetAutoGenFilterType(This) (This)->lpVtbl->GetAutoGenFilterType(This)
#define IWineD3DCubeTexture_GenerateMipSubLevels(This) (This)->lpVtbl->GenerateMipSubLevels(This)
#define IWineD3DCubeTexture_SetDirty(This,dirty) (This)->lpVtbl->SetDirty(This,dirty)
#define IWineD3DCubeTexture_GetDirty(This) (This)->lpVtbl->GetDirty(This)
#define IWineD3DCubeTexture_BindTexture(This,srgb) (This)->lpVtbl->BindTexture(This,srgb)
#define IWineD3DCubeTexture_GetTextureDimensions(This) (This)->lpVtbl->GetTextureDimensions(This)
#define IWineD3DCubeTexture_IsCondNP2(This) (This)->lpVtbl->IsCondNP2(This)
/*** IWineD3DCubeTexture methods ***/
#define IWineD3DCubeTexture_GetLevelDesc(This,level,desc) (This)->lpVtbl->GetLevelDesc(This,level,desc)
#define IWineD3DCubeTexture_GetCubeMapSurface(This,face,level,surface) (This)->lpVtbl->GetCubeMapSurface(This,face,level,surface)
#define IWineD3DCubeTexture_LockRect(This,face,level,locked_rect,rect,flags) (This)->lpVtbl->LockRect(This,face,level,locked_rect,rect,flags)
#define IWineD3DCubeTexture_UnlockRect(This,face,level) (This)->lpVtbl->UnlockRect(This,face,level)
#define IWineD3DCubeTexture_AddDirtyRect(This,face,dirty_rect) (This)->lpVtbl->AddDirtyRect(This,face,dirty_rect)
#endif

#endif

HRESULT STDMETHODCALLTYPE IWineD3DCubeTexture_GetLevelDesc_Proxy(
    IWineD3DCubeTexture* This,
    UINT level,
    WINED3DSURFACE_DESC *desc);
void __RPC_STUB IWineD3DCubeTexture_GetLevelDesc_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DCubeTexture_GetCubeMapSurface_Proxy(
    IWineD3DCubeTexture* This,
    WINED3DCUBEMAP_FACES face,
    UINT level,
    IWineD3DSurface **surface);
void __RPC_STUB IWineD3DCubeTexture_GetCubeMapSurface_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DCubeTexture_LockRect_Proxy(
    IWineD3DCubeTexture* This,
    WINED3DCUBEMAP_FACES face,
    UINT level,
    WINED3DLOCKED_RECT *locked_rect,
    const RECT *rect,
    DWORD flags);
void __RPC_STUB IWineD3DCubeTexture_LockRect_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DCubeTexture_UnlockRect_Proxy(
    IWineD3DCubeTexture* This,
    WINED3DCUBEMAP_FACES face,
    UINT level);
void __RPC_STUB IWineD3DCubeTexture_UnlockRect_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DCubeTexture_AddDirtyRect_Proxy(
    IWineD3DCubeTexture* This,
    WINED3DCUBEMAP_FACES face,
    const RECT *dirty_rect);
void __RPC_STUB IWineD3DCubeTexture_AddDirtyRect_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IWineD3DCubeTexture_INTERFACE_DEFINED__ */

/*****************************************************************************
 * IWineD3DVolumeTexture interface
 */
#ifndef __IWineD3DVolumeTexture_INTERFACE_DEFINED__
#define __IWineD3DVolumeTexture_INTERFACE_DEFINED__

DEFINE_GUID(IID_IWineD3DVolumeTexture, 0x7b39470c, 0x6f30, 0x11d9, 0xc6,0x87, 0x00,0x04,0x61,0x42,0xc1,0x4f);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface IWineD3DVolumeTexture : public IWineD3DBaseTexture
{
    virtual HRESULT STDMETHODCALLTYPE GetLevelDesc(
        UINT level,
        WINED3DVOLUME_DESC *desc) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetVolumeLevel(
        UINT level,
        IWineD3DVolume **volume) = 0;

    virtual HRESULT STDMETHODCALLTYPE LockBox(
        UINT level,
        WINED3DLOCKED_BOX *locked_box,
        const WINED3DBOX *box,
        DWORD flags) = 0;

    virtual HRESULT STDMETHODCALLTYPE UnlockBox(
        UINT level) = 0;

    virtual HRESULT STDMETHODCALLTYPE AddDirtyBox(
        const WINED3DBOX *dirty_box) = 0;

};
#else
typedef struct IWineD3DVolumeTextureVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IWineD3DVolumeTexture* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IWineD3DVolumeTexture* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IWineD3DVolumeTexture* This);

    /*** IWineD3DBase methods ***/
    HRESULT (STDMETHODCALLTYPE *GetParent)(
        IWineD3DVolumeTexture* This,
        IUnknown **parent);

    /*** IWineD3DResource methods ***/
    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        IWineD3DVolumeTexture* This,
        REFGUID guid,
        const void *data,
        DWORD data_size,
        DWORD flags);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        IWineD3DVolumeTexture* This,
        REFGUID guid,
        void *data,
        DWORD *data_size);

    HRESULT (STDMETHODCALLTYPE *FreePrivateData)(
        IWineD3DVolumeTexture* This,
        REFGUID guid);

    DWORD (STDMETHODCALLTYPE *SetPriority)(
        IWineD3DVolumeTexture* This,
        DWORD new_priority);

    DWORD (STDMETHODCALLTYPE *GetPriority)(
        IWineD3DVolumeTexture* This);

    void (STDMETHODCALLTYPE *PreLoad)(
        IWineD3DVolumeTexture* This);

    void (STDMETHODCALLTYPE *UnLoad)(
        IWineD3DVolumeTexture* This);

    WINED3DRESOURCETYPE (STDMETHODCALLTYPE *GetType)(
        IWineD3DVolumeTexture* This);

#ifdef VBOX_WITH_WDDM
    HRESULT (STDMETHODCALLTYPE *SetShRcState)(
        IWineD3DResource* This,
        VBOXWINEEX_SHRC_STATE enmState);
#endif

    /*** IWineD3DBaseTexture methods ***/
    DWORD (STDMETHODCALLTYPE *SetLOD)(
        IWineD3DVolumeTexture* This,
        DWORD new_lod);

    DWORD (STDMETHODCALLTYPE *GetLOD)(
        IWineD3DVolumeTexture* This);

    DWORD (STDMETHODCALLTYPE *GetLevelCount)(
        IWineD3DVolumeTexture* This);

    HRESULT (STDMETHODCALLTYPE *SetAutoGenFilterType)(
        IWineD3DVolumeTexture* This,
        WINED3DTEXTUREFILTERTYPE filter_type);

    WINED3DTEXTUREFILTERTYPE (STDMETHODCALLTYPE *GetAutoGenFilterType)(
        IWineD3DVolumeTexture* This);

    void (STDMETHODCALLTYPE *GenerateMipSubLevels)(
        IWineD3DVolumeTexture* This);

    BOOL (STDMETHODCALLTYPE *SetDirty)(
        IWineD3DVolumeTexture* This,
        BOOL dirty);

    BOOL (STDMETHODCALLTYPE *GetDirty)(
        IWineD3DVolumeTexture* This);

    HRESULT (STDMETHODCALLTYPE *BindTexture)(
        IWineD3DVolumeTexture* This,
        BOOL srgb);

    UINT (STDMETHODCALLTYPE *GetTextureDimensions)(
        IWineD3DVolumeTexture* This);

    BOOL (STDMETHODCALLTYPE *IsCondNP2)(
        IWineD3DVolumeTexture* This);

    /*** IWineD3DVolumeTexture methods ***/
    HRESULT (STDMETHODCALLTYPE *GetLevelDesc)(
        IWineD3DVolumeTexture* This,
        UINT level,
        WINED3DVOLUME_DESC *desc);

    HRESULT (STDMETHODCALLTYPE *GetVolumeLevel)(
        IWineD3DVolumeTexture* This,
        UINT level,
        IWineD3DVolume **volume);

    HRESULT (STDMETHODCALLTYPE *LockBox)(
        IWineD3DVolumeTexture* This,
        UINT level,
        WINED3DLOCKED_BOX *locked_box,
        const WINED3DBOX *box,
        DWORD flags);

    HRESULT (STDMETHODCALLTYPE *UnlockBox)(
        IWineD3DVolumeTexture* This,
        UINT level);

    HRESULT (STDMETHODCALLTYPE *AddDirtyBox)(
        IWineD3DVolumeTexture* This,
        const WINED3DBOX *dirty_box);

    END_INTERFACE
} IWineD3DVolumeTextureVtbl;
interface IWineD3DVolumeTexture {
    CONST_VTBL IWineD3DVolumeTextureVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IWineD3DVolumeTexture_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IWineD3DVolumeTexture_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IWineD3DVolumeTexture_Release(This) (This)->lpVtbl->Release(This)
/*** IWineD3DBase methods ***/
#define IWineD3DVolumeTexture_GetParent(This,parent) (This)->lpVtbl->GetParent(This,parent)
/*** IWineD3DResource methods ***/
#define IWineD3DVolumeTexture_SetPrivateData(This,guid,data,data_size,flags) (This)->lpVtbl->SetPrivateData(This,guid,data,data_size,flags)
#define IWineD3DVolumeTexture_GetPrivateData(This,guid,data,data_size) (This)->lpVtbl->GetPrivateData(This,guid,data,data_size)
#define IWineD3DVolumeTexture_FreePrivateData(This,guid) (This)->lpVtbl->FreePrivateData(This,guid)
#define IWineD3DVolumeTexture_SetPriority(This,new_priority) (This)->lpVtbl->SetPriority(This,new_priority)
#define IWineD3DVolumeTexture_GetPriority(This) (This)->lpVtbl->GetPriority(This)
#define IWineD3DVolumeTexture_PreLoad(This) (This)->lpVtbl->PreLoad(This)
#define IWineD3DVolumeTexture_UnLoad(This) (This)->lpVtbl->UnLoad(This)
#define IWineD3DVolumeTexture_GetType(This) (This)->lpVtbl->GetType(This)
/*** IWineD3DBaseTexture methods ***/
#define IWineD3DVolumeTexture_SetLOD(This,new_lod) (This)->lpVtbl->SetLOD(This,new_lod)
#define IWineD3DVolumeTexture_GetLOD(This) (This)->lpVtbl->GetLOD(This)
#define IWineD3DVolumeTexture_GetLevelCount(This) (This)->lpVtbl->GetLevelCount(This)
#define IWineD3DVolumeTexture_SetAutoGenFilterType(This,filter_type) (This)->lpVtbl->SetAutoGenFilterType(This,filter_type)
#define IWineD3DVolumeTexture_GetAutoGenFilterType(This) (This)->lpVtbl->GetAutoGenFilterType(This)
#define IWineD3DVolumeTexture_GenerateMipSubLevels(This) (This)->lpVtbl->GenerateMipSubLevels(This)
#define IWineD3DVolumeTexture_SetDirty(This,dirty) (This)->lpVtbl->SetDirty(This,dirty)
#define IWineD3DVolumeTexture_GetDirty(This) (This)->lpVtbl->GetDirty(This)
#define IWineD3DVolumeTexture_BindTexture(This,srgb) (This)->lpVtbl->BindTexture(This,srgb)
#define IWineD3DVolumeTexture_GetTextureDimensions(This) (This)->lpVtbl->GetTextureDimensions(This)
#define IWineD3DVolumeTexture_IsCondNP2(This) (This)->lpVtbl->IsCondNP2(This)
/*** IWineD3DVolumeTexture methods ***/
#define IWineD3DVolumeTexture_GetLevelDesc(This,level,desc) (This)->lpVtbl->GetLevelDesc(This,level,desc)
#define IWineD3DVolumeTexture_GetVolumeLevel(This,level,volume) (This)->lpVtbl->GetVolumeLevel(This,level,volume)
#define IWineD3DVolumeTexture_LockBox(This,level,locked_box,box,flags) (This)->lpVtbl->LockBox(This,level,locked_box,box,flags)
#define IWineD3DVolumeTexture_UnlockBox(This,level) (This)->lpVtbl->UnlockBox(This,level)
#define IWineD3DVolumeTexture_AddDirtyBox(This,dirty_box) (This)->lpVtbl->AddDirtyBox(This,dirty_box)
#endif

#endif

HRESULT STDMETHODCALLTYPE IWineD3DVolumeTexture_GetLevelDesc_Proxy(
    IWineD3DVolumeTexture* This,
    UINT level,
    WINED3DVOLUME_DESC *desc);
void __RPC_STUB IWineD3DVolumeTexture_GetLevelDesc_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DVolumeTexture_GetVolumeLevel_Proxy(
    IWineD3DVolumeTexture* This,
    UINT level,
    IWineD3DVolume **volume);
void __RPC_STUB IWineD3DVolumeTexture_GetVolumeLevel_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DVolumeTexture_LockBox_Proxy(
    IWineD3DVolumeTexture* This,
    UINT level,
    WINED3DLOCKED_BOX *locked_box,
    const WINED3DBOX *box,
    DWORD flags);
void __RPC_STUB IWineD3DVolumeTexture_LockBox_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DVolumeTexture_UnlockBox_Proxy(
    IWineD3DVolumeTexture* This,
    UINT level);
void __RPC_STUB IWineD3DVolumeTexture_UnlockBox_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DVolumeTexture_AddDirtyBox_Proxy(
    IWineD3DVolumeTexture* This,
    const WINED3DBOX *dirty_box);
void __RPC_STUB IWineD3DVolumeTexture_AddDirtyBox_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IWineD3DVolumeTexture_INTERFACE_DEFINED__ */

/*****************************************************************************
 * IWineD3DVertexDeclaration interface
 */
#ifndef __IWineD3DVertexDeclaration_INTERFACE_DEFINED__
#define __IWineD3DVertexDeclaration_INTERFACE_DEFINED__

DEFINE_GUID(IID_IWineD3DVertexDeclaration, 0x7cd55be6, 0x6f30, 0x11d9, 0xc6,0x87, 0x00,0x04,0x61,0x42,0xc1,0x4f);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface IWineD3DVertexDeclaration : public IWineD3DBase
{
};
#else
typedef struct IWineD3DVertexDeclarationVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IWineD3DVertexDeclaration* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IWineD3DVertexDeclaration* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IWineD3DVertexDeclaration* This);

    /*** IWineD3DBase methods ***/
    HRESULT (STDMETHODCALLTYPE *GetParent)(
        IWineD3DVertexDeclaration* This,
        IUnknown **parent);

    END_INTERFACE
} IWineD3DVertexDeclarationVtbl;
interface IWineD3DVertexDeclaration {
    CONST_VTBL IWineD3DVertexDeclarationVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IWineD3DVertexDeclaration_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IWineD3DVertexDeclaration_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IWineD3DVertexDeclaration_Release(This) (This)->lpVtbl->Release(This)
/*** IWineD3DBase methods ***/
#define IWineD3DVertexDeclaration_GetParent(This,parent) (This)->lpVtbl->GetParent(This,parent)
#endif

#endif


#endif  /* __IWineD3DVertexDeclaration_INTERFACE_DEFINED__ */

/*****************************************************************************
 * IWineD3DStateBlock interface
 */
#ifndef __IWineD3DStateBlock_INTERFACE_DEFINED__
#define __IWineD3DStateBlock_INTERFACE_DEFINED__

DEFINE_GUID(IID_IWineD3DStateBlock, 0x83b073ce, 0x6f30, 0x11d9, 0xc6,0x87, 0x00,0x04,0x61,0x42,0xc1,0x4f);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface IWineD3DStateBlock : public IUnknown
{
    virtual HRESULT STDMETHODCALLTYPE Capture(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE Apply(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE InitStartupStateBlock(
        ) = 0;

};
#else
typedef struct IWineD3DStateBlockVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IWineD3DStateBlock* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IWineD3DStateBlock* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IWineD3DStateBlock* This);

    /*** IWineD3DStateBlock methods ***/
    HRESULT (STDMETHODCALLTYPE *Capture)(
        IWineD3DStateBlock* This);

    HRESULT (STDMETHODCALLTYPE *Apply)(
        IWineD3DStateBlock* This);

    HRESULT (STDMETHODCALLTYPE *InitStartupStateBlock)(
        IWineD3DStateBlock* This);

    END_INTERFACE
} IWineD3DStateBlockVtbl;
interface IWineD3DStateBlock {
    CONST_VTBL IWineD3DStateBlockVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IWineD3DStateBlock_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IWineD3DStateBlock_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IWineD3DStateBlock_Release(This) (This)->lpVtbl->Release(This)
/*** IWineD3DStateBlock methods ***/
#define IWineD3DStateBlock_Capture(This) (This)->lpVtbl->Capture(This)
#define IWineD3DStateBlock_Apply(This) (This)->lpVtbl->Apply(This)
#define IWineD3DStateBlock_InitStartupStateBlock(This) (This)->lpVtbl->InitStartupStateBlock(This)
#endif

#endif

HRESULT STDMETHODCALLTYPE IWineD3DStateBlock_Capture_Proxy(
    IWineD3DStateBlock* This);
void __RPC_STUB IWineD3DStateBlock_Capture_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DStateBlock_Apply_Proxy(
    IWineD3DStateBlock* This);
void __RPC_STUB IWineD3DStateBlock_Apply_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DStateBlock_InitStartupStateBlock_Proxy(
    IWineD3DStateBlock* This);
void __RPC_STUB IWineD3DStateBlock_InitStartupStateBlock_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IWineD3DStateBlock_INTERFACE_DEFINED__ */

/*****************************************************************************
 * IWineD3DQuery interface
 */
#ifndef __IWineD3DQuery_INTERFACE_DEFINED__
#define __IWineD3DQuery_INTERFACE_DEFINED__

DEFINE_GUID(IID_IWineD3DQuery, 0x905ddbac, 0x6f30, 0x11d9, 0xc6,0x87, 0x00,0x04,0x61,0x42,0xc1,0x4f);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface IWineD3DQuery : public IWineD3DBase
{
    virtual HRESULT STDMETHODCALLTYPE GetData(
        void *data,
        DWORD data_size,
        DWORD flags) = 0;

    virtual DWORD STDMETHODCALLTYPE GetDataSize(
        ) = 0;

    virtual WINED3DQUERYTYPE STDMETHODCALLTYPE GetType(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE Issue(
        DWORD flags) = 0;

};
#else
typedef struct IWineD3DQueryVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IWineD3DQuery* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IWineD3DQuery* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IWineD3DQuery* This);

    /*** IWineD3DBase methods ***/
    HRESULT (STDMETHODCALLTYPE *GetParent)(
        IWineD3DQuery* This,
        IUnknown **parent);

    /*** IWineD3DQuery methods ***/
    HRESULT (STDMETHODCALLTYPE *GetData)(
        IWineD3DQuery* This,
        void *data,
        DWORD data_size,
        DWORD flags);

    DWORD (STDMETHODCALLTYPE *GetDataSize)(
        IWineD3DQuery* This);

    WINED3DQUERYTYPE (STDMETHODCALLTYPE *GetType)(
        IWineD3DQuery* This);

    HRESULT (STDMETHODCALLTYPE *Issue)(
        IWineD3DQuery* This,
        DWORD flags);

    END_INTERFACE
} IWineD3DQueryVtbl;
interface IWineD3DQuery {
    CONST_VTBL IWineD3DQueryVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IWineD3DQuery_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IWineD3DQuery_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IWineD3DQuery_Release(This) (This)->lpVtbl->Release(This)
/*** IWineD3DBase methods ***/
#define IWineD3DQuery_GetParent(This,parent) (This)->lpVtbl->GetParent(This,parent)
/*** IWineD3DQuery methods ***/
#define IWineD3DQuery_GetData(This,data,data_size,flags) (This)->lpVtbl->GetData(This,data,data_size,flags)
#define IWineD3DQuery_GetDataSize(This) (This)->lpVtbl->GetDataSize(This)
#define IWineD3DQuery_GetType(This) (This)->lpVtbl->GetType(This)
#define IWineD3DQuery_Issue(This,flags) (This)->lpVtbl->Issue(This,flags)
#endif

#endif

HRESULT STDMETHODCALLTYPE IWineD3DQuery_GetData_Proxy(
    IWineD3DQuery* This,
    void *data,
    DWORD data_size,
    DWORD flags);
void __RPC_STUB IWineD3DQuery_GetData_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
DWORD STDMETHODCALLTYPE IWineD3DQuery_GetDataSize_Proxy(
    IWineD3DQuery* This);
void __RPC_STUB IWineD3DQuery_GetDataSize_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
WINED3DQUERYTYPE STDMETHODCALLTYPE IWineD3DQuery_GetType_Proxy(
    IWineD3DQuery* This);
void __RPC_STUB IWineD3DQuery_GetType_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DQuery_Issue_Proxy(
    IWineD3DQuery* This,
    DWORD flags);
void __RPC_STUB IWineD3DQuery_Issue_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IWineD3DQuery_INTERFACE_DEFINED__ */

/*****************************************************************************
 * IWineD3DSwapChain interface
 */
#ifndef __IWineD3DSwapChain_INTERFACE_DEFINED__
#define __IWineD3DSwapChain_INTERFACE_DEFINED__

DEFINE_GUID(IID_IWineD3DSwapChain, 0x34d01b10, 0x6f30, 0x11d9, 0xc6,0x87, 0x00,0x04,0x61,0x42,0xc1,0x4f);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface IWineD3DSwapChain : public IWineD3DBase
{
    virtual void STDMETHODCALLTYPE Destroy(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetDevice(
        IWineD3DDevice **device) = 0;

    virtual HRESULT STDMETHODCALLTYPE Present(
        const RECT *src_rect,
        const RECT *dst_rect,
        HWND dst_window_override,
        const RGNDATA *dirty_region,
        DWORD flags) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetDestWindowOverride(
        HWND window) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetFrontBufferData(
        IWineD3DSurface *dst_surface) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetBackBuffer(
        UINT backbuffer_idx,
        WINED3DBACKBUFFER_TYPE backbuffer_type,
        IWineD3DSurface **backbuffer) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetRasterStatus(
        WINED3DRASTER_STATUS *raster_status) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetDisplayMode(
        WINED3DDISPLAYMODE *mode) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetPresentParameters(
        WINED3DPRESENT_PARAMETERS *present_parameters) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetGammaRamp(
        DWORD flags,
        const WINED3DGAMMARAMP *ramp) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetGammaRamp(
        WINED3DGAMMARAMP *ramp) = 0;

};
#else
typedef struct IWineD3DSwapChainVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IWineD3DSwapChain* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IWineD3DSwapChain* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IWineD3DSwapChain* This);

    /*** IWineD3DBase methods ***/
    HRESULT (STDMETHODCALLTYPE *GetParent)(
        IWineD3DSwapChain* This,
        IUnknown **parent);

    /*** IWineD3DSwapChain methods ***/
    void (STDMETHODCALLTYPE *Destroy)(
        IWineD3DSwapChain* This);

    HRESULT (STDMETHODCALLTYPE *GetDevice)(
        IWineD3DSwapChain* This,
        IWineD3DDevice **device);

    HRESULT (STDMETHODCALLTYPE *Present)(
        IWineD3DSwapChain* This,
        const RECT *src_rect,
        const RECT *dst_rect,
        HWND dst_window_override,
        const RGNDATA *dirty_region,
        DWORD flags);

    HRESULT (STDMETHODCALLTYPE *SetDestWindowOverride)(
        IWineD3DSwapChain* This,
        HWND window);

    HRESULT (STDMETHODCALLTYPE *GetFrontBufferData)(
        IWineD3DSwapChain* This,
        IWineD3DSurface *dst_surface);

    HRESULT (STDMETHODCALLTYPE *GetBackBuffer)(
        IWineD3DSwapChain* This,
        UINT backbuffer_idx,
        WINED3DBACKBUFFER_TYPE backbuffer_type,
        IWineD3DSurface **backbuffer);

    HRESULT (STDMETHODCALLTYPE *GetRasterStatus)(
        IWineD3DSwapChain* This,
        WINED3DRASTER_STATUS *raster_status);

    HRESULT (STDMETHODCALLTYPE *GetDisplayMode)(
        IWineD3DSwapChain* This,
        WINED3DDISPLAYMODE *mode);

    HRESULT (STDMETHODCALLTYPE *GetPresentParameters)(
        IWineD3DSwapChain* This,
        WINED3DPRESENT_PARAMETERS *present_parameters);

    HRESULT (STDMETHODCALLTYPE *SetGammaRamp)(
        IWineD3DSwapChain* This,
        DWORD flags,
        const WINED3DGAMMARAMP *ramp);

    HRESULT (STDMETHODCALLTYPE *GetGammaRamp)(
        IWineD3DSwapChain* This,
        WINED3DGAMMARAMP *ramp);

#ifdef VBOX_WITH_WDDM
    HRESULT (STDMETHODCALLTYPE *Flush)(
        IWineD3DSwapChain* This);

    HRESULT (STDMETHODCALLTYPE *PresentRt)(
        IWineD3DSwapChain* This,
        IWineD3DSurface* surf);
#endif
    END_INTERFACE
} IWineD3DSwapChainVtbl;
interface IWineD3DSwapChain {
    CONST_VTBL IWineD3DSwapChainVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IWineD3DSwapChain_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IWineD3DSwapChain_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IWineD3DSwapChain_Release(This) (This)->lpVtbl->Release(This)
/*** IWineD3DBase methods ***/
#define IWineD3DSwapChain_GetParent(This,parent) (This)->lpVtbl->GetParent(This,parent)
/*** IWineD3DSwapChain methods ***/
#define IWineD3DSwapChain_Destroy(This) (This)->lpVtbl->Destroy(This)
#define IWineD3DSwapChain_GetDevice(This,device) (This)->lpVtbl->GetDevice(This,device)
#define IWineD3DSwapChain_Present(This,src_rect,dst_rect,dst_window_override,dirty_region,flags) (This)->lpVtbl->Present(This,src_rect,dst_rect,dst_window_override,dirty_region,flags)
#define IWineD3DSwapChain_SetDestWindowOverride(This,window) (This)->lpVtbl->SetDestWindowOverride(This,window)
#define IWineD3DSwapChain_GetFrontBufferData(This,dst_surface) (This)->lpVtbl->GetFrontBufferData(This,dst_surface)
#define IWineD3DSwapChain_GetBackBuffer(This,backbuffer_idx,backbuffer_type,backbuffer) (This)->lpVtbl->GetBackBuffer(This,backbuffer_idx,backbuffer_type,backbuffer)
#define IWineD3DSwapChain_GetRasterStatus(This,raster_status) (This)->lpVtbl->GetRasterStatus(This,raster_status)
#define IWineD3DSwapChain_GetDisplayMode(This,mode) (This)->lpVtbl->GetDisplayMode(This,mode)
#define IWineD3DSwapChain_GetPresentParameters(This,present_parameters) (This)->lpVtbl->GetPresentParameters(This,present_parameters)
#define IWineD3DSwapChain_SetGammaRamp(This,flags,ramp) (This)->lpVtbl->SetGammaRamp(This,flags,ramp)
#define IWineD3DSwapChain_GetGammaRamp(This,ramp) (This)->lpVtbl->GetGammaRamp(This,ramp)
#ifdef VBOX_WITH_WDDM
#define IWineD3DSwapChain_Flush(This) (This)->lpVtbl->Flush(This)
#define IWineD3DSwapChain_PresentRt(This,surf) (This)->lpVtbl->PresentRt(This,surf)
#endif
#endif

#endif

void STDMETHODCALLTYPE IWineD3DSwapChain_Destroy_Proxy(
    IWineD3DSwapChain* This);
void __RPC_STUB IWineD3DSwapChain_Destroy_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DSwapChain_GetDevice_Proxy(
    IWineD3DSwapChain* This,
    IWineD3DDevice **device);
void __RPC_STUB IWineD3DSwapChain_GetDevice_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DSwapChain_Present_Proxy(
    IWineD3DSwapChain* This,
    const RECT *src_rect,
    const RECT *dst_rect,
    HWND dst_window_override,
    const RGNDATA *dirty_region,
    DWORD flags);
void __RPC_STUB IWineD3DSwapChain_Present_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DSwapChain_SetDestWindowOverride_Proxy(
    IWineD3DSwapChain* This,
    HWND window);
void __RPC_STUB IWineD3DSwapChain_SetDestWindowOverride_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DSwapChain_GetFrontBufferData_Proxy(
    IWineD3DSwapChain* This,
    IWineD3DSurface *dst_surface);
void __RPC_STUB IWineD3DSwapChain_GetFrontBufferData_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DSwapChain_GetBackBuffer_Proxy(
    IWineD3DSwapChain* This,
    UINT backbuffer_idx,
    WINED3DBACKBUFFER_TYPE backbuffer_type,
    IWineD3DSurface **backbuffer);
void __RPC_STUB IWineD3DSwapChain_GetBackBuffer_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DSwapChain_GetRasterStatus_Proxy(
    IWineD3DSwapChain* This,
    WINED3DRASTER_STATUS *raster_status);
void __RPC_STUB IWineD3DSwapChain_GetRasterStatus_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DSwapChain_GetDisplayMode_Proxy(
    IWineD3DSwapChain* This,
    WINED3DDISPLAYMODE *mode);
void __RPC_STUB IWineD3DSwapChain_GetDisplayMode_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DSwapChain_GetPresentParameters_Proxy(
    IWineD3DSwapChain* This,
    WINED3DPRESENT_PARAMETERS *present_parameters);
void __RPC_STUB IWineD3DSwapChain_GetPresentParameters_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DSwapChain_SetGammaRamp_Proxy(
    IWineD3DSwapChain* This,
    DWORD flags,
    const WINED3DGAMMARAMP *ramp);
void __RPC_STUB IWineD3DSwapChain_SetGammaRamp_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DSwapChain_GetGammaRamp_Proxy(
    IWineD3DSwapChain* This,
    WINED3DGAMMARAMP *ramp);
void __RPC_STUB IWineD3DSwapChain_GetGammaRamp_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IWineD3DSwapChain_INTERFACE_DEFINED__ */

/*****************************************************************************
 * IWineD3DBuffer interface
 */
#ifndef __IWineD3DBuffer_INTERFACE_DEFINED__
#define __IWineD3DBuffer_INTERFACE_DEFINED__

DEFINE_GUID(IID_IWineD3DBuffer, 0xb3f028e8, 0x1a40, 0x4ab3, 0x92,0x92, 0x5b,0xf6,0xcf,0xd8,0x02,0x09);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface IWineD3DBuffer : public IWineD3DResource
{
    virtual HRESULT STDMETHODCALLTYPE Map(
        UINT offset,
        UINT size,
        BYTE **data,
        DWORD flags) = 0;

    virtual HRESULT STDMETHODCALLTYPE Unmap(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetDesc(
        WINED3DBUFFER_DESC *desc) = 0;

};
#else
typedef struct IWineD3DBufferVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IWineD3DBuffer* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IWineD3DBuffer* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IWineD3DBuffer* This);

    /*** IWineD3DBase methods ***/
    HRESULT (STDMETHODCALLTYPE *GetParent)(
        IWineD3DBuffer* This,
        IUnknown **parent);

    /*** IWineD3DResource methods ***/
    HRESULT (STDMETHODCALLTYPE *SetPrivateData)(
        IWineD3DBuffer* This,
        REFGUID guid,
        const void *data,
        DWORD data_size,
        DWORD flags);

    HRESULT (STDMETHODCALLTYPE *GetPrivateData)(
        IWineD3DBuffer* This,
        REFGUID guid,
        void *data,
        DWORD *data_size);

    HRESULT (STDMETHODCALLTYPE *FreePrivateData)(
        IWineD3DBuffer* This,
        REFGUID guid);

    DWORD (STDMETHODCALLTYPE *SetPriority)(
        IWineD3DBuffer* This,
        DWORD new_priority);

    DWORD (STDMETHODCALLTYPE *GetPriority)(
        IWineD3DBuffer* This);

    void (STDMETHODCALLTYPE *PreLoad)(
        IWineD3DBuffer* This);

    void (STDMETHODCALLTYPE *UnLoad)(
        IWineD3DBuffer* This);

    WINED3DRESOURCETYPE (STDMETHODCALLTYPE *GetType)(
        IWineD3DBuffer* This);

#ifdef VBOX_WITH_WDDM
    HRESULT (STDMETHODCALLTYPE *SetShRcState)(
        IWineD3DResource* This,
        VBOXWINEEX_SHRC_STATE enmState);
#endif

    /*** IWineD3DBuffer methods ***/
    HRESULT (STDMETHODCALLTYPE *Map)(
        IWineD3DBuffer* This,
        UINT offset,
        UINT size,
        BYTE **data,
        DWORD flags);

    HRESULT (STDMETHODCALLTYPE *Unmap)(
        IWineD3DBuffer* This);

    HRESULT (STDMETHODCALLTYPE *GetDesc)(
        IWineD3DBuffer* This,
        WINED3DBUFFER_DESC *desc);

    END_INTERFACE
} IWineD3DBufferVtbl;
interface IWineD3DBuffer {
    CONST_VTBL IWineD3DBufferVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IWineD3DBuffer_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IWineD3DBuffer_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IWineD3DBuffer_Release(This) (This)->lpVtbl->Release(This)
/*** IWineD3DBase methods ***/
#define IWineD3DBuffer_GetParent(This,parent) (This)->lpVtbl->GetParent(This,parent)
/*** IWineD3DResource methods ***/
#define IWineD3DBuffer_SetPrivateData(This,guid,data,data_size,flags) (This)->lpVtbl->SetPrivateData(This,guid,data,data_size,flags)
#define IWineD3DBuffer_GetPrivateData(This,guid,data,data_size) (This)->lpVtbl->GetPrivateData(This,guid,data,data_size)
#define IWineD3DBuffer_FreePrivateData(This,guid) (This)->lpVtbl->FreePrivateData(This,guid)
#define IWineD3DBuffer_SetPriority(This,new_priority) (This)->lpVtbl->SetPriority(This,new_priority)
#define IWineD3DBuffer_GetPriority(This) (This)->lpVtbl->GetPriority(This)
#define IWineD3DBuffer_PreLoad(This) (This)->lpVtbl->PreLoad(This)
#define IWineD3DBuffer_UnLoad(This) (This)->lpVtbl->UnLoad(This)
#define IWineD3DBuffer_GetType(This) (This)->lpVtbl->GetType(This)
/*** IWineD3DBuffer methods ***/
#define IWineD3DBuffer_Map(This,offset,size,data,flags) (This)->lpVtbl->Map(This,offset,size,data,flags)
#define IWineD3DBuffer_Unmap(This) (This)->lpVtbl->Unmap(This)
#define IWineD3DBuffer_GetDesc(This,desc) (This)->lpVtbl->GetDesc(This,desc)
#endif

#endif

HRESULT STDMETHODCALLTYPE IWineD3DBuffer_Map_Proxy(
    IWineD3DBuffer* This,
    UINT offset,
    UINT size,
    BYTE **data,
    DWORD flags);
void __RPC_STUB IWineD3DBuffer_Map_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DBuffer_Unmap_Proxy(
    IWineD3DBuffer* This);
void __RPC_STUB IWineD3DBuffer_Unmap_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DBuffer_GetDesc_Proxy(
    IWineD3DBuffer* This,
    WINED3DBUFFER_DESC *desc);
void __RPC_STUB IWineD3DBuffer_GetDesc_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IWineD3DBuffer_INTERFACE_DEFINED__ */

/*****************************************************************************
 * IWineD3DBaseShader interface
 */
#ifndef __IWineD3DBaseShader_INTERFACE_DEFINED__
#define __IWineD3DBaseShader_INTERFACE_DEFINED__

DEFINE_GUID(IID_IWineD3DBaseShader, 0xeac93065, 0xa4df, 0x446f, 0x86,0xa1, 0x9e,0xf2,0xbc,0xa4,0x0a,0x3c);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface IWineD3DBaseShader : public IWineD3DBase
{
    virtual HRESULT STDMETHODCALLTYPE GetFunction(
        void *data,
        UINT *data_size) = 0;

};
#else
typedef struct IWineD3DBaseShaderVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IWineD3DBaseShader* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IWineD3DBaseShader* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IWineD3DBaseShader* This);

    /*** IWineD3DBase methods ***/
    HRESULT (STDMETHODCALLTYPE *GetParent)(
        IWineD3DBaseShader* This,
        IUnknown **parent);

    /*** IWineD3DBaseShader methods ***/
    HRESULT (STDMETHODCALLTYPE *GetFunction)(
        IWineD3DBaseShader* This,
        void *data,
        UINT *data_size);

    END_INTERFACE
} IWineD3DBaseShaderVtbl;
interface IWineD3DBaseShader {
    CONST_VTBL IWineD3DBaseShaderVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IWineD3DBaseShader_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IWineD3DBaseShader_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IWineD3DBaseShader_Release(This) (This)->lpVtbl->Release(This)
/*** IWineD3DBase methods ***/
#define IWineD3DBaseShader_GetParent(This,parent) (This)->lpVtbl->GetParent(This,parent)
/*** IWineD3DBaseShader methods ***/
#define IWineD3DBaseShader_GetFunction(This,data,data_size) (This)->lpVtbl->GetFunction(This,data,data_size)
#endif

#endif

HRESULT STDMETHODCALLTYPE IWineD3DBaseShader_GetFunction_Proxy(
    IWineD3DBaseShader* This,
    void *data,
    UINT *data_size);
void __RPC_STUB IWineD3DBaseShader_GetFunction_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IWineD3DBaseShader_INTERFACE_DEFINED__ */

/*****************************************************************************
 * IWineD3DVertexShader interface
 */
#ifndef __IWineD3DVertexShader_INTERFACE_DEFINED__
#define __IWineD3DVertexShader_INTERFACE_DEFINED__

DEFINE_GUID(IID_IWineD3DVertexShader, 0x7f7a2b60, 0x6f30, 0x11d9, 0xc6,0x87, 0x00,0x04,0x61,0x42,0xc1,0x4f);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface IWineD3DVertexShader : public IWineD3DBaseShader
{
    virtual HRESULT STDMETHODCALLTYPE SetLocalConstantsF(
        UINT start_idx,
        const float *src_data,
        UINT vector4f_count) = 0;

};
#else
typedef struct IWineD3DVertexShaderVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IWineD3DVertexShader* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IWineD3DVertexShader* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IWineD3DVertexShader* This);

    /*** IWineD3DBase methods ***/
    HRESULT (STDMETHODCALLTYPE *GetParent)(
        IWineD3DVertexShader* This,
        IUnknown **parent);

    /*** IWineD3DBaseShader methods ***/
    HRESULT (STDMETHODCALLTYPE *GetFunction)(
        IWineD3DVertexShader* This,
        void *data,
        UINT *data_size);

    /*** IWineD3DVertexShader methods ***/
    HRESULT (STDMETHODCALLTYPE *SetLocalConstantsF)(
        IWineD3DVertexShader* This,
        UINT start_idx,
        const float *src_data,
        UINT vector4f_count);

    END_INTERFACE
} IWineD3DVertexShaderVtbl;
interface IWineD3DVertexShader {
    CONST_VTBL IWineD3DVertexShaderVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IWineD3DVertexShader_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IWineD3DVertexShader_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IWineD3DVertexShader_Release(This) (This)->lpVtbl->Release(This)
/*** IWineD3DBase methods ***/
#define IWineD3DVertexShader_GetParent(This,parent) (This)->lpVtbl->GetParent(This,parent)
/*** IWineD3DBaseShader methods ***/
#define IWineD3DVertexShader_GetFunction(This,data,data_size) (This)->lpVtbl->GetFunction(This,data,data_size)
/*** IWineD3DVertexShader methods ***/
#define IWineD3DVertexShader_SetLocalConstantsF(This,start_idx,src_data,vector4f_count) (This)->lpVtbl->SetLocalConstantsF(This,start_idx,src_data,vector4f_count)
#endif

#endif

HRESULT STDMETHODCALLTYPE IWineD3DVertexShader_SetLocalConstantsF_Proxy(
    IWineD3DVertexShader* This,
    UINT start_idx,
    const float *src_data,
    UINT vector4f_count);
void __RPC_STUB IWineD3DVertexShader_SetLocalConstantsF_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IWineD3DVertexShader_INTERFACE_DEFINED__ */

/*****************************************************************************
 * IWineD3DGeometryShader interface
 */
#ifndef __IWineD3DGeometryShader_INTERFACE_DEFINED__
#define __IWineD3DGeometryShader_INTERFACE_DEFINED__

DEFINE_GUID(IID_IWineD3DGeometryShader, 0x8276c113, 0x388b, 0x49d1, 0xad,0x8b, 0xc9,0xdd,0x8b,0xcb,0xab,0xcd);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface IWineD3DGeometryShader : public IWineD3DBaseShader
{
};
#else
typedef struct IWineD3DGeometryShaderVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IWineD3DGeometryShader* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IWineD3DGeometryShader* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IWineD3DGeometryShader* This);

    /*** IWineD3DBase methods ***/
    HRESULT (STDMETHODCALLTYPE *GetParent)(
        IWineD3DGeometryShader* This,
        IUnknown **parent);

    /*** IWineD3DBaseShader methods ***/
    HRESULT (STDMETHODCALLTYPE *GetFunction)(
        IWineD3DGeometryShader* This,
        void *data,
        UINT *data_size);

    END_INTERFACE
} IWineD3DGeometryShaderVtbl;
interface IWineD3DGeometryShader {
    CONST_VTBL IWineD3DGeometryShaderVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IWineD3DGeometryShader_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IWineD3DGeometryShader_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IWineD3DGeometryShader_Release(This) (This)->lpVtbl->Release(This)
/*** IWineD3DBase methods ***/
#define IWineD3DGeometryShader_GetParent(This,parent) (This)->lpVtbl->GetParent(This,parent)
/*** IWineD3DBaseShader methods ***/
#define IWineD3DGeometryShader_GetFunction(This,data,data_size) (This)->lpVtbl->GetFunction(This,data,data_size)
#endif

#endif


#endif  /* __IWineD3DGeometryShader_INTERFACE_DEFINED__ */

/*****************************************************************************
 * IWineD3DPixelShader interface
 */
#ifndef __IWineD3DPixelShader_INTERFACE_DEFINED__
#define __IWineD3DPixelShader_INTERFACE_DEFINED__

DEFINE_GUID(IID_IWineD3DPixelShader, 0x818503da, 0x6f30, 0x11d9, 0xc6,0x87, 0x00,0x04,0x61,0x42,0xc1,0x4f);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface IWineD3DPixelShader : public IWineD3DBaseShader
{
};
#else
typedef struct IWineD3DPixelShaderVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IWineD3DPixelShader* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IWineD3DPixelShader* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IWineD3DPixelShader* This);

    /*** IWineD3DBase methods ***/
    HRESULT (STDMETHODCALLTYPE *GetParent)(
        IWineD3DPixelShader* This,
        IUnknown **parent);

    /*** IWineD3DBaseShader methods ***/
    HRESULT (STDMETHODCALLTYPE *GetFunction)(
        IWineD3DPixelShader* This,
        void *data,
        UINT *data_size);

    END_INTERFACE
} IWineD3DPixelShaderVtbl;
interface IWineD3DPixelShader {
    CONST_VTBL IWineD3DPixelShaderVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IWineD3DPixelShader_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IWineD3DPixelShader_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IWineD3DPixelShader_Release(This) (This)->lpVtbl->Release(This)
/*** IWineD3DBase methods ***/
#define IWineD3DPixelShader_GetParent(This,parent) (This)->lpVtbl->GetParent(This,parent)
/*** IWineD3DBaseShader methods ***/
#define IWineD3DPixelShader_GetFunction(This,data,data_size) (This)->lpVtbl->GetFunction(This,data,data_size)
#endif

#endif


#endif  /* __IWineD3DPixelShader_INTERFACE_DEFINED__ */

/*****************************************************************************
 * IWineD3DDevice interface
 */
#ifndef __IWineD3DDevice_INTERFACE_DEFINED__
#define __IWineD3DDevice_INTERFACE_DEFINED__

DEFINE_GUID(IID_IWineD3DDevice, 0x6d10a2ce, 0x09d0, 0x4a53, 0xa4,0x27, 0x11,0x38,0x8f,0x9f,0x8c,0xa5);
#if defined(__cplusplus) && !defined(CINTERFACE)
interface IWineD3DDevice : public IWineD3DBase
{
    virtual HRESULT STDMETHODCALLTYPE CreateBuffer(
        struct wined3d_buffer_desc *desc,
        const void *data,
        IUnknown *parent,
        const struct wined3d_parent_ops *parent_ops,
        IWineD3DBuffer **buffer) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateVertexBuffer(
        UINT length,
        DWORD usage,
        WINED3DPOOL pool,
        IWineD3DBuffer **vertex_buffer,
        IUnknown *parent,
        const struct wined3d_parent_ops *parent_ops) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateIndexBuffer(
        UINT length,
        DWORD usage,
        WINED3DPOOL pool,
        IWineD3DBuffer **index_buffer,
        IUnknown *parent,
        const struct wined3d_parent_ops *parent_ops) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateStateBlock(
        WINED3DSTATEBLOCKTYPE type,
        IWineD3DStateBlock **stateblock,
        IUnknown *parent) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateSurface(
        UINT width,
        UINT height,
        WINED3DFORMAT format,
        BOOL lockable,
        BOOL discard,
        UINT level,
        IWineD3DSurface **surface,
        DWORD usage,
        WINED3DPOOL pool,
        WINED3DMULTISAMPLE_TYPE multisample_type,
        DWORD multisample_quality,
        WINED3DSURFTYPE surface_type,
        IUnknown *parent,
        const struct wined3d_parent_ops *parent_ops) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateRendertargetView(
        IWineD3DResource *resource,
        IUnknown *parent,
        IWineD3DRendertargetView **rendertarget_view) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateTexture(
        UINT width,
        UINT height,
        UINT levels,
        DWORD usage,
        WINED3DFORMAT format,
        WINED3DPOOL pool,
        IWineD3DTexture **texture,
        IUnknown *parent,
        const struct wined3d_parent_ops *parent_ops) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateVolumeTexture(
        UINT width,
        UINT height,
        UINT depth,
        UINT levels,
        DWORD usage,
        WINED3DFORMAT format,
        WINED3DPOOL pool,
        IWineD3DVolumeTexture **texture,
        IUnknown *parent,
        const struct wined3d_parent_ops *parent_ops
#ifdef VBOX_WITH_WDDM
        , HANDLE *shared_handle
        , void *pavClientMem
#endif
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateVolume(
        UINT width,
        UINT height,
        UINT depth,
        DWORD usage,
        WINED3DFORMAT format,
        WINED3DPOOL pool,
        IWineD3DVolume **volume,
        IUnknown *parent,
        const struct wined3d_parent_ops *parent_ops
#ifdef VBOX_WITH_WDDM
        , HANDLE *shared_handle
        , void *pvClientMem
#endif
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateCubeTexture(
        UINT edge_length,
        UINT levels,
        DWORD usage,
        WINED3DFORMAT format,
        WINED3DPOOL pool,
        IWineD3DCubeTexture **texture,
        IUnknown *parent,
        const struct wined3d_parent_ops *parent_ops) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateQuery(
        WINED3DQUERYTYPE type,
        IWineD3DQuery **query,
        IUnknown *parent) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateSwapChain(
        WINED3DPRESENT_PARAMETERS *present_parameters,
        IWineD3DSwapChain **swapchain,
        IUnknown *parent,
        WINED3DSURFTYPE surface_type) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateVertexDeclaration(
        IWineD3DVertexDeclaration **declaration,
        IUnknown *parent,
        const struct wined3d_parent_ops *parent_ops,
        const WINED3DVERTEXELEMENT *elements,
        UINT element_count) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateVertexDeclarationFromFVF(
        IWineD3DVertexDeclaration **declaration,
        IUnknown *parent,
        const struct wined3d_parent_ops *parent_ops,
        DWORD fvf) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateVertexShader(
        const DWORD *function,
        const struct wined3d_shader_signature *output_signature,
        IWineD3DVertexShader **shader,
        IUnknown *parent,
        const struct wined3d_parent_ops *parent_ops) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreateGeometryShader(
        const DWORD *byte_code,
        const struct wined3d_shader_signature *output_signature,
        IWineD3DGeometryShader **shader,
        IUnknown *parent,
        const struct wined3d_parent_ops *parent_ops) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreatePixelShader(
        const DWORD *function,
        const struct wined3d_shader_signature *output_signature,
        IWineD3DPixelShader **shader,
        IUnknown *parent,
        const struct wined3d_parent_ops *parent_ops) = 0;

    virtual HRESULT STDMETHODCALLTYPE CreatePalette(
        DWORD flags,
        const PALETTEENTRY *palette_entry,
        IWineD3DPalette **palette,
        IUnknown *parent) = 0;

    virtual HRESULT STDMETHODCALLTYPE Init3D(
        WINED3DPRESENT_PARAMETERS *present_parameters) = 0;

    virtual HRESULT STDMETHODCALLTYPE InitGDI(
        WINED3DPRESENT_PARAMETERS *present_parameters) = 0;

    virtual HRESULT STDMETHODCALLTYPE Uninit3D(
        ULONG (STDMETHODCALLTYPE * destroy_swapchain_callback)(IWineD3DSwapChain *pSwapChain)) = 0;

    virtual HRESULT STDMETHODCALLTYPE UninitGDI(
        ULONG (STDMETHODCALLTYPE * destroy_swapchain_callback)(IWineD3DSwapChain *pSwapChain)) = 0;

    virtual void STDMETHODCALLTYPE SetMultithreaded(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE EvictManagedResources(
        ) = 0;

    virtual UINT STDMETHODCALLTYPE GetAvailableTextureMem(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetBackBuffer(
        UINT swapchain_idx,
        UINT backbuffer_idx,
        WINED3DBACKBUFFER_TYPE backbuffer_type,
        IWineD3DSurface **backbuffer) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetCreationParameters(
        WINED3DDEVICE_CREATION_PARAMETERS *creation_parameters) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetDeviceCaps(
        WINED3DCAPS *caps) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetDirect3D(
        IWineD3D **d3d) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetDisplayMode(
        UINT swapchain_idx,
        WINED3DDISPLAYMODE *mode) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetDisplayMode(
        UINT swapchain_idx,
        const WINED3DDISPLAYMODE *mode) = 0;

    virtual UINT STDMETHODCALLTYPE GetNumberOfSwapChains(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetRasterStatus(
        UINT swapchain_idx,
        WINED3DRASTER_STATUS *raster_status) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetSwapChain(
        UINT swapchain_idx,
        IWineD3DSwapChain **swapchain) = 0;

    virtual HRESULT STDMETHODCALLTYPE Reset(
        WINED3DPRESENT_PARAMETERS *present_parameters) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetDialogBoxMode(
        BOOL enable_dialogs) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetCursorProperties(
        UINT x_hotspot,
        UINT y_hotspot,
        IWineD3DSurface *cursor_surface) = 0;

    virtual void STDMETHODCALLTYPE SetCursorPosition(
        int x_screen_space,
        int y_screen_space,
        DWORD flags) = 0;

    virtual BOOL STDMETHODCALLTYPE ShowCursor(
        BOOL show) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetClipPlane(
        DWORD plane_idx,
        const float *plane) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetClipPlane(
        DWORD plane_idx,
        float *plane) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetClipStatus(
        const WINED3DCLIPSTATUS *clip_status) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetClipStatus(
        WINED3DCLIPSTATUS *clip_status) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetCurrentTexturePalette(
        UINT palette_number) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetCurrentTexturePalette(
        UINT *palette_number) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetDepthStencilSurface(
        IWineD3DSurface *depth_stencil) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetDepthStencilSurface(
        IWineD3DSurface **depth_stencil) = 0;

    virtual void STDMETHODCALLTYPE SetGammaRamp(
        UINT swapchain_idx,
        DWORD flags,
        const WINED3DGAMMARAMP *ramp) = 0;

    virtual void STDMETHODCALLTYPE GetGammaRamp(
        UINT swapchain_idx,
        WINED3DGAMMARAMP *ramp) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetIndexBuffer(
        IWineD3DBuffer *index_buffer,
        WINED3DFORMAT format) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetIndexBuffer(
        IWineD3DBuffer **index_buffer) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetBaseVertexIndex(
        INT base_index) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetBaseVertexIndex(
        INT *base_index) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetLight(
        DWORD light_idx,
        const WINED3DLIGHT *light) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetLight(
        DWORD light_idx,
        WINED3DLIGHT *light) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetLightEnable(
        DWORD light_idx,
        BOOL enable) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetLightEnable(
        DWORD light_idx,
        BOOL *enable) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetMaterial(
        const WINED3DMATERIAL *material) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetMaterial(
        WINED3DMATERIAL *material) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetNPatchMode(
        float segments) = 0;

    virtual float STDMETHODCALLTYPE GetNPatchMode(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetPaletteEntries(
        UINT palette_number,
        const PALETTEENTRY *entries) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetPaletteEntries(
        UINT palette_number,
        PALETTEENTRY *entries) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetPixelShader(
        IWineD3DPixelShader *shader) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetPixelShader(
        IWineD3DPixelShader **shader) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetPixelShaderConstantB(
        UINT start_register,
        const BOOL *constants,
        UINT bool_count) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetPixelShaderConstantB(
        UINT start_register,
        BOOL *constants,
        UINT bool_count) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetPixelShaderConstantI(
        UINT start_register,
        const int *constants,
        UINT vector4i_count) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetPixelShaderConstantI(
        UINT start_register,
        int *constants,
        UINT vector4i_count) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetPixelShaderConstantF(
        UINT start_register,
        const float *constants,
        UINT vector4f_count) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetPixelShaderConstantF(
        UINT start_register,
        float *constants,
        UINT vector4f_count) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetRenderState(
        WINED3DRENDERSTATETYPE state,
        DWORD value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetRenderState(
        WINED3DRENDERSTATETYPE state,
        DWORD *value) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetRenderTarget(
        DWORD render_target_idx,
        IWineD3DSurface *render_target,
        BOOL set_viewport) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetRenderTarget(
        DWORD render_target_idx,
        IWineD3DSurface **render_target) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetFrontBackBuffers(
        IWineD3DSurface *front,
        IWineD3DSurface *back) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetSamplerState(
        DWORD sampler_idx,
        WINED3DSAMPLERSTATETYPE state,
        DWORD value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetSamplerState(
        DWORD sampler_idx,
        WINED3DSAMPLERSTATETYPE state,
        DWORD *value) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetScissorRect(
        const RECT *rect) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetScissorRect(
        RECT *rect) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetSoftwareVertexProcessing(
        BOOL software) = 0;

    virtual BOOL STDMETHODCALLTYPE GetSoftwareVertexProcessing(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetStreamSource(
        UINT stream_idx,
        IWineD3DBuffer *buffer,
        UINT offset,
        UINT stride) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetStreamSource(
        UINT stream_idx,
        IWineD3DBuffer **buffer,
        UINT *offset,
        UINT *stride) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetStreamSourceFreq(
        UINT stream_idx,
        UINT divider) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetStreamSourceFreq(
        UINT stream_idx,
        UINT *divider) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetTexture(
        DWORD stage,
        IWineD3DBaseTexture *texture) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetTexture(
        DWORD stage,
        IWineD3DBaseTexture **texture) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetTextureStageState(
        DWORD stage,
        WINED3DTEXTURESTAGESTATETYPE state,
        DWORD value) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetTextureStageState(
        DWORD stage,
        WINED3DTEXTURESTAGESTATETYPE state,
        DWORD *value) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetTransform(
        WINED3DTRANSFORMSTATETYPE state,
        const WINED3DMATRIX *matrix) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetTransform(
        WINED3DTRANSFORMSTATETYPE state,
        WINED3DMATRIX *matrix) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetVertexDeclaration(
        IWineD3DVertexDeclaration *declaration) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetVertexDeclaration(
        IWineD3DVertexDeclaration **declaration) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetVertexShader(
        IWineD3DVertexShader *shader) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetVertexShader(
        IWineD3DVertexShader **shader) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetVertexShaderConstantB(
        UINT start_register,
        const BOOL *constants,
        UINT bool_count) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetVertexShaderConstantB(
        UINT start_register,
        BOOL *constants,
        UINT bool_count) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetVertexShaderConstantI(
        UINT start_register,
        const int *constants,
        UINT vector4i_count) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetVertexShaderConstantI(
        UINT start_register,
        int *constants,
        UINT vector4i_count) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetVertexShaderConstantF(
        UINT start_register,
        const float *constants,
        UINT vector4f_count) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetVertexShaderConstantF(
        UINT start_register,
        float *constants,
        UINT vector4f_count) = 0;

    virtual HRESULT STDMETHODCALLTYPE SetViewport(
        const WINED3DVIEWPORT *viewport) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetViewport(
        WINED3DVIEWPORT *viewport) = 0;

    virtual HRESULT STDMETHODCALLTYPE MultiplyTransform(
        WINED3DTRANSFORMSTATETYPE state,
        const WINED3DMATRIX *matrix) = 0;

    virtual HRESULT STDMETHODCALLTYPE ValidateDevice(
        DWORD *num_passes) = 0;

    virtual HRESULT STDMETHODCALLTYPE ProcessVertices(
        UINT src_start_idx,
        UINT dst_idx,
        UINT vertex_count,
        IWineD3DBuffer *dest_buffer,
        IWineD3DVertexDeclaration *declaration,
        DWORD flags,
        DWORD DestFVF) = 0;

    virtual HRESULT STDMETHODCALLTYPE BeginStateBlock(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE EndStateBlock(
        IWineD3DStateBlock **stateblock) = 0;

    virtual HRESULT STDMETHODCALLTYPE BeginScene(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE EndScene(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE Present(
        const RECT *src_rect,
        const RECT *dst_rect,
        HWND dst_window_override,
        const RGNDATA *dirty_region) = 0;

    virtual HRESULT STDMETHODCALLTYPE Clear(
        DWORD rect_count,
        const WINED3DRECT *rects,
        DWORD flags,
        WINED3DCOLOR color,
        float z,
        DWORD stencil) = 0;

    virtual void STDMETHODCALLTYPE ClearRendertargetView(
        IWineD3DRendertargetView *rendertarget_view,
        const float color[4]) = 0;

    virtual void STDMETHODCALLTYPE SetPrimitiveType(
        WINED3DPRIMITIVETYPE primitive_topology) = 0;

    virtual void STDMETHODCALLTYPE GetPrimitiveType(
        WINED3DPRIMITIVETYPE *primitive_topology) = 0;

    virtual HRESULT STDMETHODCALLTYPE DrawPrimitive(
        UINT start_vertex,
        UINT vertex_count) = 0;

    virtual HRESULT STDMETHODCALLTYPE DrawIndexedPrimitive(
        UINT start_idx,
        UINT index_count) = 0;

    virtual HRESULT STDMETHODCALLTYPE DrawPrimitiveUP(
        UINT vertex_count,
        const void *stream_data,
        UINT stream_stride) = 0;

    virtual HRESULT STDMETHODCALLTYPE DrawIndexedPrimitiveUP(
        UINT index_count,
        const void *index_data,
        WINED3DFORMAT index_data_format,
        const void *stream_data,
        UINT stream_stride) = 0;

    virtual HRESULT STDMETHODCALLTYPE DrawPrimitiveStrided(
        UINT vertex_count,
        const WineDirect3DVertexStridedData *strided_data) = 0;

    virtual HRESULT STDMETHODCALLTYPE DrawIndexedPrimitiveStrided(
        UINT index_count,
        const WineDirect3DVertexStridedData *strided_data,
        UINT vertex_count,
        const void *index_data,
        WINED3DFORMAT index_data_format) = 0;

    virtual HRESULT STDMETHODCALLTYPE DrawRectPatch(
        UINT handle,
        const float *num_segs,
        const WINED3DRECTPATCH_INFO *rect_patch_info) = 0;

    virtual HRESULT STDMETHODCALLTYPE DrawTriPatch(
        UINT handle,
        const float *num_segs,
        const WINED3DTRIPATCH_INFO *tri_patch_info) = 0;

    virtual HRESULT STDMETHODCALLTYPE DeletePatch(
        UINT handle) = 0;

    virtual HRESULT STDMETHODCALLTYPE ColorFill(
        IWineD3DSurface *surface,
        const WINED3DRECT *rect,
        WINED3DCOLOR color) = 0;

    virtual HRESULT STDMETHODCALLTYPE UpdateTexture(
        IWineD3DBaseTexture *src_texture,
        IWineD3DBaseTexture *dst_texture) = 0;

    virtual HRESULT STDMETHODCALLTYPE UpdateSurface(
        IWineD3DSurface *src_surface,
        const RECT *src_rect,
        IWineD3DSurface *dst_surface,
        const POINT *dst_point) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetFrontBufferData(
        UINT swapchain_idx,
        IWineD3DSurface *dst_surface) = 0;

    virtual HRESULT STDMETHODCALLTYPE EnumResources(
        HRESULT (STDMETHODCALLTYPE * callback)(IWineD3DResource *resource,void *pData),
        void *data) = 0;

    virtual HRESULT STDMETHODCALLTYPE GetSurfaceFromDC(
        HDC dc,
        IWineD3DSurface **surface) = 0;

    virtual HRESULT STDMETHODCALLTYPE AcquireFocusWindow(
        HWND window) = 0;

    virtual void STDMETHODCALLTYPE ReleaseFocusWindow(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE AddSwapChain(
        IWineD3DSwapChain *swapchain) = 0;

    virtual HRESULT STDMETHODCALLTYPE RemoveSwapChain(
        IWineD3DSwapChain *swapchain) = 0;

#ifdef VBOX_WITH_WDDM
    virtual HRESULT STDMETHODCALLTYPE Flush(
        ) = 0;

    virtual HRESULT STDMETHODCALLTYPE VolBlt(IWineD3DDevice *iface,
            IWineD3DVolume *pSourceVolume, IWineD3DVolume *pDestinationVolume,
            const WINED3DBOX *pSrcBoxArg,
            const VBOXPOINT3D *pDstPoin3D
            ) = 0;

    virtual HRESULT STDMETHODCALLTYPE VolTexBlt(IWineD3DDevice *iface,
            IWineD3DVolumeTexture *pSourceTexture, IWineD3DVolumeTexture *pDestinationTexture,
            const WINED3DBOX *pSrcBoxArg,
            const VBOXPOINT3D *pDstPoin3D
            ) = 0;
#endif
};
#else
typedef struct IWineD3DDeviceVtbl {
    BEGIN_INTERFACE

    /*** IUnknown methods ***/
    HRESULT (STDMETHODCALLTYPE *QueryInterface)(
        IWineD3DDevice* This,
        REFIID riid,
        void **ppvObject);

    ULONG (STDMETHODCALLTYPE *AddRef)(
        IWineD3DDevice* This);

    ULONG (STDMETHODCALLTYPE *Release)(
        IWineD3DDevice* This);

    /*** IWineD3DBase methods ***/
    HRESULT (STDMETHODCALLTYPE *GetParent)(
        IWineD3DDevice* This,
        IUnknown **parent);

    /*** IWineD3DDevice methods ***/
    HRESULT (STDMETHODCALLTYPE *CreateBuffer)(
        IWineD3DDevice* This,
        struct wined3d_buffer_desc *desc,
        const void *data,
        IUnknown *parent,
        const struct wined3d_parent_ops *parent_ops,
        IWineD3DBuffer **buffer);

    HRESULT (STDMETHODCALLTYPE *CreateVertexBuffer)(
        IWineD3DDevice* This,
        UINT length,
        DWORD usage,
        WINED3DPOOL pool,
        IWineD3DBuffer **vertex_buffer,
        IUnknown *parent,
        const struct wined3d_parent_ops *parent_ops);

    HRESULT (STDMETHODCALLTYPE *CreateIndexBuffer)(
        IWineD3DDevice* This,
        UINT length,
        DWORD usage,
        WINED3DPOOL pool,
        IWineD3DBuffer **index_buffer,
        IUnknown *parent,
        const struct wined3d_parent_ops *parent_ops);

    HRESULT (STDMETHODCALLTYPE *CreateStateBlock)(
        IWineD3DDevice* This,
        WINED3DSTATEBLOCKTYPE type,
        IWineD3DStateBlock **stateblock,
        IUnknown *parent);

    HRESULT (STDMETHODCALLTYPE *CreateSurface)(
        IWineD3DDevice* This,
        UINT width,
        UINT height,
        WINED3DFORMAT format,
        BOOL lockable,
        BOOL discard,
        UINT level,
        IWineD3DSurface **surface,
        DWORD usage,
        WINED3DPOOL pool,
        WINED3DMULTISAMPLE_TYPE multisample_type,
        DWORD multisample_quality,
        WINED3DSURFTYPE surface_type,
        IUnknown *parent,
        const struct wined3d_parent_ops *parent_ops
#ifdef VBOX_WITH_WDDM
        , HANDLE *shared_handle
        , void *pvClientMem
#endif
        );

    HRESULT (STDMETHODCALLTYPE *CreateRendertargetView)(
        IWineD3DDevice* This,
        IWineD3DResource *resource,
        IUnknown *parent,
        IWineD3DRendertargetView **rendertarget_view);

    HRESULT (STDMETHODCALLTYPE *CreateTexture)(
        IWineD3DDevice* This,
        UINT width,
        UINT height,
        UINT levels,
        DWORD usage,
        WINED3DFORMAT format,
        WINED3DPOOL pool,
        IWineD3DTexture **texture,
        IUnknown *parent,
        const struct wined3d_parent_ops *parent_ops
#ifdef VBOX_WITH_WDDM
        , HANDLE *shared_handle
        , void **pavClientMem
#endif
        );

    HRESULT (STDMETHODCALLTYPE *CreateVolumeTexture)(
        IWineD3DDevice* This,
        UINT width,
        UINT height,
        UINT depth,
        UINT levels,
        DWORD usage,
        WINED3DFORMAT format,
        WINED3DPOOL pool,
        IWineD3DVolumeTexture **texture,
        IUnknown *parent,
        const struct wined3d_parent_ops *parent_ops
#ifdef VBOX_WITH_WDDM
        , HANDLE *shared_handle
        , void **pavClientMem
#endif
        );

    HRESULT (STDMETHODCALLTYPE *CreateVolume)(
        IWineD3DDevice* This,
        UINT width,
        UINT height,
        UINT depth,
        DWORD usage,
        WINED3DFORMAT format,
        WINED3DPOOL pool,
        IWineD3DVolume **volume,
        IUnknown *parent,
        const struct wined3d_parent_ops *parent_ops
#ifdef VBOX_WITH_WDDM
        , HANDLE *shared_handle
        , void *pvClientMem
#endif
        );

    HRESULT (STDMETHODCALLTYPE *CreateCubeTexture)(
        IWineD3DDevice* This,
        UINT edge_length,
        UINT levels,
        DWORD usage,
        WINED3DFORMAT format,
        WINED3DPOOL pool,
        IWineD3DCubeTexture **texture,
        IUnknown *parent,
        const struct wined3d_parent_ops *parent_ops
#ifdef VBOX_WITH_WDDM
        , HANDLE *shared_handle
        , void **pavClientMem
#endif
        );

    HRESULT (STDMETHODCALLTYPE *CreateQuery)(
        IWineD3DDevice* This,
        WINED3DQUERYTYPE type,
        IWineD3DQuery **query,
        IUnknown *parent);

    HRESULT (STDMETHODCALLTYPE *CreateSwapChain)(
        IWineD3DDevice* This,
        WINED3DPRESENT_PARAMETERS *present_parameters,
        IWineD3DSwapChain **swapchain,
        IUnknown *parent,
        WINED3DSURFTYPE surface_type);

    HRESULT (STDMETHODCALLTYPE *CreateVertexDeclaration)(
        IWineD3DDevice* This,
        IWineD3DVertexDeclaration **declaration,
        IUnknown *parent,
        const struct wined3d_parent_ops *parent_ops,
        const WINED3DVERTEXELEMENT *elements,
        UINT element_count);

    HRESULT (STDMETHODCALLTYPE *CreateVertexDeclarationFromFVF)(
        IWineD3DDevice* This,
        IWineD3DVertexDeclaration **declaration,
        IUnknown *parent,
        const struct wined3d_parent_ops *parent_ops,
        DWORD fvf);

    HRESULT (STDMETHODCALLTYPE *CreateVertexShader)(
        IWineD3DDevice* This,
        const DWORD *function,
        const struct wined3d_shader_signature *output_signature,
        IWineD3DVertexShader **shader,
        IUnknown *parent,
        const struct wined3d_parent_ops *parent_ops);

    HRESULT (STDMETHODCALLTYPE *CreateGeometryShader)(
        IWineD3DDevice* This,
        const DWORD *byte_code,
        const struct wined3d_shader_signature *output_signature,
        IWineD3DGeometryShader **shader,
        IUnknown *parent,
        const struct wined3d_parent_ops *parent_ops);

    HRESULT (STDMETHODCALLTYPE *CreatePixelShader)(
        IWineD3DDevice* This,
        const DWORD *function,
        const struct wined3d_shader_signature *output_signature,
        IWineD3DPixelShader **shader,
        IUnknown *parent,
        const struct wined3d_parent_ops *parent_ops);

    HRESULT (STDMETHODCALLTYPE *CreatePalette)(
        IWineD3DDevice* This,
        DWORD flags,
        const PALETTEENTRY *palette_entry,
        IWineD3DPalette **palette,
        IUnknown *parent);

    HRESULT (STDMETHODCALLTYPE *Init3D)(
        IWineD3DDevice* This,
        WINED3DPRESENT_PARAMETERS *present_parameters);

    HRESULT (STDMETHODCALLTYPE *InitGDI)(
        IWineD3DDevice* This,
        WINED3DPRESENT_PARAMETERS *present_parameters);

    HRESULT (STDMETHODCALLTYPE *Uninit3D)(
        IWineD3DDevice* This,
        ULONG (STDMETHODCALLTYPE * destroy_swapchain_callback)(IWineD3DSwapChain *pSwapChain));

    HRESULT (STDMETHODCALLTYPE *UninitGDI)(
        IWineD3DDevice* This,
        ULONG (STDMETHODCALLTYPE * destroy_swapchain_callback)(IWineD3DSwapChain *pSwapChain));

    void (STDMETHODCALLTYPE *SetMultithreaded)(
        IWineD3DDevice* This);

    HRESULT (STDMETHODCALLTYPE *EvictManagedResources)(
        IWineD3DDevice* This);

    UINT (STDMETHODCALLTYPE *GetAvailableTextureMem)(
        IWineD3DDevice* This);

    HRESULT (STDMETHODCALLTYPE *GetBackBuffer)(
        IWineD3DDevice* This,
        UINT swapchain_idx,
        UINT backbuffer_idx,
        WINED3DBACKBUFFER_TYPE backbuffer_type,
        IWineD3DSurface **backbuffer);

    HRESULT (STDMETHODCALLTYPE *GetCreationParameters)(
        IWineD3DDevice* This,
        WINED3DDEVICE_CREATION_PARAMETERS *creation_parameters);

    HRESULT (STDMETHODCALLTYPE *GetDeviceCaps)(
        IWineD3DDevice* This,
        WINED3DCAPS *caps);

    HRESULT (STDMETHODCALLTYPE *GetDirect3D)(
        IWineD3DDevice* This,
        IWineD3D **d3d);

    HRESULT (STDMETHODCALLTYPE *GetDisplayMode)(
        IWineD3DDevice* This,
        UINT swapchain_idx,
        WINED3DDISPLAYMODE *mode);

    HRESULT (STDMETHODCALLTYPE *SetDisplayMode)(
        IWineD3DDevice* This,
        UINT swapchain_idx,
        const WINED3DDISPLAYMODE *mode);

    UINT (STDMETHODCALLTYPE *GetNumberOfSwapChains)(
        IWineD3DDevice* This);

    HRESULT (STDMETHODCALLTYPE *GetRasterStatus)(
        IWineD3DDevice* This,
        UINT swapchain_idx,
        WINED3DRASTER_STATUS *raster_status);

    HRESULT (STDMETHODCALLTYPE *GetSwapChain)(
        IWineD3DDevice* This,
        UINT swapchain_idx,
        IWineD3DSwapChain **swapchain);

    HRESULT (STDMETHODCALLTYPE *Reset)(
        IWineD3DDevice* This,
        WINED3DPRESENT_PARAMETERS *present_parameters);

    HRESULT (STDMETHODCALLTYPE *SetDialogBoxMode)(
        IWineD3DDevice* This,
        BOOL enable_dialogs);

    HRESULT (STDMETHODCALLTYPE *SetCursorProperties)(
        IWineD3DDevice* This,
        UINT x_hotspot,
        UINT y_hotspot,
        IWineD3DSurface *cursor_surface);

    void (STDMETHODCALLTYPE *SetCursorPosition)(
        IWineD3DDevice* This,
        int x_screen_space,
        int y_screen_space,
        DWORD flags);

    BOOL (STDMETHODCALLTYPE *ShowCursor)(
        IWineD3DDevice* This,
        BOOL show);

    HRESULT (STDMETHODCALLTYPE *SetClipPlane)(
        IWineD3DDevice* This,
        DWORD plane_idx,
        const float *plane);

    HRESULT (STDMETHODCALLTYPE *GetClipPlane)(
        IWineD3DDevice* This,
        DWORD plane_idx,
        float *plane);

    HRESULT (STDMETHODCALLTYPE *SetClipStatus)(
        IWineD3DDevice* This,
        const WINED3DCLIPSTATUS *clip_status);

    HRESULT (STDMETHODCALLTYPE *GetClipStatus)(
        IWineD3DDevice* This,
        WINED3DCLIPSTATUS *clip_status);

    HRESULT (STDMETHODCALLTYPE *SetCurrentTexturePalette)(
        IWineD3DDevice* This,
        UINT palette_number);

    HRESULT (STDMETHODCALLTYPE *GetCurrentTexturePalette)(
        IWineD3DDevice* This,
        UINT *palette_number);

    HRESULT (STDMETHODCALLTYPE *SetDepthStencilSurface)(
        IWineD3DDevice* This,
        IWineD3DSurface *depth_stencil);

    HRESULT (STDMETHODCALLTYPE *GetDepthStencilSurface)(
        IWineD3DDevice* This,
        IWineD3DSurface **depth_stencil);

    void (STDMETHODCALLTYPE *SetGammaRamp)(
        IWineD3DDevice* This,
        UINT swapchain_idx,
        DWORD flags,
        const WINED3DGAMMARAMP *ramp);

    void (STDMETHODCALLTYPE *GetGammaRamp)(
        IWineD3DDevice* This,
        UINT swapchain_idx,
        WINED3DGAMMARAMP *ramp);

    HRESULT (STDMETHODCALLTYPE *SetIndexBuffer)(
        IWineD3DDevice* This,
        IWineD3DBuffer *index_buffer,
        WINED3DFORMAT format);

    HRESULT (STDMETHODCALLTYPE *GetIndexBuffer)(
        IWineD3DDevice* This,
        IWineD3DBuffer **index_buffer);

    HRESULT (STDMETHODCALLTYPE *SetBaseVertexIndex)(
        IWineD3DDevice* This,
        INT base_index);

    HRESULT (STDMETHODCALLTYPE *GetBaseVertexIndex)(
        IWineD3DDevice* This,
        INT *base_index);

    HRESULT (STDMETHODCALLTYPE *SetLight)(
        IWineD3DDevice* This,
        DWORD light_idx,
        const WINED3DLIGHT *light);

    HRESULT (STDMETHODCALLTYPE *GetLight)(
        IWineD3DDevice* This,
        DWORD light_idx,
        WINED3DLIGHT *light);

    HRESULT (STDMETHODCALLTYPE *SetLightEnable)(
        IWineD3DDevice* This,
        DWORD light_idx,
        BOOL enable);

    HRESULT (STDMETHODCALLTYPE *GetLightEnable)(
        IWineD3DDevice* This,
        DWORD light_idx,
        BOOL *enable);

    HRESULT (STDMETHODCALLTYPE *SetMaterial)(
        IWineD3DDevice* This,
        const WINED3DMATERIAL *material);

    HRESULT (STDMETHODCALLTYPE *GetMaterial)(
        IWineD3DDevice* This,
        WINED3DMATERIAL *material);

    HRESULT (STDMETHODCALLTYPE *SetNPatchMode)(
        IWineD3DDevice* This,
        float segments);

    float (STDMETHODCALLTYPE *GetNPatchMode)(
        IWineD3DDevice* This);

    HRESULT (STDMETHODCALLTYPE *SetPaletteEntries)(
        IWineD3DDevice* This,
        UINT palette_number,
        const PALETTEENTRY *entries);

    HRESULT (STDMETHODCALLTYPE *GetPaletteEntries)(
        IWineD3DDevice* This,
        UINT palette_number,
        PALETTEENTRY *entries);

    HRESULT (STDMETHODCALLTYPE *SetPixelShader)(
        IWineD3DDevice* This,
        IWineD3DPixelShader *shader);

    HRESULT (STDMETHODCALLTYPE *GetPixelShader)(
        IWineD3DDevice* This,
        IWineD3DPixelShader **shader);

    HRESULT (STDMETHODCALLTYPE *SetPixelShaderConstantB)(
        IWineD3DDevice* This,
        UINT start_register,
        const BOOL *constants,
        UINT bool_count);

    HRESULT (STDMETHODCALLTYPE *GetPixelShaderConstantB)(
        IWineD3DDevice* This,
        UINT start_register,
        BOOL *constants,
        UINT bool_count);

    HRESULT (STDMETHODCALLTYPE *SetPixelShaderConstantI)(
        IWineD3DDevice* This,
        UINT start_register,
        const int *constants,
        UINT vector4i_count);

    HRESULT (STDMETHODCALLTYPE *GetPixelShaderConstantI)(
        IWineD3DDevice* This,
        UINT start_register,
        int *constants,
        UINT vector4i_count);

    HRESULT (STDMETHODCALLTYPE *SetPixelShaderConstantF)(
        IWineD3DDevice* This,
        UINT start_register,
        const float *constants,
        UINT vector4f_count);

    HRESULT (STDMETHODCALLTYPE *GetPixelShaderConstantF)(
        IWineD3DDevice* This,
        UINT start_register,
        float *constants,
        UINT vector4f_count);

    HRESULT (STDMETHODCALLTYPE *SetRenderState)(
        IWineD3DDevice* This,
        WINED3DRENDERSTATETYPE state,
        DWORD value);

    HRESULT (STDMETHODCALLTYPE *GetRenderState)(
        IWineD3DDevice* This,
        WINED3DRENDERSTATETYPE state,
        DWORD *value);

    HRESULT (STDMETHODCALLTYPE *SetRenderTarget)(
        IWineD3DDevice* This,
        DWORD render_target_idx,
        IWineD3DSurface *render_target,
        BOOL set_viewport);

    HRESULT (STDMETHODCALLTYPE *GetRenderTarget)(
        IWineD3DDevice* This,
        DWORD render_target_idx,
        IWineD3DSurface **render_target);

    HRESULT (STDMETHODCALLTYPE *SetFrontBackBuffers)(
        IWineD3DDevice* This,
        IWineD3DSurface *front,
        IWineD3DSurface *back);

    HRESULT (STDMETHODCALLTYPE *SetSamplerState)(
        IWineD3DDevice* This,
        DWORD sampler_idx,
        WINED3DSAMPLERSTATETYPE state,
        DWORD value);

    HRESULT (STDMETHODCALLTYPE *GetSamplerState)(
        IWineD3DDevice* This,
        DWORD sampler_idx,
        WINED3DSAMPLERSTATETYPE state,
        DWORD *value);

    HRESULT (STDMETHODCALLTYPE *SetScissorRect)(
        IWineD3DDevice* This,
        const RECT *rect);

    HRESULT (STDMETHODCALLTYPE *GetScissorRect)(
        IWineD3DDevice* This,
        RECT *rect);

    HRESULT (STDMETHODCALLTYPE *SetSoftwareVertexProcessing)(
        IWineD3DDevice* This,
        BOOL software);

    BOOL (STDMETHODCALLTYPE *GetSoftwareVertexProcessing)(
        IWineD3DDevice* This);

    HRESULT (STDMETHODCALLTYPE *SetStreamSource)(
        IWineD3DDevice* This,
        UINT stream_idx,
        IWineD3DBuffer *buffer,
        UINT offset,
        UINT stride);

    HRESULT (STDMETHODCALLTYPE *GetStreamSource)(
        IWineD3DDevice* This,
        UINT stream_idx,
        IWineD3DBuffer **buffer,
        UINT *offset,
        UINT *stride);

    HRESULT (STDMETHODCALLTYPE *SetStreamSourceFreq)(
        IWineD3DDevice* This,
        UINT stream_idx,
        UINT divider);

    HRESULT (STDMETHODCALLTYPE *GetStreamSourceFreq)(
        IWineD3DDevice* This,
        UINT stream_idx,
        UINT *divider);

    HRESULT (STDMETHODCALLTYPE *SetTexture)(
        IWineD3DDevice* This,
        DWORD stage,
        IWineD3DBaseTexture *texture);

    HRESULT (STDMETHODCALLTYPE *GetTexture)(
        IWineD3DDevice* This,
        DWORD stage,
        IWineD3DBaseTexture **texture);

    HRESULT (STDMETHODCALLTYPE *SetTextureStageState)(
        IWineD3DDevice* This,
        DWORD stage,
        WINED3DTEXTURESTAGESTATETYPE state,
        DWORD value);

    HRESULT (STDMETHODCALLTYPE *GetTextureStageState)(
        IWineD3DDevice* This,
        DWORD stage,
        WINED3DTEXTURESTAGESTATETYPE state,
        DWORD *value);

    HRESULT (STDMETHODCALLTYPE *SetTransform)(
        IWineD3DDevice* This,
        WINED3DTRANSFORMSTATETYPE state,
        const WINED3DMATRIX *matrix);

    HRESULT (STDMETHODCALLTYPE *GetTransform)(
        IWineD3DDevice* This,
        WINED3DTRANSFORMSTATETYPE state,
        WINED3DMATRIX *matrix);

    HRESULT (STDMETHODCALLTYPE *SetVertexDeclaration)(
        IWineD3DDevice* This,
        IWineD3DVertexDeclaration *declaration);

    HRESULT (STDMETHODCALLTYPE *GetVertexDeclaration)(
        IWineD3DDevice* This,
        IWineD3DVertexDeclaration **declaration);

    HRESULT (STDMETHODCALLTYPE *SetVertexShader)(
        IWineD3DDevice* This,
        IWineD3DVertexShader *shader);

    HRESULT (STDMETHODCALLTYPE *GetVertexShader)(
        IWineD3DDevice* This,
        IWineD3DVertexShader **shader);

    HRESULT (STDMETHODCALLTYPE *SetVertexShaderConstantB)(
        IWineD3DDevice* This,
        UINT start_register,
        const BOOL *constants,
        UINT bool_count);

    HRESULT (STDMETHODCALLTYPE *GetVertexShaderConstantB)(
        IWineD3DDevice* This,
        UINT start_register,
        BOOL *constants,
        UINT bool_count);

    HRESULT (STDMETHODCALLTYPE *SetVertexShaderConstantI)(
        IWineD3DDevice* This,
        UINT start_register,
        const int *constants,
        UINT vector4i_count);

    HRESULT (STDMETHODCALLTYPE *GetVertexShaderConstantI)(
        IWineD3DDevice* This,
        UINT start_register,
        int *constants,
        UINT vector4i_count);

    HRESULT (STDMETHODCALLTYPE *SetVertexShaderConstantF)(
        IWineD3DDevice* This,
        UINT start_register,
        const float *constants,
        UINT vector4f_count);

    HRESULT (STDMETHODCALLTYPE *GetVertexShaderConstantF)(
        IWineD3DDevice* This,
        UINT start_register,
        float *constants,
        UINT vector4f_count);

    HRESULT (STDMETHODCALLTYPE *SetViewport)(
        IWineD3DDevice* This,
        const WINED3DVIEWPORT *viewport);

    HRESULT (STDMETHODCALLTYPE *GetViewport)(
        IWineD3DDevice* This,
        WINED3DVIEWPORT *viewport);

    HRESULT (STDMETHODCALLTYPE *MultiplyTransform)(
        IWineD3DDevice* This,
        WINED3DTRANSFORMSTATETYPE state,
        const WINED3DMATRIX *matrix);

    HRESULT (STDMETHODCALLTYPE *ValidateDevice)(
        IWineD3DDevice* This,
        DWORD *num_passes);

    HRESULT (STDMETHODCALLTYPE *ProcessVertices)(
        IWineD3DDevice* This,
        UINT src_start_idx,
        UINT dst_idx,
        UINT vertex_count,
        IWineD3DBuffer *dest_buffer,
        IWineD3DVertexDeclaration *declaration,
        DWORD flags,
        DWORD DestFVF);

    HRESULT (STDMETHODCALLTYPE *BeginStateBlock)(
        IWineD3DDevice* This);

    HRESULT (STDMETHODCALLTYPE *EndStateBlock)(
        IWineD3DDevice* This,
        IWineD3DStateBlock **stateblock);

    HRESULT (STDMETHODCALLTYPE *BeginScene)(
        IWineD3DDevice* This);

    HRESULT (STDMETHODCALLTYPE *EndScene)(
        IWineD3DDevice* This);

    HRESULT (STDMETHODCALLTYPE *Present)(
        IWineD3DDevice* This,
        const RECT *src_rect,
        const RECT *dst_rect,
        HWND dst_window_override,
        const RGNDATA *dirty_region);

    HRESULT (STDMETHODCALLTYPE *Clear)(
        IWineD3DDevice* This,
        DWORD rect_count,
        const WINED3DRECT *rects,
        DWORD flags,
        WINED3DCOLOR color,
        float z,
        DWORD stencil);

    void (STDMETHODCALLTYPE *ClearRendertargetView)(
        IWineD3DDevice* This,
        IWineD3DRendertargetView *rendertarget_view,
        const float color[4]);

    void (STDMETHODCALLTYPE *SetPrimitiveType)(
        IWineD3DDevice* This,
        WINED3DPRIMITIVETYPE primitive_topology);

    void (STDMETHODCALLTYPE *GetPrimitiveType)(
        IWineD3DDevice* This,
        WINED3DPRIMITIVETYPE *primitive_topology);

    HRESULT (STDMETHODCALLTYPE *DrawPrimitive)(
        IWineD3DDevice* This,
        UINT start_vertex,
        UINT vertex_count);

    HRESULT (STDMETHODCALLTYPE *DrawIndexedPrimitive)(
        IWineD3DDevice* This,
        UINT start_idx,
        UINT index_count);

    HRESULT (STDMETHODCALLTYPE *DrawPrimitiveUP)(
        IWineD3DDevice* This,
        UINT vertex_count,
        const void *stream_data,
        UINT stream_stride);

    HRESULT (STDMETHODCALLTYPE *DrawIndexedPrimitiveUP)(
        IWineD3DDevice* This,
        UINT index_count,
        const void *index_data,
        WINED3DFORMAT index_data_format,
        const void *stream_data,
        UINT stream_stride);

    HRESULT (STDMETHODCALLTYPE *DrawPrimitiveStrided)(
        IWineD3DDevice* This,
        UINT vertex_count,
        const WineDirect3DVertexStridedData *strided_data);

    HRESULT (STDMETHODCALLTYPE *DrawIndexedPrimitiveStrided)(
        IWineD3DDevice* This,
        UINT index_count,
        const WineDirect3DVertexStridedData *strided_data,
        UINT vertex_count,
        const void *index_data,
        WINED3DFORMAT index_data_format);

    HRESULT (STDMETHODCALLTYPE *DrawRectPatch)(
        IWineD3DDevice* This,
        UINT handle,
        const float *num_segs,
        const WINED3DRECTPATCH_INFO *rect_patch_info);

    HRESULT (STDMETHODCALLTYPE *DrawTriPatch)(
        IWineD3DDevice* This,
        UINT handle,
        const float *num_segs,
        const WINED3DTRIPATCH_INFO *tri_patch_info);

    HRESULT (STDMETHODCALLTYPE *DeletePatch)(
        IWineD3DDevice* This,
        UINT handle);

    HRESULT (STDMETHODCALLTYPE *ColorFill)(
        IWineD3DDevice* This,
        IWineD3DSurface *surface,
        const WINED3DRECT *rect,
        WINED3DCOLOR color);

    HRESULT (STDMETHODCALLTYPE *UpdateTexture)(
        IWineD3DDevice* This,
        IWineD3DBaseTexture *src_texture,
        IWineD3DBaseTexture *dst_texture);

    HRESULT (STDMETHODCALLTYPE *UpdateSurface)(
        IWineD3DDevice* This,
        IWineD3DSurface *src_surface,
        const RECT *src_rect,
        IWineD3DSurface *dst_surface,
        const POINT *dst_point);

    HRESULT (STDMETHODCALLTYPE *GetFrontBufferData)(
        IWineD3DDevice* This,
        UINT swapchain_idx,
        IWineD3DSurface *dst_surface);

    HRESULT (STDMETHODCALLTYPE *EnumResources)(
        IWineD3DDevice* This,
        HRESULT (STDMETHODCALLTYPE * callback)(IWineD3DResource *resource,void *pData),
        void *data);

    HRESULT (STDMETHODCALLTYPE *GetSurfaceFromDC)(
        IWineD3DDevice* This,
        HDC dc,
        IWineD3DSurface **surface);

    HRESULT (STDMETHODCALLTYPE *AcquireFocusWindow)(
        IWineD3DDevice* This,
        HWND window);

    void (STDMETHODCALLTYPE *ReleaseFocusWindow)(
        IWineD3DDevice* This);

    HRESULT (STDMETHODCALLTYPE *AddSwapChain)(
        IWineD3DDevice* This,
        IWineD3DSwapChain *swapchain);

    HRESULT (STDMETHODCALLTYPE *RemoveSwapChain)(
        IWineD3DDevice* This,
        IWineD3DSwapChain *swapchain);

#ifdef VBOX_WITH_WDDM
    HRESULT (STDMETHODCALLTYPE *Flush)(
        IWineD3DDevice* This);

    HRESULT (STDMETHODCALLTYPE *VolBlt)(IWineD3DDevice *iface,
            IWineD3DVolume *pSourceVolume, IWineD3DVolume *pDestinationVolume,
            const WINED3DBOX *pSrcBoxArg,
            const struct VBOXPOINT3D *pDstPoin3D
            );

    HRESULT (STDMETHODCALLTYPE *VolTexBlt)(IWineD3DDevice *iface,
            IWineD3DVolumeTexture *pSourceTexture, IWineD3DVolumeTexture *pDestinationTexture,
            const WINED3DBOX *pSrcBoxArg,
            const struct VBOXPOINT3D *pDstPoin3D
            );

    HRESULT (STDMETHODCALLTYPE *FlushToHost)(
            IWineD3DDevice *iface);

    HRESULT (STDMETHODCALLTYPE *Finish)(
        IWineD3DDevice* This);
#endif

    END_INTERFACE
} IWineD3DDeviceVtbl;
interface IWineD3DDevice {
    CONST_VTBL IWineD3DDeviceVtbl* lpVtbl;
};

#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IWineD3DDevice_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IWineD3DDevice_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IWineD3DDevice_Release(This) (This)->lpVtbl->Release(This)
/*** IWineD3DBase methods ***/
#define IWineD3DDevice_GetParent(This,parent) (This)->lpVtbl->GetParent(This,parent)
/*** IWineD3DDevice methods ***/
#define IWineD3DDevice_CreateBuffer(This,desc,data,parent,parent_ops,buffer) (This)->lpVtbl->CreateBuffer(This,desc,data,parent,parent_ops,buffer)
#define IWineD3DDevice_CreateVertexBuffer(This,length,usage,pool,vertex_buffer,parent,parent_ops) (This)->lpVtbl->CreateVertexBuffer(This,length,usage,pool,vertex_buffer,parent,parent_ops)
#define IWineD3DDevice_CreateIndexBuffer(This,length,usage,pool,index_buffer,parent,parent_ops) (This)->lpVtbl->CreateIndexBuffer(This,length,usage,pool,index_buffer,parent,parent_ops)
#define IWineD3DDevice_CreateStateBlock(This,type,stateblock,parent) (This)->lpVtbl->CreateStateBlock(This,type,stateblock,parent)
#ifdef VBOX_WITH_WDDM
#define IWineD3DDevice_CreateSurface(This,width,height,format,lockable,discard,level,surface,usage,pool,multisample_type,multisample_quality,surface_type,parent,parent_ops,shared_handle,pvClientMem) (This)->lpVtbl->CreateSurface(This,width,height,format,lockable,discard,level,surface,usage,pool,multisample_type,multisample_quality,surface_type,parent,parent_ops,shared_handle,pvClientMem)
#else
#define IWineD3DDevice_CreateSurface(This,width,height,format,lockable,discard,level,surface,usage,pool,multisample_type,multisample_quality,surface_type,parent,parent_ops) (This)->lpVtbl->CreateSurface(This,width,height,format,lockable,discard,level,surface,usage,pool,multisample_type,multisample_quality,surface_type,parent,parent_ops)
#endif
#define IWineD3DDevice_CreateRendertargetView(This,resource,parent,rendertarget_view) (This)->lpVtbl->CreateRendertargetView(This,resource,parent,rendertarget_view)
#ifdef VBOX_WITH_WDDM
#define IWineD3DDevice_CreateTexture(This,width,height,levels,usage,format,pool,texture,parent,parent_ops,shared_handle,pavClientMem) (This)->lpVtbl->CreateTexture(This,width,height,levels,usage,format,pool,texture,parent,parent_ops,shared_handle,pavClientMem)
#else
#define IWineD3DDevice_CreateTexture(This,width,height,levels,usage,format,pool,texture,parent,parent_ops) (This)->lpVtbl->CreateTexture(This,width,height,levels,usage,format,pool,texture,parent,parent_ops)
#endif
#ifdef VBOX_WITH_WDDM
#define IWineD3DDevice_CreateVolumeTexture(This,width,height,depth,levels,usage,format,pool,texture,parent,parent_ops,shared_handle,pavClientMem) (This)->lpVtbl->CreateVolumeTexture(This,width,height,depth,levels,usage,format,pool,texture,parent,parent_ops,shared_handle,pavClientMem)
#else
#define IWineD3DDevice_CreateVolumeTexture(This,width,height,depth,levels,usage,format,pool,texture,parent,parent_ops) (This)->lpVtbl->CreateVolumeTexture(This,width,height,depth,levels,usage,format,pool,texture,parent,parent_ops)
#endif
#ifdef VBOX_WITH_WDDM
#define IWineD3DDevice_CreateVolume(This,width,height,depth,usage,format,pool,volume,parent,parent_ops,shared_handle,pvClientMem) (This)->lpVtbl->CreateVolume(This,width,height,depth,usage,format,pool,volume,parent,parent_ops,shared_handle,pvClientMem)
#else
#define IWineD3DDevice_CreateVolume(This,width,height,depth,usage,format,pool,volume,parent,parent_ops) (This)->lpVtbl->CreateVolume(This,width,height,depth,usage,format,pool,volume,parent,parent_ops)
#endif
#ifdef VBOX_WITH_WDDM
#define IWineD3DDevice_CreateCubeTexture(This,edge_length,levels,usage,format,pool,texture,parent,parent_ops,shared_handle,pavClientMem) (This)->lpVtbl->CreateCubeTexture(This,edge_length,levels,usage,format,pool,texture,parent,parent_ops,shared_handle,pavClientMem)
#else
#define IWineD3DDevice_CreateCubeTexture(This,edge_length,levels,usage,format,pool,texture,parent,parent_ops) (This)->lpVtbl->CreateCubeTexture(This,edge_length,levels,usage,format,pool,texture,parent,parent_ops)
#endif
#define IWineD3DDevice_CreateQuery(This,type,query,parent) (This)->lpVtbl->CreateQuery(This,type,query,parent)
#define IWineD3DDevice_CreateSwapChain(This,present_parameters,swapchain,parent,surface_type) (This)->lpVtbl->CreateSwapChain(This,present_parameters,swapchain,parent,surface_type)
#define IWineD3DDevice_CreateVertexDeclaration(This,declaration,parent,parent_ops,elements,element_count) (This)->lpVtbl->CreateVertexDeclaration(This,declaration,parent,parent_ops,elements,element_count)
#define IWineD3DDevice_CreateVertexDeclarationFromFVF(This,declaration,parent,parent_ops,fvf) (This)->lpVtbl->CreateVertexDeclarationFromFVF(This,declaration,parent,parent_ops,fvf)
#define IWineD3DDevice_CreateVertexShader(This,function,output_signature,shader,parent,parent_ops) (This)->lpVtbl->CreateVertexShader(This,function,output_signature,shader,parent,parent_ops)
#define IWineD3DDevice_CreateGeometryShader(This,byte_code,output_signature,shader,parent,parent_ops) (This)->lpVtbl->CreateGeometryShader(This,byte_code,output_signature,shader,parent,parent_ops)
#define IWineD3DDevice_CreatePixelShader(This,function,output_signature,shader,parent,parent_ops) (This)->lpVtbl->CreatePixelShader(This,function,output_signature,shader,parent,parent_ops)
#define IWineD3DDevice_CreatePalette(This,flags,palette_entry,palette,parent) (This)->lpVtbl->CreatePalette(This,flags,palette_entry,palette,parent)
#define IWineD3DDevice_Init3D(This,present_parameters) (This)->lpVtbl->Init3D(This,present_parameters)
#define IWineD3DDevice_InitGDI(This,present_parameters) (This)->lpVtbl->InitGDI(This,present_parameters)
#define IWineD3DDevice_Uninit3D(This,destroy_swapchain_callback) (This)->lpVtbl->Uninit3D(This,destroy_swapchain_callback)
#define IWineD3DDevice_UninitGDI(This,destroy_swapchain_callback) (This)->lpVtbl->UninitGDI(This,destroy_swapchain_callback)
#define IWineD3DDevice_SetMultithreaded(This) (This)->lpVtbl->SetMultithreaded(This)
#define IWineD3DDevice_EvictManagedResources(This) (This)->lpVtbl->EvictManagedResources(This)
#define IWineD3DDevice_GetAvailableTextureMem(This) (This)->lpVtbl->GetAvailableTextureMem(This)
#define IWineD3DDevice_GetBackBuffer(This,swapchain_idx,backbuffer_idx,backbuffer_type,backbuffer) (This)->lpVtbl->GetBackBuffer(This,swapchain_idx,backbuffer_idx,backbuffer_type,backbuffer)
#define IWineD3DDevice_GetCreationParameters(This,creation_parameters) (This)->lpVtbl->GetCreationParameters(This,creation_parameters)
#define IWineD3DDevice_GetDeviceCaps(This,caps) (This)->lpVtbl->GetDeviceCaps(This,caps)
#define IWineD3DDevice_GetDirect3D(This,d3d) (This)->lpVtbl->GetDirect3D(This,d3d)
#define IWineD3DDevice_GetDisplayMode(This,swapchain_idx,mode) (This)->lpVtbl->GetDisplayMode(This,swapchain_idx,mode)
#define IWineD3DDevice_SetDisplayMode(This,swapchain_idx,mode) (This)->lpVtbl->SetDisplayMode(This,swapchain_idx,mode)
#define IWineD3DDevice_GetNumberOfSwapChains(This) (This)->lpVtbl->GetNumberOfSwapChains(This)
#define IWineD3DDevice_GetRasterStatus(This,swapchain_idx,raster_status) (This)->lpVtbl->GetRasterStatus(This,swapchain_idx,raster_status)
#define IWineD3DDevice_GetSwapChain(This,swapchain_idx,swapchain) (This)->lpVtbl->GetSwapChain(This,swapchain_idx,swapchain)
#define IWineD3DDevice_Reset(This,present_parameters) (This)->lpVtbl->Reset(This,present_parameters)
#define IWineD3DDevice_SetDialogBoxMode(This,enable_dialogs) (This)->lpVtbl->SetDialogBoxMode(This,enable_dialogs)
#define IWineD3DDevice_SetCursorProperties(This,x_hotspot,y_hotspot,cursor_surface) (This)->lpVtbl->SetCursorProperties(This,x_hotspot,y_hotspot,cursor_surface)
#define IWineD3DDevice_SetCursorPosition(This,x_screen_space,y_screen_space,flags) (This)->lpVtbl->SetCursorPosition(This,x_screen_space,y_screen_space,flags)
#define IWineD3DDevice_ShowCursor(This,show) (This)->lpVtbl->ShowCursor(This,show)
#define IWineD3DDevice_SetClipPlane(This,plane_idx,plane) (This)->lpVtbl->SetClipPlane(This,plane_idx,plane)
#define IWineD3DDevice_GetClipPlane(This,plane_idx,plane) (This)->lpVtbl->GetClipPlane(This,plane_idx,plane)
#define IWineD3DDevice_SetClipStatus(This,clip_status) (This)->lpVtbl->SetClipStatus(This,clip_status)
#define IWineD3DDevice_GetClipStatus(This,clip_status) (This)->lpVtbl->GetClipStatus(This,clip_status)
#define IWineD3DDevice_SetCurrentTexturePalette(This,palette_number) (This)->lpVtbl->SetCurrentTexturePalette(This,palette_number)
#define IWineD3DDevice_GetCurrentTexturePalette(This,palette_number) (This)->lpVtbl->GetCurrentTexturePalette(This,palette_number)
#define IWineD3DDevice_SetDepthStencilSurface(This,depth_stencil) (This)->lpVtbl->SetDepthStencilSurface(This,depth_stencil)
#define IWineD3DDevice_GetDepthStencilSurface(This,depth_stencil) (This)->lpVtbl->GetDepthStencilSurface(This,depth_stencil)
#define IWineD3DDevice_SetGammaRamp(This,swapchain_idx,flags,ramp) (This)->lpVtbl->SetGammaRamp(This,swapchain_idx,flags,ramp)
#define IWineD3DDevice_GetGammaRamp(This,swapchain_idx,ramp) (This)->lpVtbl->GetGammaRamp(This,swapchain_idx,ramp)
#define IWineD3DDevice_SetIndexBuffer(This,index_buffer,format) (This)->lpVtbl->SetIndexBuffer(This,index_buffer,format)
#define IWineD3DDevice_GetIndexBuffer(This,index_buffer) (This)->lpVtbl->GetIndexBuffer(This,index_buffer)
#define IWineD3DDevice_SetBaseVertexIndex(This,base_index) (This)->lpVtbl->SetBaseVertexIndex(This,base_index)
#define IWineD3DDevice_GetBaseVertexIndex(This,base_index) (This)->lpVtbl->GetBaseVertexIndex(This,base_index)
#define IWineD3DDevice_SetLight(This,light_idx,light) (This)->lpVtbl->SetLight(This,light_idx,light)
#define IWineD3DDevice_GetLight(This,light_idx,light) (This)->lpVtbl->GetLight(This,light_idx,light)
#define IWineD3DDevice_SetLightEnable(This,light_idx,enable) (This)->lpVtbl->SetLightEnable(This,light_idx,enable)
#define IWineD3DDevice_GetLightEnable(This,light_idx,enable) (This)->lpVtbl->GetLightEnable(This,light_idx,enable)
#define IWineD3DDevice_SetMaterial(This,material) (This)->lpVtbl->SetMaterial(This,material)
#define IWineD3DDevice_GetMaterial(This,material) (This)->lpVtbl->GetMaterial(This,material)
#define IWineD3DDevice_SetNPatchMode(This,segments) (This)->lpVtbl->SetNPatchMode(This,segments)
#define IWineD3DDevice_GetNPatchMode(This) (This)->lpVtbl->GetNPatchMode(This)
#define IWineD3DDevice_SetPaletteEntries(This,palette_number,entries) (This)->lpVtbl->SetPaletteEntries(This,palette_number,entries)
#define IWineD3DDevice_GetPaletteEntries(This,palette_number,entries) (This)->lpVtbl->GetPaletteEntries(This,palette_number,entries)
#define IWineD3DDevice_SetPixelShader(This,shader) (This)->lpVtbl->SetPixelShader(This,shader)
#define IWineD3DDevice_GetPixelShader(This,shader) (This)->lpVtbl->GetPixelShader(This,shader)
#define IWineD3DDevice_SetPixelShaderConstantB(This,start_register,constants,bool_count) (This)->lpVtbl->SetPixelShaderConstantB(This,start_register,constants,bool_count)
#define IWineD3DDevice_GetPixelShaderConstantB(This,start_register,constants,bool_count) (This)->lpVtbl->GetPixelShaderConstantB(This,start_register,constants,bool_count)
#define IWineD3DDevice_SetPixelShaderConstantI(This,start_register,constants,vector4i_count) (This)->lpVtbl->SetPixelShaderConstantI(This,start_register,constants,vector4i_count)
#define IWineD3DDevice_GetPixelShaderConstantI(This,start_register,constants,vector4i_count) (This)->lpVtbl->GetPixelShaderConstantI(This,start_register,constants,vector4i_count)
#define IWineD3DDevice_SetPixelShaderConstantF(This,start_register,constants,vector4f_count) (This)->lpVtbl->SetPixelShaderConstantF(This,start_register,constants,vector4f_count)
#define IWineD3DDevice_GetPixelShaderConstantF(This,start_register,constants,vector4f_count) (This)->lpVtbl->GetPixelShaderConstantF(This,start_register,constants,vector4f_count)
#define IWineD3DDevice_SetRenderState(This,state,value) (This)->lpVtbl->SetRenderState(This,state,value)
#define IWineD3DDevice_GetRenderState(This,state,value) (This)->lpVtbl->GetRenderState(This,state,value)
#define IWineD3DDevice_SetRenderTarget(This,render_target_idx,render_target,set_viewport) (This)->lpVtbl->SetRenderTarget(This,render_target_idx,render_target,set_viewport)
#define IWineD3DDevice_GetRenderTarget(This,render_target_idx,render_target) (This)->lpVtbl->GetRenderTarget(This,render_target_idx,render_target)
#define IWineD3DDevice_SetFrontBackBuffers(This,front,back) (This)->lpVtbl->SetFrontBackBuffers(This,front,back)
#define IWineD3DDevice_SetSamplerState(This,sampler_idx,state,value) (This)->lpVtbl->SetSamplerState(This,sampler_idx,state,value)
#define IWineD3DDevice_GetSamplerState(This,sampler_idx,state,value) (This)->lpVtbl->GetSamplerState(This,sampler_idx,state,value)
#define IWineD3DDevice_SetScissorRect(This,rect) (This)->lpVtbl->SetScissorRect(This,rect)
#define IWineD3DDevice_GetScissorRect(This,rect) (This)->lpVtbl->GetScissorRect(This,rect)
#define IWineD3DDevice_SetSoftwareVertexProcessing(This,software) (This)->lpVtbl->SetSoftwareVertexProcessing(This,software)
#define IWineD3DDevice_GetSoftwareVertexProcessing(This) (This)->lpVtbl->GetSoftwareVertexProcessing(This)
#define IWineD3DDevice_SetStreamSource(This,stream_idx,buffer,offset,stride) (This)->lpVtbl->SetStreamSource(This,stream_idx,buffer,offset,stride)
#define IWineD3DDevice_GetStreamSource(This,stream_idx,buffer,offset,stride) (This)->lpVtbl->GetStreamSource(This,stream_idx,buffer,offset,stride)
#define IWineD3DDevice_SetStreamSourceFreq(This,stream_idx,divider) (This)->lpVtbl->SetStreamSourceFreq(This,stream_idx,divider)
#define IWineD3DDevice_GetStreamSourceFreq(This,stream_idx,divider) (This)->lpVtbl->GetStreamSourceFreq(This,stream_idx,divider)
#define IWineD3DDevice_SetTexture(This,stage,texture) (This)->lpVtbl->SetTexture(This,stage,texture)
#define IWineD3DDevice_GetTexture(This,stage,texture) (This)->lpVtbl->GetTexture(This,stage,texture)
#define IWineD3DDevice_SetTextureStageState(This,stage,state,value) (This)->lpVtbl->SetTextureStageState(This,stage,state,value)
#define IWineD3DDevice_GetTextureStageState(This,stage,state,value) (This)->lpVtbl->GetTextureStageState(This,stage,state,value)
#define IWineD3DDevice_SetTransform(This,state,matrix) (This)->lpVtbl->SetTransform(This,state,matrix)
#define IWineD3DDevice_GetTransform(This,state,matrix) (This)->lpVtbl->GetTransform(This,state,matrix)
#define IWineD3DDevice_SetVertexDeclaration(This,declaration) (This)->lpVtbl->SetVertexDeclaration(This,declaration)
#define IWineD3DDevice_GetVertexDeclaration(This,declaration) (This)->lpVtbl->GetVertexDeclaration(This,declaration)
#define IWineD3DDevice_SetVertexShader(This,shader) (This)->lpVtbl->SetVertexShader(This,shader)
#define IWineD3DDevice_GetVertexShader(This,shader) (This)->lpVtbl->GetVertexShader(This,shader)
#define IWineD3DDevice_SetVertexShaderConstantB(This,start_register,constants,bool_count) (This)->lpVtbl->SetVertexShaderConstantB(This,start_register,constants,bool_count)
#define IWineD3DDevice_GetVertexShaderConstantB(This,start_register,constants,bool_count) (This)->lpVtbl->GetVertexShaderConstantB(This,start_register,constants,bool_count)
#define IWineD3DDevice_SetVertexShaderConstantI(This,start_register,constants,vector4i_count) (This)->lpVtbl->SetVertexShaderConstantI(This,start_register,constants,vector4i_count)
#define IWineD3DDevice_GetVertexShaderConstantI(This,start_register,constants,vector4i_count) (This)->lpVtbl->GetVertexShaderConstantI(This,start_register,constants,vector4i_count)
#define IWineD3DDevice_SetVertexShaderConstantF(This,start_register,constants,vector4f_count) (This)->lpVtbl->SetVertexShaderConstantF(This,start_register,constants,vector4f_count)
#define IWineD3DDevice_GetVertexShaderConstantF(This,start_register,constants,vector4f_count) (This)->lpVtbl->GetVertexShaderConstantF(This,start_register,constants,vector4f_count)
#define IWineD3DDevice_SetViewport(This,viewport) (This)->lpVtbl->SetViewport(This,viewport)
#define IWineD3DDevice_GetViewport(This,viewport) (This)->lpVtbl->GetViewport(This,viewport)
#define IWineD3DDevice_MultiplyTransform(This,state,matrix) (This)->lpVtbl->MultiplyTransform(This,state,matrix)
#define IWineD3DDevice_ValidateDevice(This,num_passes) (This)->lpVtbl->ValidateDevice(This,num_passes)
#define IWineD3DDevice_ProcessVertices(This,src_start_idx,dst_idx,vertex_count,dest_buffer,declaration,flags,DestFVF) (This)->lpVtbl->ProcessVertices(This,src_start_idx,dst_idx,vertex_count,dest_buffer,declaration,flags,DestFVF)
#define IWineD3DDevice_BeginStateBlock(This) (This)->lpVtbl->BeginStateBlock(This)
#define IWineD3DDevice_EndStateBlock(This,stateblock) (This)->lpVtbl->EndStateBlock(This,stateblock)
#define IWineD3DDevice_BeginScene(This) (This)->lpVtbl->BeginScene(This)
#define IWineD3DDevice_EndScene(This) (This)->lpVtbl->EndScene(This)
#define IWineD3DDevice_Present(This,src_rect,dst_rect,dst_window_override,dirty_region) (This)->lpVtbl->Present(This,src_rect,dst_rect,dst_window_override,dirty_region)
#define IWineD3DDevice_Clear(This,rect_count,rects,flags,color,z,stencil) (This)->lpVtbl->Clear(This,rect_count,rects,flags,color,z,stencil)
#define IWineD3DDevice_ClearRendertargetView(This,rendertarget_view,color) (This)->lpVtbl->ClearRendertargetView(This,rendertarget_view,color)
#define IWineD3DDevice_SetPrimitiveType(This,primitive_topology) (This)->lpVtbl->SetPrimitiveType(This,primitive_topology)
#define IWineD3DDevice_GetPrimitiveType(This,primitive_topology) (This)->lpVtbl->GetPrimitiveType(This,primitive_topology)
#define IWineD3DDevice_DrawPrimitive(This,start_vertex,vertex_count) (This)->lpVtbl->DrawPrimitive(This,start_vertex,vertex_count)
#define IWineD3DDevice_DrawIndexedPrimitive(This,start_idx,index_count) (This)->lpVtbl->DrawIndexedPrimitive(This,start_idx,index_count)
#define IWineD3DDevice_DrawPrimitiveUP(This,vertex_count,stream_data,stream_stride) (This)->lpVtbl->DrawPrimitiveUP(This,vertex_count,stream_data,stream_stride)
#define IWineD3DDevice_DrawIndexedPrimitiveUP(This,index_count,index_data,index_data_format,stream_data,stream_stride) (This)->lpVtbl->DrawIndexedPrimitiveUP(This,index_count,index_data,index_data_format,stream_data,stream_stride)
#define IWineD3DDevice_DrawPrimitiveStrided(This,vertex_count,strided_data) (This)->lpVtbl->DrawPrimitiveStrided(This,vertex_count,strided_data)
#define IWineD3DDevice_DrawIndexedPrimitiveStrided(This,index_count,strided_data,vertex_count,index_data,index_data_format) (This)->lpVtbl->DrawIndexedPrimitiveStrided(This,index_count,strided_data,vertex_count,index_data,index_data_format)
#define IWineD3DDevice_DrawRectPatch(This,handle,num_segs,rect_patch_info) (This)->lpVtbl->DrawRectPatch(This,handle,num_segs,rect_patch_info)
#define IWineD3DDevice_DrawTriPatch(This,handle,num_segs,tri_patch_info) (This)->lpVtbl->DrawTriPatch(This,handle,num_segs,tri_patch_info)
#define IWineD3DDevice_DeletePatch(This,handle) (This)->lpVtbl->DeletePatch(This,handle)
#define IWineD3DDevice_ColorFill(This,surface,rect,color) (This)->lpVtbl->ColorFill(This,surface,rect,color)
#define IWineD3DDevice_UpdateTexture(This,src_texture,dst_texture) (This)->lpVtbl->UpdateTexture(This,src_texture,dst_texture)
#define IWineD3DDevice_UpdateSurface(This,src_surface,src_rect,dst_surface,dst_point) (This)->lpVtbl->UpdateSurface(This,src_surface,src_rect,dst_surface,dst_point)
#define IWineD3DDevice_GetFrontBufferData(This,swapchain_idx,dst_surface) (This)->lpVtbl->GetFrontBufferData(This,swapchain_idx,dst_surface)
#define IWineD3DDevice_EnumResources(This,callback,data) (This)->lpVtbl->EnumResources(This,callback,data)
#define IWineD3DDevice_GetSurfaceFromDC(This,dc,surface) (This)->lpVtbl->GetSurfaceFromDC(This,dc,surface)
#define IWineD3DDevice_AcquireFocusWindow(This,window) (This)->lpVtbl->AcquireFocusWindow(This,window)
#define IWineD3DDevice_ReleaseFocusWindow(This) (This)->lpVtbl->ReleaseFocusWindow(This)
#define IWineD3DDevice_AddSwapChain(This,swapchain) (This)->lpVtbl->AddSwapChain(This,swapchain)
#define IWineD3DDevice_RemoveSwapChain(This,swapchain) (This)->lpVtbl->RemoveSwapChain(This,swapchain)
#ifdef VBOX_WITH_WDDM
#define IWineD3DDevice_Flush(This) (This)->lpVtbl->Flush(This)
#define IWineD3DDevice_VolBlt(This, pSourceVolume, pDestinationVolume, pSrcBoxArg, pDstPoin3D) (This)->lpVtbl->VolBlt(This, pSourceVolume, pDestinationVolume, pSrcBoxArg, pDstPoin3D)
#define IWineD3DDevice_VolTexBlt(This, pSourceTexture, pDestinationTexture, pSrcBoxArg, pDstPoin3D) (This)->lpVtbl->VolTexBlt(This, pSourceTexture, pDestinationTexture, pSrcBoxArg, pDstPoin3D)
#define IWineD3DDevice_FlushToHost(This) (This)->lpVtbl->FlushToHost(This)
#define IWineD3DDevice_Finish(This) (This)->lpVtbl->Finish(This)
#endif
#endif

#endif

HRESULT STDMETHODCALLTYPE IWineD3DDevice_CreateBuffer_Proxy(
    IWineD3DDevice* This,
    struct wined3d_buffer_desc *desc,
    const void *data,
    IUnknown *parent,
    const struct wined3d_parent_ops *parent_ops,
    IWineD3DBuffer **buffer);
void __RPC_STUB IWineD3DDevice_CreateBuffer_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_CreateVertexBuffer_Proxy(
    IWineD3DDevice* This,
    UINT length,
    DWORD usage,
    WINED3DPOOL pool,
    IWineD3DBuffer **vertex_buffer,
    IUnknown *parent,
    const struct wined3d_parent_ops *parent_ops);
void __RPC_STUB IWineD3DDevice_CreateVertexBuffer_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_CreateIndexBuffer_Proxy(
    IWineD3DDevice* This,
    UINT length,
    DWORD usage,
    WINED3DPOOL pool,
    IWineD3DBuffer **index_buffer,
    IUnknown *parent,
    const struct wined3d_parent_ops *parent_ops);
void __RPC_STUB IWineD3DDevice_CreateIndexBuffer_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_CreateStateBlock_Proxy(
    IWineD3DDevice* This,
    WINED3DSTATEBLOCKTYPE type,
    IWineD3DStateBlock **stateblock,
    IUnknown *parent);
void __RPC_STUB IWineD3DDevice_CreateStateBlock_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_CreateSurface_Proxy(
    IWineD3DDevice* This,
    UINT width,
    UINT height,
    WINED3DFORMAT format,
    BOOL lockable,
    BOOL discard,
    UINT level,
    IWineD3DSurface **surface,
    DWORD usage,
    WINED3DPOOL pool,
    WINED3DMULTISAMPLE_TYPE multisample_type,
    DWORD multisample_quality,
    WINED3DSURFTYPE surface_type,
    IUnknown *parent,
    const struct wined3d_parent_ops *parent_ops);
void __RPC_STUB IWineD3DDevice_CreateSurface_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_CreateRendertargetView_Proxy(
    IWineD3DDevice* This,
    IWineD3DResource *resource,
    IUnknown *parent,
    IWineD3DRendertargetView **rendertarget_view);
void __RPC_STUB IWineD3DDevice_CreateRendertargetView_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_CreateTexture_Proxy(
    IWineD3DDevice* This,
    UINT width,
    UINT height,
    UINT levels,
    DWORD usage,
    WINED3DFORMAT format,
    WINED3DPOOL pool,
    IWineD3DTexture **texture,
    IUnknown *parent,
    const struct wined3d_parent_ops *parent_ops);
void __RPC_STUB IWineD3DDevice_CreateTexture_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_CreateVolumeTexture_Proxy(
    IWineD3DDevice* This,
    UINT width,
    UINT height,
    UINT depth,
    UINT levels,
    DWORD usage,
    WINED3DFORMAT format,
    WINED3DPOOL pool,
    IWineD3DVolumeTexture **texture,
    IUnknown *parent,
    const struct wined3d_parent_ops *parent_ops);
void __RPC_STUB IWineD3DDevice_CreateVolumeTexture_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_CreateVolume_Proxy(
    IWineD3DDevice* This,
    UINT width,
    UINT height,
    UINT depth,
    DWORD usage,
    WINED3DFORMAT format,
    WINED3DPOOL pool,
    IWineD3DVolume **volume,
    IUnknown *parent,
    const struct wined3d_parent_ops *parent_ops);
void __RPC_STUB IWineD3DDevice_CreateVolume_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_CreateCubeTexture_Proxy(
    IWineD3DDevice* This,
    UINT edge_length,
    UINT levels,
    DWORD usage,
    WINED3DFORMAT format,
    WINED3DPOOL pool,
    IWineD3DCubeTexture **texture,
    IUnknown *parent,
    const struct wined3d_parent_ops *parent_ops);
void __RPC_STUB IWineD3DDevice_CreateCubeTexture_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_CreateQuery_Proxy(
    IWineD3DDevice* This,
    WINED3DQUERYTYPE type,
    IWineD3DQuery **query,
    IUnknown *parent);
void __RPC_STUB IWineD3DDevice_CreateQuery_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_CreateSwapChain_Proxy(
    IWineD3DDevice* This,
    WINED3DPRESENT_PARAMETERS *present_parameters,
    IWineD3DSwapChain **swapchain,
    IUnknown *parent,
    WINED3DSURFTYPE surface_type);
void __RPC_STUB IWineD3DDevice_CreateSwapChain_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_CreateVertexDeclaration_Proxy(
    IWineD3DDevice* This,
    IWineD3DVertexDeclaration **declaration,
    IUnknown *parent,
    const struct wined3d_parent_ops *parent_ops,
    const WINED3DVERTEXELEMENT *elements,
    UINT element_count);
void __RPC_STUB IWineD3DDevice_CreateVertexDeclaration_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_CreateVertexDeclarationFromFVF_Proxy(
    IWineD3DDevice* This,
    IWineD3DVertexDeclaration **declaration,
    IUnknown *parent,
    const struct wined3d_parent_ops *parent_ops,
    DWORD fvf);
void __RPC_STUB IWineD3DDevice_CreateVertexDeclarationFromFVF_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_CreateVertexShader_Proxy(
    IWineD3DDevice* This,
    const DWORD *function,
    const struct wined3d_shader_signature *output_signature,
    IWineD3DVertexShader **shader,
    IUnknown *parent,
    const struct wined3d_parent_ops *parent_ops);
void __RPC_STUB IWineD3DDevice_CreateVertexShader_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_CreateGeometryShader_Proxy(
    IWineD3DDevice* This,
    const DWORD *byte_code,
    const struct wined3d_shader_signature *output_signature,
    IWineD3DGeometryShader **shader,
    IUnknown *parent,
    const struct wined3d_parent_ops *parent_ops);
void __RPC_STUB IWineD3DDevice_CreateGeometryShader_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_CreatePixelShader_Proxy(
    IWineD3DDevice* This,
    const DWORD *function,
    const struct wined3d_shader_signature *output_signature,
    IWineD3DPixelShader **shader,
    IUnknown *parent,
    const struct wined3d_parent_ops *parent_ops);
void __RPC_STUB IWineD3DDevice_CreatePixelShader_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_CreatePalette_Proxy(
    IWineD3DDevice* This,
    DWORD flags,
    const PALETTEENTRY *palette_entry,
    IWineD3DPalette **palette,
    IUnknown *parent);
void __RPC_STUB IWineD3DDevice_CreatePalette_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_Init3D_Proxy(
    IWineD3DDevice* This,
    WINED3DPRESENT_PARAMETERS *present_parameters);
void __RPC_STUB IWineD3DDevice_Init3D_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_InitGDI_Proxy(
    IWineD3DDevice* This,
    WINED3DPRESENT_PARAMETERS *present_parameters);
void __RPC_STUB IWineD3DDevice_InitGDI_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_Uninit3D_Proxy(
    IWineD3DDevice* This,
    ULONG (STDMETHODCALLTYPE * destroy_swapchain_callback)(IWineD3DSwapChain *pSwapChain));
void __RPC_STUB IWineD3DDevice_Uninit3D_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_UninitGDI_Proxy(
    IWineD3DDevice* This,
    ULONG (STDMETHODCALLTYPE * destroy_swapchain_callback)(IWineD3DSwapChain *pSwapChain));
void __RPC_STUB IWineD3DDevice_UninitGDI_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE IWineD3DDevice_SetMultithreaded_Proxy(
    IWineD3DDevice* This);
void __RPC_STUB IWineD3DDevice_SetMultithreaded_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_EvictManagedResources_Proxy(
    IWineD3DDevice* This);
void __RPC_STUB IWineD3DDevice_EvictManagedResources_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
UINT STDMETHODCALLTYPE IWineD3DDevice_GetAvailableTextureMem_Proxy(
    IWineD3DDevice* This);
void __RPC_STUB IWineD3DDevice_GetAvailableTextureMem_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_GetBackBuffer_Proxy(
    IWineD3DDevice* This,
    UINT swapchain_idx,
    UINT backbuffer_idx,
    WINED3DBACKBUFFER_TYPE backbuffer_type,
    IWineD3DSurface **backbuffer);
void __RPC_STUB IWineD3DDevice_GetBackBuffer_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_GetCreationParameters_Proxy(
    IWineD3DDevice* This,
    WINED3DDEVICE_CREATION_PARAMETERS *creation_parameters);
void __RPC_STUB IWineD3DDevice_GetCreationParameters_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_GetDeviceCaps_Proxy(
    IWineD3DDevice* This,
    WINED3DCAPS *caps);
void __RPC_STUB IWineD3DDevice_GetDeviceCaps_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_GetDirect3D_Proxy(
    IWineD3DDevice* This,
    IWineD3D **d3d);
void __RPC_STUB IWineD3DDevice_GetDirect3D_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_GetDisplayMode_Proxy(
    IWineD3DDevice* This,
    UINT swapchain_idx,
    WINED3DDISPLAYMODE *mode);
void __RPC_STUB IWineD3DDevice_GetDisplayMode_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_SetDisplayMode_Proxy(
    IWineD3DDevice* This,
    UINT swapchain_idx,
    const WINED3DDISPLAYMODE *mode);
void __RPC_STUB IWineD3DDevice_SetDisplayMode_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
UINT STDMETHODCALLTYPE IWineD3DDevice_GetNumberOfSwapChains_Proxy(
    IWineD3DDevice* This);
void __RPC_STUB IWineD3DDevice_GetNumberOfSwapChains_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_GetRasterStatus_Proxy(
    IWineD3DDevice* This,
    UINT swapchain_idx,
    WINED3DRASTER_STATUS *raster_status);
void __RPC_STUB IWineD3DDevice_GetRasterStatus_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_GetSwapChain_Proxy(
    IWineD3DDevice* This,
    UINT swapchain_idx,
    IWineD3DSwapChain **swapchain);
void __RPC_STUB IWineD3DDevice_GetSwapChain_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_Reset_Proxy(
    IWineD3DDevice* This,
    WINED3DPRESENT_PARAMETERS *present_parameters);
void __RPC_STUB IWineD3DDevice_Reset_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_SetDialogBoxMode_Proxy(
    IWineD3DDevice* This,
    BOOL enable_dialogs);
void __RPC_STUB IWineD3DDevice_SetDialogBoxMode_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_SetCursorProperties_Proxy(
    IWineD3DDevice* This,
    UINT x_hotspot,
    UINT y_hotspot,
    IWineD3DSurface *cursor_surface);
void __RPC_STUB IWineD3DDevice_SetCursorProperties_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE IWineD3DDevice_SetCursorPosition_Proxy(
    IWineD3DDevice* This,
    int x_screen_space,
    int y_screen_space,
    DWORD flags);
void __RPC_STUB IWineD3DDevice_SetCursorPosition_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
BOOL STDMETHODCALLTYPE IWineD3DDevice_ShowCursor_Proxy(
    IWineD3DDevice* This,
    BOOL show);
void __RPC_STUB IWineD3DDevice_ShowCursor_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_SetClipPlane_Proxy(
    IWineD3DDevice* This,
    DWORD plane_idx,
    const float *plane);
void __RPC_STUB IWineD3DDevice_SetClipPlane_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_GetClipPlane_Proxy(
    IWineD3DDevice* This,
    DWORD plane_idx,
    float *plane);
void __RPC_STUB IWineD3DDevice_GetClipPlane_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_SetClipStatus_Proxy(
    IWineD3DDevice* This,
    const WINED3DCLIPSTATUS *clip_status);
void __RPC_STUB IWineD3DDevice_SetClipStatus_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_GetClipStatus_Proxy(
    IWineD3DDevice* This,
    WINED3DCLIPSTATUS *clip_status);
void __RPC_STUB IWineD3DDevice_GetClipStatus_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_SetCurrentTexturePalette_Proxy(
    IWineD3DDevice* This,
    UINT palette_number);
void __RPC_STUB IWineD3DDevice_SetCurrentTexturePalette_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_GetCurrentTexturePalette_Proxy(
    IWineD3DDevice* This,
    UINT *palette_number);
void __RPC_STUB IWineD3DDevice_GetCurrentTexturePalette_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_SetDepthStencilSurface_Proxy(
    IWineD3DDevice* This,
    IWineD3DSurface *depth_stencil);
void __RPC_STUB IWineD3DDevice_SetDepthStencilSurface_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_GetDepthStencilSurface_Proxy(
    IWineD3DDevice* This,
    IWineD3DSurface **depth_stencil);
void __RPC_STUB IWineD3DDevice_GetDepthStencilSurface_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE IWineD3DDevice_SetGammaRamp_Proxy(
    IWineD3DDevice* This,
    UINT swapchain_idx,
    DWORD flags,
    const WINED3DGAMMARAMP *ramp);
void __RPC_STUB IWineD3DDevice_SetGammaRamp_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE IWineD3DDevice_GetGammaRamp_Proxy(
    IWineD3DDevice* This,
    UINT swapchain_idx,
    WINED3DGAMMARAMP *ramp);
void __RPC_STUB IWineD3DDevice_GetGammaRamp_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_SetIndexBuffer_Proxy(
    IWineD3DDevice* This,
    IWineD3DBuffer *index_buffer,
    WINED3DFORMAT format);
void __RPC_STUB IWineD3DDevice_SetIndexBuffer_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_GetIndexBuffer_Proxy(
    IWineD3DDevice* This,
    IWineD3DBuffer **index_buffer);
void __RPC_STUB IWineD3DDevice_GetIndexBuffer_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_SetBaseVertexIndex_Proxy(
    IWineD3DDevice* This,
    INT base_index);
void __RPC_STUB IWineD3DDevice_SetBaseVertexIndex_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_GetBaseVertexIndex_Proxy(
    IWineD3DDevice* This,
    INT *base_index);
void __RPC_STUB IWineD3DDevice_GetBaseVertexIndex_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_SetLight_Proxy(
    IWineD3DDevice* This,
    DWORD light_idx,
    const WINED3DLIGHT *light);
void __RPC_STUB IWineD3DDevice_SetLight_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_GetLight_Proxy(
    IWineD3DDevice* This,
    DWORD light_idx,
    WINED3DLIGHT *light);
void __RPC_STUB IWineD3DDevice_GetLight_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_SetLightEnable_Proxy(
    IWineD3DDevice* This,
    DWORD light_idx,
    BOOL enable);
void __RPC_STUB IWineD3DDevice_SetLightEnable_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_GetLightEnable_Proxy(
    IWineD3DDevice* This,
    DWORD light_idx,
    BOOL *enable);
void __RPC_STUB IWineD3DDevice_GetLightEnable_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_SetMaterial_Proxy(
    IWineD3DDevice* This,
    const WINED3DMATERIAL *material);
void __RPC_STUB IWineD3DDevice_SetMaterial_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_GetMaterial_Proxy(
    IWineD3DDevice* This,
    WINED3DMATERIAL *material);
void __RPC_STUB IWineD3DDevice_GetMaterial_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_SetNPatchMode_Proxy(
    IWineD3DDevice* This,
    float segments);
void __RPC_STUB IWineD3DDevice_SetNPatchMode_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
float STDMETHODCALLTYPE IWineD3DDevice_GetNPatchMode_Proxy(
    IWineD3DDevice* This);
void __RPC_STUB IWineD3DDevice_GetNPatchMode_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_SetPaletteEntries_Proxy(
    IWineD3DDevice* This,
    UINT palette_number,
    const PALETTEENTRY *entries);
void __RPC_STUB IWineD3DDevice_SetPaletteEntries_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_GetPaletteEntries_Proxy(
    IWineD3DDevice* This,
    UINT palette_number,
    PALETTEENTRY *entries);
void __RPC_STUB IWineD3DDevice_GetPaletteEntries_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_SetPixelShader_Proxy(
    IWineD3DDevice* This,
    IWineD3DPixelShader *shader);
void __RPC_STUB IWineD3DDevice_SetPixelShader_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_GetPixelShader_Proxy(
    IWineD3DDevice* This,
    IWineD3DPixelShader **shader);
void __RPC_STUB IWineD3DDevice_GetPixelShader_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_SetPixelShaderConstantB_Proxy(
    IWineD3DDevice* This,
    UINT start_register,
    const BOOL *constants,
    UINT bool_count);
void __RPC_STUB IWineD3DDevice_SetPixelShaderConstantB_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_GetPixelShaderConstantB_Proxy(
    IWineD3DDevice* This,
    UINT start_register,
    BOOL *constants,
    UINT bool_count);
void __RPC_STUB IWineD3DDevice_GetPixelShaderConstantB_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_SetPixelShaderConstantI_Proxy(
    IWineD3DDevice* This,
    UINT start_register,
    const int *constants,
    UINT vector4i_count);
void __RPC_STUB IWineD3DDevice_SetPixelShaderConstantI_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_GetPixelShaderConstantI_Proxy(
    IWineD3DDevice* This,
    UINT start_register,
    int *constants,
    UINT vector4i_count);
void __RPC_STUB IWineD3DDevice_GetPixelShaderConstantI_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_SetPixelShaderConstantF_Proxy(
    IWineD3DDevice* This,
    UINT start_register,
    const float *constants,
    UINT vector4f_count);
void __RPC_STUB IWineD3DDevice_SetPixelShaderConstantF_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_GetPixelShaderConstantF_Proxy(
    IWineD3DDevice* This,
    UINT start_register,
    float *constants,
    UINT vector4f_count);
void __RPC_STUB IWineD3DDevice_GetPixelShaderConstantF_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_SetRenderState_Proxy(
    IWineD3DDevice* This,
    WINED3DRENDERSTATETYPE state,
    DWORD value);
void __RPC_STUB IWineD3DDevice_SetRenderState_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_GetRenderState_Proxy(
    IWineD3DDevice* This,
    WINED3DRENDERSTATETYPE state,
    DWORD *value);
void __RPC_STUB IWineD3DDevice_GetRenderState_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_SetRenderTarget_Proxy(
    IWineD3DDevice* This,
    DWORD render_target_idx,
    IWineD3DSurface *render_target,
    BOOL set_viewport);
void __RPC_STUB IWineD3DDevice_SetRenderTarget_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_GetRenderTarget_Proxy(
    IWineD3DDevice* This,
    DWORD render_target_idx,
    IWineD3DSurface **render_target);
void __RPC_STUB IWineD3DDevice_GetRenderTarget_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_SetFrontBackBuffers_Proxy(
    IWineD3DDevice* This,
    IWineD3DSurface *front,
    IWineD3DSurface *back);
void __RPC_STUB IWineD3DDevice_SetFrontBackBuffers_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_SetSamplerState_Proxy(
    IWineD3DDevice* This,
    DWORD sampler_idx,
    WINED3DSAMPLERSTATETYPE state,
    DWORD value);
void __RPC_STUB IWineD3DDevice_SetSamplerState_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_GetSamplerState_Proxy(
    IWineD3DDevice* This,
    DWORD sampler_idx,
    WINED3DSAMPLERSTATETYPE state,
    DWORD *value);
void __RPC_STUB IWineD3DDevice_GetSamplerState_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_SetScissorRect_Proxy(
    IWineD3DDevice* This,
    const RECT *rect);
void __RPC_STUB IWineD3DDevice_SetScissorRect_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_GetScissorRect_Proxy(
    IWineD3DDevice* This,
    RECT *rect);
void __RPC_STUB IWineD3DDevice_GetScissorRect_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_SetSoftwareVertexProcessing_Proxy(
    IWineD3DDevice* This,
    BOOL software);
void __RPC_STUB IWineD3DDevice_SetSoftwareVertexProcessing_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
BOOL STDMETHODCALLTYPE IWineD3DDevice_GetSoftwareVertexProcessing_Proxy(
    IWineD3DDevice* This);
void __RPC_STUB IWineD3DDevice_GetSoftwareVertexProcessing_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_SetStreamSource_Proxy(
    IWineD3DDevice* This,
    UINT stream_idx,
    IWineD3DBuffer *buffer,
    UINT offset,
    UINT stride);
void __RPC_STUB IWineD3DDevice_SetStreamSource_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_GetStreamSource_Proxy(
    IWineD3DDevice* This,
    UINT stream_idx,
    IWineD3DBuffer **buffer,
    UINT *offset,
    UINT *stride);
void __RPC_STUB IWineD3DDevice_GetStreamSource_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_SetStreamSourceFreq_Proxy(
    IWineD3DDevice* This,
    UINT stream_idx,
    UINT divider);
void __RPC_STUB IWineD3DDevice_SetStreamSourceFreq_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_GetStreamSourceFreq_Proxy(
    IWineD3DDevice* This,
    UINT stream_idx,
    UINT *divider);
void __RPC_STUB IWineD3DDevice_GetStreamSourceFreq_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_SetTexture_Proxy(
    IWineD3DDevice* This,
    DWORD stage,
    IWineD3DBaseTexture *texture);
void __RPC_STUB IWineD3DDevice_SetTexture_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_GetTexture_Proxy(
    IWineD3DDevice* This,
    DWORD stage,
    IWineD3DBaseTexture **texture);
void __RPC_STUB IWineD3DDevice_GetTexture_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_SetTextureStageState_Proxy(
    IWineD3DDevice* This,
    DWORD stage,
    WINED3DTEXTURESTAGESTATETYPE state,
    DWORD value);
void __RPC_STUB IWineD3DDevice_SetTextureStageState_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_GetTextureStageState_Proxy(
    IWineD3DDevice* This,
    DWORD stage,
    WINED3DTEXTURESTAGESTATETYPE state,
    DWORD *value);
void __RPC_STUB IWineD3DDevice_GetTextureStageState_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_SetTransform_Proxy(
    IWineD3DDevice* This,
    WINED3DTRANSFORMSTATETYPE state,
    const WINED3DMATRIX *matrix);
void __RPC_STUB IWineD3DDevice_SetTransform_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_GetTransform_Proxy(
    IWineD3DDevice* This,
    WINED3DTRANSFORMSTATETYPE state,
    WINED3DMATRIX *matrix);
void __RPC_STUB IWineD3DDevice_GetTransform_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_SetVertexDeclaration_Proxy(
    IWineD3DDevice* This,
    IWineD3DVertexDeclaration *declaration);
void __RPC_STUB IWineD3DDevice_SetVertexDeclaration_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_GetVertexDeclaration_Proxy(
    IWineD3DDevice* This,
    IWineD3DVertexDeclaration **declaration);
void __RPC_STUB IWineD3DDevice_GetVertexDeclaration_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_SetVertexShader_Proxy(
    IWineD3DDevice* This,
    IWineD3DVertexShader *shader);
void __RPC_STUB IWineD3DDevice_SetVertexShader_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_GetVertexShader_Proxy(
    IWineD3DDevice* This,
    IWineD3DVertexShader **shader);
void __RPC_STUB IWineD3DDevice_GetVertexShader_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_SetVertexShaderConstantB_Proxy(
    IWineD3DDevice* This,
    UINT start_register,
    const BOOL *constants,
    UINT bool_count);
void __RPC_STUB IWineD3DDevice_SetVertexShaderConstantB_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_GetVertexShaderConstantB_Proxy(
    IWineD3DDevice* This,
    UINT start_register,
    BOOL *constants,
    UINT bool_count);
void __RPC_STUB IWineD3DDevice_GetVertexShaderConstantB_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_SetVertexShaderConstantI_Proxy(
    IWineD3DDevice* This,
    UINT start_register,
    const int *constants,
    UINT vector4i_count);
void __RPC_STUB IWineD3DDevice_SetVertexShaderConstantI_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_GetVertexShaderConstantI_Proxy(
    IWineD3DDevice* This,
    UINT start_register,
    int *constants,
    UINT vector4i_count);
void __RPC_STUB IWineD3DDevice_GetVertexShaderConstantI_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_SetVertexShaderConstantF_Proxy(
    IWineD3DDevice* This,
    UINT start_register,
    const float *constants,
    UINT vector4f_count);
void __RPC_STUB IWineD3DDevice_SetVertexShaderConstantF_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_GetVertexShaderConstantF_Proxy(
    IWineD3DDevice* This,
    UINT start_register,
    float *constants,
    UINT vector4f_count);
void __RPC_STUB IWineD3DDevice_GetVertexShaderConstantF_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_SetViewport_Proxy(
    IWineD3DDevice* This,
    const WINED3DVIEWPORT *viewport);
void __RPC_STUB IWineD3DDevice_SetViewport_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_GetViewport_Proxy(
    IWineD3DDevice* This,
    WINED3DVIEWPORT *viewport);
void __RPC_STUB IWineD3DDevice_GetViewport_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_MultiplyTransform_Proxy(
    IWineD3DDevice* This,
    WINED3DTRANSFORMSTATETYPE state,
    const WINED3DMATRIX *matrix);
void __RPC_STUB IWineD3DDevice_MultiplyTransform_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_ValidateDevice_Proxy(
    IWineD3DDevice* This,
    DWORD *num_passes);
void __RPC_STUB IWineD3DDevice_ValidateDevice_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_ProcessVertices_Proxy(
    IWineD3DDevice* This,
    UINT src_start_idx,
    UINT dst_idx,
    UINT vertex_count,
    IWineD3DBuffer *dest_buffer,
    IWineD3DVertexDeclaration *declaration,
    DWORD flags,
    DWORD DestFVF);
void __RPC_STUB IWineD3DDevice_ProcessVertices_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_BeginStateBlock_Proxy(
    IWineD3DDevice* This);
void __RPC_STUB IWineD3DDevice_BeginStateBlock_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_EndStateBlock_Proxy(
    IWineD3DDevice* This,
    IWineD3DStateBlock **stateblock);
void __RPC_STUB IWineD3DDevice_EndStateBlock_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_BeginScene_Proxy(
    IWineD3DDevice* This);
void __RPC_STUB IWineD3DDevice_BeginScene_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_EndScene_Proxy(
    IWineD3DDevice* This);
void __RPC_STUB IWineD3DDevice_EndScene_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_Present_Proxy(
    IWineD3DDevice* This,
    const RECT *src_rect,
    const RECT *dst_rect,
    HWND dst_window_override,
    const RGNDATA *dirty_region);
void __RPC_STUB IWineD3DDevice_Present_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_Clear_Proxy(
    IWineD3DDevice* This,
    DWORD rect_count,
    const WINED3DRECT *rects,
    DWORD flags,
    WINED3DCOLOR color,
    float z,
    DWORD stencil);
void __RPC_STUB IWineD3DDevice_Clear_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE IWineD3DDevice_ClearRendertargetView_Proxy(
    IWineD3DDevice* This,
    IWineD3DRendertargetView *rendertarget_view,
    const float color[4]);
void __RPC_STUB IWineD3DDevice_ClearRendertargetView_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE IWineD3DDevice_SetPrimitiveType_Proxy(
    IWineD3DDevice* This,
    WINED3DPRIMITIVETYPE primitive_topology);
void __RPC_STUB IWineD3DDevice_SetPrimitiveType_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE IWineD3DDevice_GetPrimitiveType_Proxy(
    IWineD3DDevice* This,
    WINED3DPRIMITIVETYPE *primitive_topology);
void __RPC_STUB IWineD3DDevice_GetPrimitiveType_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_DrawPrimitive_Proxy(
    IWineD3DDevice* This,
    UINT start_vertex,
    UINT vertex_count);
void __RPC_STUB IWineD3DDevice_DrawPrimitive_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_DrawIndexedPrimitive_Proxy(
    IWineD3DDevice* This,
    UINT start_idx,
    UINT index_count);
void __RPC_STUB IWineD3DDevice_DrawIndexedPrimitive_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_DrawPrimitiveUP_Proxy(
    IWineD3DDevice* This,
    UINT vertex_count,
    const void *stream_data,
    UINT stream_stride);
void __RPC_STUB IWineD3DDevice_DrawPrimitiveUP_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_DrawIndexedPrimitiveUP_Proxy(
    IWineD3DDevice* This,
    UINT index_count,
    const void *index_data,
    WINED3DFORMAT index_data_format,
    const void *stream_data,
    UINT stream_stride);
void __RPC_STUB IWineD3DDevice_DrawIndexedPrimitiveUP_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_DrawPrimitiveStrided_Proxy(
    IWineD3DDevice* This,
    UINT vertex_count,
    const WineDirect3DVertexStridedData *strided_data);
void __RPC_STUB IWineD3DDevice_DrawPrimitiveStrided_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_DrawIndexedPrimitiveStrided_Proxy(
    IWineD3DDevice* This,
    UINT index_count,
    const WineDirect3DVertexStridedData *strided_data,
    UINT vertex_count,
    const void *index_data,
    WINED3DFORMAT index_data_format);
void __RPC_STUB IWineD3DDevice_DrawIndexedPrimitiveStrided_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_DrawRectPatch_Proxy(
    IWineD3DDevice* This,
    UINT handle,
    const float *num_segs,
    const WINED3DRECTPATCH_INFO *rect_patch_info);
void __RPC_STUB IWineD3DDevice_DrawRectPatch_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_DrawTriPatch_Proxy(
    IWineD3DDevice* This,
    UINT handle,
    const float *num_segs,
    const WINED3DTRIPATCH_INFO *tri_patch_info);
void __RPC_STUB IWineD3DDevice_DrawTriPatch_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_DeletePatch_Proxy(
    IWineD3DDevice* This,
    UINT handle);
void __RPC_STUB IWineD3DDevice_DeletePatch_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_ColorFill_Proxy(
    IWineD3DDevice* This,
    IWineD3DSurface *surface,
    const WINED3DRECT *rect,
    WINED3DCOLOR color);
void __RPC_STUB IWineD3DDevice_ColorFill_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_UpdateTexture_Proxy(
    IWineD3DDevice* This,
    IWineD3DBaseTexture *src_texture,
    IWineD3DBaseTexture *dst_texture);
void __RPC_STUB IWineD3DDevice_UpdateTexture_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_UpdateSurface_Proxy(
    IWineD3DDevice* This,
    IWineD3DSurface *src_surface,
    const RECT *src_rect,
    IWineD3DSurface *dst_surface,
    const POINT *dst_point);
void __RPC_STUB IWineD3DDevice_UpdateSurface_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_GetFrontBufferData_Proxy(
    IWineD3DDevice* This,
    UINT swapchain_idx,
    IWineD3DSurface *dst_surface);
void __RPC_STUB IWineD3DDevice_GetFrontBufferData_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_EnumResources_Proxy(
    IWineD3DDevice* This,
    HRESULT (STDMETHODCALLTYPE * callback)(IWineD3DResource *resource,void *pData),
    void *data);
void __RPC_STUB IWineD3DDevice_EnumResources_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_GetSurfaceFromDC_Proxy(
    IWineD3DDevice* This,
    HDC dc,
    IWineD3DSurface **surface);
void __RPC_STUB IWineD3DDevice_GetSurfaceFromDC_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
HRESULT STDMETHODCALLTYPE IWineD3DDevice_AcquireFocusWindow_Proxy(
    IWineD3DDevice* This,
    HWND window);
void __RPC_STUB IWineD3DDevice_AcquireFocusWindow_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);
void STDMETHODCALLTYPE IWineD3DDevice_ReleaseFocusWindow_Proxy(
    IWineD3DDevice* This);
void __RPC_STUB IWineD3DDevice_ReleaseFocusWindow_Stub(
    IRpcStubBuffer* This,
    IRpcChannelBuffer* pRpcChannelBuffer,
    PRPC_MESSAGE pRpcMessage,
    DWORD* pdwStubPhase);

#endif  /* __IWineD3DDevice_INTERFACE_DEFINED__ */

IWineD3D * STDMETHODCALLTYPE  WineDirect3DCreate(UINT dxVersion,IUnknown *parent);

IWineD3DClipper * STDMETHODCALLTYPE  WineDirect3DCreateClipper(IUnknown *parent);

#ifdef VBOX_WINE_NO_LOCK
#define wined3d_mutex_lock() do {} while (0)
#define wined3d_mutex_unlock() do {} while (0)
#else
void STDMETHODCALLTYPE  wined3d_mutex_lock(void);

void STDMETHODCALLTYPE  wined3d_mutex_unlock(void);
#endif
/* Begin additional prototypes for all interfaces */


/* End additional prototypes */

#ifdef __cplusplus
}
#endif

#endif /* __WIDL_WINED3D_H */
