]> git.cworth.org Git - apitrace/commitdiff
Describe HRESULT.
authorJosé Fonseca <jrfonseca@tungstengraphics.com>
Tue, 8 Jul 2008 23:21:10 +0000 (08:21 +0900)
committerJosé Fonseca <jrfonseca@tungstengraphics.com>
Tue, 8 Jul 2008 23:21:10 +0000 (08:21 +0900)
d3d8.py
d3d9.py

diff --git a/d3d8.py b/d3d8.py
index ec63d1e9cb8fafefba7cb0bca3ae9deb2195cca3..8a0cd081547713d1683af7936a656b262e676785 100644 (file)
--- a/d3d8.py
+++ b/d3d8.py
@@ -23,6 +23,31 @@ from windows import *
 from d3d8types import *
 from d3d8caps import *
 
+HRESULT = Enum("HRESULT", [
+    "D3D_OK",
+    "D3DERR_WRONGTEXTUREFORMAT",
+    "D3DERR_UNSUPPORTEDCOLOROPERATION",
+    "D3DERR_UNSUPPORTEDCOLORARG",
+    "D3DERR_UNSUPPORTEDALPHAOPERATION",
+    "D3DERR_UNSUPPORTEDALPHAARG",
+    "D3DERR_TOOMANYOPERATIONS",
+    "D3DERR_CONFLICTINGTEXTUREFILTER",
+    "D3DERR_UNSUPPORTEDFACTORVALUE",
+    "D3DERR_CONFLICTINGRENDERSTATE",
+    "D3DERR_UNSUPPORTEDTEXTUREFILTER",
+    "D3DERR_CONFLICTINGTEXTUREPALETTE",
+    "D3DERR_DRIVERINTERNALERROR",
+    "D3DERR_NOTFOUND",
+    "D3DERR_MOREDATA",
+    "D3DERR_DEVICELOST",
+    "D3DERR_DEVICENOTRESET",
+    "D3DERR_NOTAVAILABLE",
+    "D3DERR_OUTOFVIDEOMEMORY",
+    "D3DERR_INVALIDDEVICE",
+    "D3DERR_INVALIDCALL",
+    "D3DERR_DRIVERINVALIDCALL",
+])
+
 IDirect3D8 = Interface("IDirect3D8", IUnknown)
 IDirect3DDevice8 = Interface("IDirect3DDevice8", IUnknown)
 IDirect3DSwapChain8 = Interface("IDirect3DSwapChain8", IUnknown)
@@ -50,196 +75,196 @@ PDIRECT3DSURFACE8 = WrapPointer(IDirect3DSurface8)
 PDIRECT3DVOLUME8 = WrapPointer(IDirect3DVolume8)
 
 IDirect3D8.methods += [
-       Method(HRESULT, "RegisterSoftwareDevice", [(Pointer(Void), "pInitializeFunction")]),
-       Method(UINT, "GetAdapterCount", []),
-       Method(HRESULT, "GetAdapterIdentifier", [(UINT, "Adapter"), (DWORD, "Flags"), (OutPointer(D3DADAPTER_IDENTIFIER8), "pIdentifier")]),
-       Method(UINT, "GetAdapterModeCount", [(UINT, "Adapter")]),
-       Method(HRESULT, "EnumAdapterModes", [(UINT, "Adapter"), (UINT, "Mode"), (OutPointer(D3DDISPLAYMODE), "pMode")]),
-       Method(HRESULT, "GetAdapterDisplayMode", [(UINT, "Adapter"), (OutPointer(D3DDISPLAYMODE), "pMode")]),
-       Method(HRESULT, "CheckDeviceType", [(UINT, "Adapter"), (D3DDEVTYPE, "CheckType"), (D3DFORMAT, "DisplayFormat"), (D3DFORMAT, "BackBufferFormat"), (BOOL, "Windowed")]),
-       Method(HRESULT, "CheckDeviceFormat", [(UINT, "Adapter"), (D3DDEVTYPE, "DeviceType"), (D3DFORMAT, "AdapterFormat"), (DWORD, "Usage"), (D3DRESOURCETYPE, "RType"), (D3DFORMAT, "CheckFormat")]),
-       Method(HRESULT, "CheckDeviceMultiSampleType", [(UINT, "Adapter"), (D3DDEVTYPE, "DeviceType"), (D3DFORMAT, "SurfaceFormat"), (BOOL, "Windowed"), (D3DMULTISAMPLE_TYPE, "MultiSampleType")]),
-       Method(HRESULT, "CheckDepthStencilMatch", [(UINT, "Adapter"), (D3DDEVTYPE, "DeviceType"), (D3DFORMAT, "AdapterFormat"), (D3DFORMAT, "RenderTargetFormat"), (D3DFORMAT, "DepthStencilFormat")]),
-       Method(HRESULT, "GetDeviceCaps", [(UINT, "Adapter"), (D3DDEVTYPE, "DeviceType"), (OutPointer(D3DCAPS8), "pCaps")]),
-       Method(HMONITOR, "GetAdapterMonitor", [(UINT, "Adapter")]),
-       Method(HRESULT, "CreateDevice", [(UINT, "Adapter"), (D3DDEVTYPE, "DeviceType"), (HWND, "hFocusWindow"), (DWORD, "BehaviorFlags"), (OutPointer(D3DPRESENT_PARAMETERS), "pPresentationParameters"), (OutPointer(PDIRECT3DDEVICE8), "ppReturnedDeviceInterface")]),
+    Method(HRESULT, "RegisterSoftwareDevice", [(Pointer(Void), "pInitializeFunction")]),
+    Method(UINT, "GetAdapterCount", []),
+    Method(HRESULT, "GetAdapterIdentifier", [(UINT, "Adapter"), (DWORD, "Flags"), (OutPointer(D3DADAPTER_IDENTIFIER8), "pIdentifier")]),
+    Method(UINT, "GetAdapterModeCount", [(UINT, "Adapter")]),
+    Method(HRESULT, "EnumAdapterModes", [(UINT, "Adapter"), (UINT, "Mode"), (OutPointer(D3DDISPLAYMODE), "pMode")]),
+    Method(HRESULT, "GetAdapterDisplayMode", [(UINT, "Adapter"), (OutPointer(D3DDISPLAYMODE), "pMode")]),
+    Method(HRESULT, "CheckDeviceType", [(UINT, "Adapter"), (D3DDEVTYPE, "CheckType"), (D3DFORMAT, "DisplayFormat"), (D3DFORMAT, "BackBufferFormat"), (BOOL, "Windowed")]),
+    Method(HRESULT, "CheckDeviceFormat", [(UINT, "Adapter"), (D3DDEVTYPE, "DeviceType"), (D3DFORMAT, "AdapterFormat"), (DWORD, "Usage"), (D3DRESOURCETYPE, "RType"), (D3DFORMAT, "CheckFormat")]),
+    Method(HRESULT, "CheckDeviceMultiSampleType", [(UINT, "Adapter"), (D3DDEVTYPE, "DeviceType"), (D3DFORMAT, "SurfaceFormat"), (BOOL, "Windowed"), (D3DMULTISAMPLE_TYPE, "MultiSampleType")]),
+    Method(HRESULT, "CheckDepthStencilMatch", [(UINT, "Adapter"), (D3DDEVTYPE, "DeviceType"), (D3DFORMAT, "AdapterFormat"), (D3DFORMAT, "RenderTargetFormat"), (D3DFORMAT, "DepthStencilFormat")]),
+    Method(HRESULT, "GetDeviceCaps", [(UINT, "Adapter"), (D3DDEVTYPE, "DeviceType"), (OutPointer(D3DCAPS8), "pCaps")]),
+    Method(HMONITOR, "GetAdapterMonitor", [(UINT, "Adapter")]),
+    Method(HRESULT, "CreateDevice", [(UINT, "Adapter"), (D3DDEVTYPE, "DeviceType"), (HWND, "hFocusWindow"), (DWORD, "BehaviorFlags"), (OutPointer(D3DPRESENT_PARAMETERS), "pPresentationParameters"), (OutPointer(PDIRECT3DDEVICE8), "ppReturnedDeviceInterface")]),
 ]
 
 IDirect3DDevice8.methods += [
-       Method(HRESULT, "TestCooperativeLevel", []),
-       Method(UINT, "GetAvailableTextureMem", []),
-       Method(HRESULT, "ResourceManagerDiscardBytes", [(DWORD, "Bytes")]),
-       Method(HRESULT, "GetDirect3D", [(OutPointer(PDIRECT3D8), "ppD3D8")]),
-       Method(HRESULT, "GetDeviceCaps", [(OutPointer(D3DCAPS8), "pCaps")]),
-       Method(HRESULT, "GetDisplayMode", [(OutPointer(D3DDISPLAYMODE), "pMode")]),
-       Method(HRESULT, "GetCreationParameters", [(OutPointer(D3DDEVICE_CREATION_PARAMETERS), "pParameters")]),
-       Method(HRESULT, "SetCursorProperties", [(UINT, "XHotSpot"), (UINT, "YHotSpot"), (PDIRECT3DSURFACE8, "pCursorBitmap")]),
-       Method(Void, "SetCursorPosition", [(Int, "X"), (Int, "Y"), (DWORD, "Flags")]),
-       Method(BOOL, "ShowCursor", [(BOOL, "bShow")]),
-       Method(HRESULT, "CreateAdditionalSwapChain", [(OutPointer(D3DPRESENT_PARAMETERS), "pPresentationParameters"), (OutPointer(PDIRECT3DSWAPCHAIN8), "pSwapChain")]),
-       Method(HRESULT, "Reset", [(OutPointer(D3DPRESENT_PARAMETERS), "pPresentationParameters")]),
-       Method(HRESULT, "Present", [(Pointer(Const(RECT)), "pSourceRect"), (Pointer(Const(RECT)), "pDestRect"), (HWND, "hDestWindowOverride"), (Const(Pointer(RGNDATA)), "pDirtyRegion")]),
-       Method(HRESULT, "GetBackBuffer", [(UINT, "BackBuffer"), (D3DBACKBUFFER_TYPE, "Type"), (OutPointer(PDIRECT3DSURFACE8), "ppBackBuffer")]),
-       Method(HRESULT, "GetRasterStatus", [(OutPointer(D3DRASTER_STATUS), "pRasterStatus")]),
-       Method(Void, "SetGammaRamp", [(DWORD, "Flags"), (Pointer(Const(D3DGAMMARAMP)), "pRamp")]),
-       Method(Void, "GetGammaRamp", [(OutPointer(D3DGAMMARAMP), "pRamp")]),
-       Method(HRESULT, "CreateTexture", [(UINT, "Width"), (UINT, "Height"), (UINT, "Levels"), (DWORD, "Usage"), (D3DFORMAT, "Format"), (D3DPOOL, "Pool"), (OutPointer(PDIRECT3DTEXTURE8), "ppTexture")]),
-       Method(HRESULT, "CreateVolumeTexture", [(UINT, "Width"), (UINT, "Height"), (UINT, "Depth"), (UINT, "Levels"), (DWORD, "Usage"), (D3DFORMAT, "Format"), (D3DPOOL, "Pool"), (OutPointer(PDIRECT3DVOLUMETEXTURE8), "ppVolumeTexture")]),
-       Method(HRESULT, "CreateCubeTexture", [(UINT, "EdgeLength"), (UINT, "Levels"), (DWORD, "Usage"), (D3DFORMAT, "Format"), (D3DPOOL, "Pool"), (OutPointer(PDIRECT3DCUBETEXTURE8), "ppCubeTexture")]),
-       Method(HRESULT, "CreateVertexBuffer", [(UINT, "Length"), (DWORD, "Usage"), (DWORD, "FVF"), (D3DPOOL, "Pool"), (OutPointer(PDIRECT3DVERTEXBUFFER8), "ppVertexBuffer")]),
-       Method(HRESULT, "CreateIndexBuffer", [(UINT, "Length"), (DWORD, "Usage"), (D3DFORMAT, "Format"), (D3DPOOL, "Pool"), (OutPointer(PDIRECT3DINDEXBUFFER8), "ppIndexBuffer")]),
-       Method(HRESULT, "CreateRenderTarget", [(UINT, "Width"), (UINT, "Height"), (D3DFORMAT, "Format"), (D3DMULTISAMPLE_TYPE, "MultiSample"), (BOOL, "Lockable"), (OutPointer(PDIRECT3DSURFACE8), "ppSurface")]),
-       Method(HRESULT, "CreateDepthStencilSurface", [(UINT, "Width"), (UINT, "Height"), (D3DFORMAT, "Format"), (D3DMULTISAMPLE_TYPE, "MultiSample"), (OutPointer(PDIRECT3DSURFACE8), "ppSurface")]),
-       Method(HRESULT, "CreateImageSurface", [(UINT, "Width"), (UINT, "Height"), (D3DFORMAT, "Format"), (OutPointer(PDIRECT3DSURFACE8), "ppSurface")]),
-       Method(HRESULT, "CopyRects", [(PDIRECT3DSURFACE8, "pSourceSurface"), (Pointer(Const(RECT)), "pSourceRectsArray"), (UINT, "cRects"), (PDIRECT3DSURFACE8, "pDestinationSurface"), (Pointer(Const(POINT)), "pDestPointsArray")]),
-       Method(HRESULT, "UpdateTexture", [(PDIRECT3DBASETEXTURE8, "pSourceTexture"), (PDIRECT3DBASETEXTURE8, "pDestinationTexture")]),
-       Method(HRESULT, "GetFrontBuffer", [(PDIRECT3DSURFACE8, "pDestSurface")]),
-       Method(HRESULT, "SetRenderTarget", [(PDIRECT3DSURFACE8, "pRenderTarget"), (PDIRECT3DSURFACE8, "pNewZStencil")]),
-       Method(HRESULT, "GetRenderTarget", [(OutPointer(PDIRECT3DSURFACE8), "ppRenderTarget")]),
-       Method(HRESULT, "GetDepthStencilSurface", [(OutPointer(PDIRECT3DSURFACE8), "ppZStencilSurface")]),
-       Method(HRESULT, "BeginScene", []),
-       Method(HRESULT, "EndScene", []),
-       Method(HRESULT, "Clear", [(DWORD, "Count"), (Pointer(Const(D3DRECT)), "pRects"), (DWORD, "Flags"), (D3DCOLOR, "Color"), (Float, "Z"), (DWORD, "Stencil")]),
-       Method(HRESULT, "SetTransform", [(D3DTRANSFORMSTATETYPE, "State"), (Pointer(Const(D3DMATRIX)), "pMatrix")]),
-       Method(HRESULT, "GetTransform", [(D3DTRANSFORMSTATETYPE, "State"), (OutPointer(D3DMATRIX), "pMatrix")]),
-       Method(HRESULT, "MultiplyTransform", [(D3DTRANSFORMSTATETYPE, "State"), (Pointer(Const(D3DMATRIX)), "pMatrix")]),
-       Method(HRESULT, "SetViewport", [(Pointer(Const(D3DVIEWPORT8)), "pViewport")]),
-       Method(HRESULT, "GetViewport", [(OutPointer(D3DVIEWPORT8), "pViewport")]),
-       Method(HRESULT, "SetMaterial", [(Pointer(Const(D3DMATERIAL8)), "pMaterial")]),
-       Method(HRESULT, "GetMaterial", [(OutPointer(D3DMATERIAL8), "pMaterial")]),
-       Method(HRESULT, "SetLight", [(DWORD, "Index"), (Pointer(Const(D3DLIGHT8)), "pLight")]),
-       Method(HRESULT, "GetLight", [(DWORD, "Index"), (OutPointer(D3DLIGHT8), "pLight")]),
-       Method(HRESULT, "LightEnable", [(DWORD, "Index"), (BOOL, "Enable")]),
-       Method(HRESULT, "GetLightEnable", [(DWORD, "Index"), (OutPointer(BOOL), "pEnable")]),
-       Method(HRESULT, "SetClipPlane", [(DWORD, "Index"), (Pointer(Const(Float)), "pPlane")]),
-       Method(HRESULT, "GetClipPlane", [(DWORD, "Index"), (OutPointer(Float), "pPlane")]),
-       Method(HRESULT, "SetRenderState", [(D3DRENDERSTATETYPE, "State"), (DWORD, "Value")]),
-       Method(HRESULT, "GetRenderState", [(D3DRENDERSTATETYPE, "State"), (OutPointer(DWORD), "pValue")]),
-       Method(HRESULT, "BeginStateBlock", []),
-       Method(HRESULT, "EndStateBlock", [(OutPointer(DWORD), "pToken")]),
-       Method(HRESULT, "ApplyStateBlock", [(DWORD, "Token")]),
-       Method(HRESULT, "CaptureStateBlock", [(DWORD, "Token")]),
-       Method(HRESULT, "DeleteStateBlock", [(DWORD, "Token")]),
-       Method(HRESULT, "CreateStateBlock", [(D3DSTATEBLOCKTYPE, "Type"), (OutPointer(DWORD), "pToken")]),
-       Method(HRESULT, "SetClipStatus", [(Pointer(Const(D3DCLIPSTATUS8)), "pClipStatus")]),
-       Method(HRESULT, "GetClipStatus", [(OutPointer(D3DCLIPSTATUS8), "pClipStatus")]),
-       Method(HRESULT, "GetTexture", [(DWORD, "Stage"), (OutPointer(PDIRECT3DBASETEXTURE8), "ppTexture")]),
-       Method(HRESULT, "SetTexture", [(DWORD, "Stage"), (PDIRECT3DBASETEXTURE8, "pTexture")]),
-       Method(HRESULT, "GetTextureStageState", [(DWORD, "Stage"), (D3DTEXTURESTAGESTATETYPE, "Type"), (OutPointer(DWORD), "pValue")]),
-       Method(HRESULT, "SetTextureStageState", [(DWORD, "Stage"), (D3DTEXTURESTAGESTATETYPE, "Type"), (DWORD, "Value")]),
-       Method(HRESULT, "ValidateDevice", [(OutPointer(DWORD), "pNumPasses")]),
-       Method(HRESULT, "GetInfo", [(DWORD, "DevInfoID"), (OutPointer(Void), "pDevInfoStruct"), (DWORD, "DevInfoStructSize")]),
-       Method(HRESULT, "SetPaletteEntries", [(UINT, "PaletteNumber"), (Pointer(Const(PALETTEENTRY)), "pEntries")]),
-       Method(HRESULT, "GetPaletteEntries", [(UINT, "PaletteNumber"), (OutPointer(PALETTEENTRY), "pEntries")]),
-       Method(HRESULT, "SetCurrentTexturePalette", [(UINT, "PaletteNumber")]),
-       Method(HRESULT, "GetCurrentTexturePalette", [(OutPointer(UINT), "PaletteNumber")]),
-       Method(HRESULT, "DrawPrimitive", [(D3DPRIMITIVETYPE, "PrimitiveType"), (UINT, "StartVertex"), (UINT, "PrimitiveCount")]),
-       Method(HRESULT, "DrawIndexedPrimitive", [(D3DPRIMITIVETYPE, "PrimitiveType"), (UINT, "minIndex"), (UINT, "NumVertices"), (UINT, "startIndex"), (UINT, "primCount")]),
-       Method(HRESULT, "DrawPrimitiveUP", [(D3DPRIMITIVETYPE, "PrimitiveType"), (UINT, "PrimitiveCount"), (Const(Pointer(Void)), "pVertexStreamZeroData"), (UINT, "VertexStreamZeroStride")]),
-       Method(HRESULT, "DrawIndexedPrimitiveUP", [(D3DPRIMITIVETYPE, "PrimitiveType"), (UINT, "MinVertexIndex"), (UINT, "NumVertexIndices"), (UINT, "PrimitiveCount"), (Const(Pointer(Void)), "pIndexData"), (D3DFORMAT, "IndexDataFormat"), (Const(Pointer(Void)), "pVertexStreamZeroData"), (UINT, "VertexStreamZeroStride")]),
-       Method(HRESULT, "ProcessVertices", [(UINT, "SrcStartIndex"), (UINT, "DestIndex"), (UINT, "VertexCount"), (PDIRECT3DVERTEXBUFFER8, "pDestBuffer"), (DWORD, "Flags")]),
-       Method(HRESULT, "CreateVertexShader", [(Pointer(Const(DWORD)), "pDeclaration"), (Pointer(Const(DWORD)), "pFunction"), (OutPointer(DWORD), "pHandle"), (DWORD, "Usage")]),
-       Method(HRESULT, "SetVertexShader", [(DWORD, "Handle")]),
-       Method(HRESULT, "GetVertexShader", [(OutPointer(DWORD), "pHandle")]),
-       Method(HRESULT, "DeleteVertexShader", [(DWORD, "Handle")]),
-       Method(HRESULT, "SetVertexShaderConstant", [(DWORD, "Register"), (Const(Pointer(Void)), "pConstantData"), (DWORD, "ConstantCount")]),
-       Method(HRESULT, "GetVertexShaderConstant", [(DWORD, "Register"), (OutPointer(Void), "pConstantData"), (DWORD, "ConstantCount")]),
-       Method(HRESULT, "GetVertexShaderDeclaration", [(DWORD, "Handle"), (OutPointer(Void), "pData"), (OutPointer(DWORD), "pSizeOfData")]),
-       Method(HRESULT, "GetVertexShaderFunction", [(DWORD, "Handle"), (OutPointer(Void), "pData"), (OutPointer(DWORD), "pSizeOfData")]),
-       Method(HRESULT, "SetStreamSource", [(UINT, "StreamNumber"), (PDIRECT3DVERTEXBUFFER8, "pStreamData"), (UINT, "Stride")]),
-       Method(HRESULT, "GetStreamSource", [(UINT, "StreamNumber"), (OutPointer(PDIRECT3DVERTEXBUFFER8), "ppStreamData"), (OutPointer(UINT), "pStride")]),
-       Method(HRESULT, "SetIndices", [(PDIRECT3DINDEXBUFFER8, "pIndexData"), (UINT, "BaseVertexIndex")]),
-       Method(HRESULT, "GetIndices", [(OutPointer(PDIRECT3DINDEXBUFFER8), "ppIndexData"), (OutPointer(UINT), "pBaseVertexIndex")]),
-       Method(HRESULT, "CreatePixelShader", [(Pointer(Const(DWORD)), "pFunction"), (OutPointer(DWORD), "pHandle")]),
-       Method(HRESULT, "SetPixelShader", [(DWORD, "Handle")]),
-       Method(HRESULT, "GetPixelShader", [(OutPointer(DWORD), "pHandle")]),
-       Method(HRESULT, "DeletePixelShader", [(DWORD, "Handle")]),
-       Method(HRESULT, "SetPixelShaderConstant", [(DWORD, "Register"), (Const(Pointer(Void)), "pConstantData"), (DWORD, "ConstantCount")]),
-       Method(HRESULT, "GetPixelShaderConstant", [(DWORD, "Register"), (OutPointer(Void), "pConstantData"), (DWORD, "ConstantCount")]),
-       Method(HRESULT, "GetPixelShaderFunction", [(DWORD, "Handle"), (OutPointer(Void), "pData"), (OutPointer(DWORD), "pSizeOfData")]),
-       Method(HRESULT, "DrawRectPatch", [(UINT, "Handle"), (Pointer(Const(Float)), "pNumSegs"), (Pointer(Const(D3DRECTPATCH_INFO)), "pRectPatchInfo")]),
-       Method(HRESULT, "DrawTriPatch", [(UINT, "Handle"), (Pointer(Const(Float)), "pNumSegs"), (Pointer(Const(D3DTRIPATCH_INFO)), "pTriPatchInfo")]),
-       Method(HRESULT, "DeletePatch", [(UINT, "Handle")]),
+    Method(HRESULT, "TestCooperativeLevel", []),
+    Method(UINT, "GetAvailableTextureMem", []),
+    Method(HRESULT, "ResourceManagerDiscardBytes", [(DWORD, "Bytes")]),
+    Method(HRESULT, "GetDirect3D", [(OutPointer(PDIRECT3D8), "ppD3D8")]),
+    Method(HRESULT, "GetDeviceCaps", [(OutPointer(D3DCAPS8), "pCaps")]),
+    Method(HRESULT, "GetDisplayMode", [(OutPointer(D3DDISPLAYMODE), "pMode")]),
+    Method(HRESULT, "GetCreationParameters", [(OutPointer(D3DDEVICE_CREATION_PARAMETERS), "pParameters")]),
+    Method(HRESULT, "SetCursorProperties", [(UINT, "XHotSpot"), (UINT, "YHotSpot"), (PDIRECT3DSURFACE8, "pCursorBitmap")]),
+    Method(Void, "SetCursorPosition", [(Int, "X"), (Int, "Y"), (DWORD, "Flags")]),
+    Method(BOOL, "ShowCursor", [(BOOL, "bShow")]),
+    Method(HRESULT, "CreateAdditionalSwapChain", [(OutPointer(D3DPRESENT_PARAMETERS), "pPresentationParameters"), (OutPointer(PDIRECT3DSWAPCHAIN8), "pSwapChain")]),
+    Method(HRESULT, "Reset", [(OutPointer(D3DPRESENT_PARAMETERS), "pPresentationParameters")]),
+    Method(HRESULT, "Present", [(ConstPointer(RECT), "pSourceRect"), (ConstPointer(RECT), "pDestRect"), (HWND, "hDestWindowOverride"), (ConstPointer(RGNDATA), "pDirtyRegion")]),
+    Method(HRESULT, "GetBackBuffer", [(UINT, "BackBuffer"), (D3DBACKBUFFER_TYPE, "Type"), (OutPointer(PDIRECT3DSURFACE8), "ppBackBuffer")]),
+    Method(HRESULT, "GetRasterStatus", [(OutPointer(D3DRASTER_STATUS), "pRasterStatus")]),
+    Method(Void, "SetGammaRamp", [(DWORD, "Flags"), (ConstPointer(D3DGAMMARAMP), "pRamp")]),
+    Method(Void, "GetGammaRamp", [(OutPointer(D3DGAMMARAMP), "pRamp")]),
+    Method(HRESULT, "CreateTexture", [(UINT, "Width"), (UINT, "Height"), (UINT, "Levels"), (DWORD, "Usage"), (D3DFORMAT, "Format"), (D3DPOOL, "Pool"), (OutPointer(PDIRECT3DTEXTURE8), "ppTexture")]),
+    Method(HRESULT, "CreateVolumeTexture", [(UINT, "Width"), (UINT, "Height"), (UINT, "Depth"), (UINT, "Levels"), (DWORD, "Usage"), (D3DFORMAT, "Format"), (D3DPOOL, "Pool"), (OutPointer(PDIRECT3DVOLUMETEXTURE8), "ppVolumeTexture")]),
+    Method(HRESULT, "CreateCubeTexture", [(UINT, "EdgeLength"), (UINT, "Levels"), (DWORD, "Usage"), (D3DFORMAT, "Format"), (D3DPOOL, "Pool"), (OutPointer(PDIRECT3DCUBETEXTURE8), "ppCubeTexture")]),
+    Method(HRESULT, "CreateVertexBuffer", [(UINT, "Length"), (DWORD, "Usage"), (DWORD, "FVF"), (D3DPOOL, "Pool"), (OutPointer(PDIRECT3DVERTEXBUFFER8), "ppVertexBuffer")]),
+    Method(HRESULT, "CreateIndexBuffer", [(UINT, "Length"), (DWORD, "Usage"), (D3DFORMAT, "Format"), (D3DPOOL, "Pool"), (OutPointer(PDIRECT3DINDEXBUFFER8), "ppIndexBuffer")]),
+    Method(HRESULT, "CreateRenderTarget", [(UINT, "Width"), (UINT, "Height"), (D3DFORMAT, "Format"), (D3DMULTISAMPLE_TYPE, "MultiSample"), (BOOL, "Lockable"), (OutPointer(PDIRECT3DSURFACE8), "ppSurface")]),
+    Method(HRESULT, "CreateDepthStencilSurface", [(UINT, "Width"), (UINT, "Height"), (D3DFORMAT, "Format"), (D3DMULTISAMPLE_TYPE, "MultiSample"), (OutPointer(PDIRECT3DSURFACE8), "ppSurface")]),
+    Method(HRESULT, "CreateImageSurface", [(UINT, "Width"), (UINT, "Height"), (D3DFORMAT, "Format"), (OutPointer(PDIRECT3DSURFACE8), "ppSurface")]),
+    Method(HRESULT, "CopyRects", [(PDIRECT3DSURFACE8, "pSourceSurface"), (ConstPointer(RECT), "pSourceRectsArray"), (UINT, "cRects"), (PDIRECT3DSURFACE8, "pDestinationSurface"), (ConstPointer(POINT), "pDestPointsArray")]),
+    Method(HRESULT, "UpdateTexture", [(PDIRECT3DBASETEXTURE8, "pSourceTexture"), (PDIRECT3DBASETEXTURE8, "pDestinationTexture")]),
+    Method(HRESULT, "GetFrontBuffer", [(PDIRECT3DSURFACE8, "pDestSurface")]),
+    Method(HRESULT, "SetRenderTarget", [(PDIRECT3DSURFACE8, "pRenderTarget"), (PDIRECT3DSURFACE8, "pNewZStencil")]),
+    Method(HRESULT, "GetRenderTarget", [(OutPointer(PDIRECT3DSURFACE8), "ppRenderTarget")]),
+    Method(HRESULT, "GetDepthStencilSurface", [(OutPointer(PDIRECT3DSURFACE8), "ppZStencilSurface")]),
+    Method(HRESULT, "BeginScene", []),
+    Method(HRESULT, "EndScene", []),
+    Method(HRESULT, "Clear", [(DWORD, "Count"), (ConstPointer(D3DRECT), "pRects"), (DWORD, "Flags"), (D3DCOLOR, "Color"), (Float, "Z"), (DWORD, "Stencil")]),
+    Method(HRESULT, "SetTransform", [(D3DTRANSFORMSTATETYPE, "State"), (ConstPointer(D3DMATRIX), "pMatrix")]),
+    Method(HRESULT, "GetTransform", [(D3DTRANSFORMSTATETYPE, "State"), (OutPointer(D3DMATRIX), "pMatrix")]),
+    Method(HRESULT, "MultiplyTransform", [(D3DTRANSFORMSTATETYPE, "State"), (ConstPointer(D3DMATRIX), "pMatrix")]),
+    Method(HRESULT, "SetViewport", [(ConstPointer(D3DVIEWPORT8), "pViewport")]),
+    Method(HRESULT, "GetViewport", [(OutPointer(D3DVIEWPORT8), "pViewport")]),
+    Method(HRESULT, "SetMaterial", [(ConstPointer(D3DMATERIAL8), "pMaterial")]),
+    Method(HRESULT, "GetMaterial", [(OutPointer(D3DMATERIAL8), "pMaterial")]),
+    Method(HRESULT, "SetLight", [(DWORD, "Index"), (ConstPointer(D3DLIGHT8), "pLight")]),
+    Method(HRESULT, "GetLight", [(DWORD, "Index"), (OutPointer(D3DLIGHT8), "pLight")]),
+    Method(HRESULT, "LightEnable", [(DWORD, "Index"), (BOOL, "Enable")]),
+    Method(HRESULT, "GetLightEnable", [(DWORD, "Index"), (OutPointer(BOOL), "pEnable")]),
+    Method(HRESULT, "SetClipPlane", [(DWORD, "Index"), (ConstPointer(Float), "pPlane")]),
+    Method(HRESULT, "GetClipPlane", [(DWORD, "Index"), (OutPointer(Float), "pPlane")]),
+    Method(HRESULT, "SetRenderState", [(D3DRENDERSTATETYPE, "State"), (DWORD, "Value")]),
+    Method(HRESULT, "GetRenderState", [(D3DRENDERSTATETYPE, "State"), (OutPointer(DWORD), "pValue")]),
+    Method(HRESULT, "BeginStateBlock", []),
+    Method(HRESULT, "EndStateBlock", [(OutPointer(DWORD), "pToken")]),
+    Method(HRESULT, "ApplyStateBlock", [(DWORD, "Token")]),
+    Method(HRESULT, "CaptureStateBlock", [(DWORD, "Token")]),
+    Method(HRESULT, "DeleteStateBlock", [(DWORD, "Token")]),
+    Method(HRESULT, "CreateStateBlock", [(D3DSTATEBLOCKTYPE, "Type"), (OutPointer(DWORD), "pToken")]),
+    Method(HRESULT, "SetClipStatus", [(ConstPointer(D3DCLIPSTATUS8), "pClipStatus")]),
+    Method(HRESULT, "GetClipStatus", [(OutPointer(D3DCLIPSTATUS8), "pClipStatus")]),
+    Method(HRESULT, "GetTexture", [(DWORD, "Stage"), (OutPointer(PDIRECT3DBASETEXTURE8), "ppTexture")]),
+    Method(HRESULT, "SetTexture", [(DWORD, "Stage"), (PDIRECT3DBASETEXTURE8, "pTexture")]),
+    Method(HRESULT, "GetTextureStageState", [(DWORD, "Stage"), (D3DTEXTURESTAGESTATETYPE, "Type"), (OutPointer(DWORD), "pValue")]),
+    Method(HRESULT, "SetTextureStageState", [(DWORD, "Stage"), (D3DTEXTURESTAGESTATETYPE, "Type"), (DWORD, "Value")]),
+    Method(HRESULT, "ValidateDevice", [(OutPointer(DWORD), "pNumPasses")]),
+    Method(HRESULT, "GetInfo", [(DWORD, "DevInfoID"), (OutPointer(Void), "pDevInfoStruct"), (DWORD, "DevInfoStructSize")]),
+    Method(HRESULT, "SetPaletteEntries", [(UINT, "PaletteNumber"), (ConstPointer(PALETTEENTRY), "pEntries")]),
+    Method(HRESULT, "GetPaletteEntries", [(UINT, "PaletteNumber"), (OutPointer(PALETTEENTRY), "pEntries")]),
+    Method(HRESULT, "SetCurrentTexturePalette", [(UINT, "PaletteNumber")]),
+    Method(HRESULT, "GetCurrentTexturePalette", [(OutPointer(UINT), "PaletteNumber")]),
+    Method(HRESULT, "DrawPrimitive", [(D3DPRIMITIVETYPE, "PrimitiveType"), (UINT, "StartVertex"), (UINT, "PrimitiveCount")]),
+    Method(HRESULT, "DrawIndexedPrimitive", [(D3DPRIMITIVETYPE, "PrimitiveType"), (UINT, "minIndex"), (UINT, "NumVertices"), (UINT, "startIndex"), (UINT, "primCount")]),
+    Method(HRESULT, "DrawPrimitiveUP", [(D3DPRIMITIVETYPE, "PrimitiveType"), (UINT, "PrimitiveCount"), (ConstPointer(Void), "pVertexStreamZeroData"), (UINT, "VertexStreamZeroStride")]),
+    Method(HRESULT, "DrawIndexedPrimitiveUP", [(D3DPRIMITIVETYPE, "PrimitiveType"), (UINT, "MinVertexIndex"), (UINT, "NumVertexIndices"), (UINT, "PrimitiveCount"), (ConstPointer(Void), "pIndexData"), (D3DFORMAT, "IndexDataFormat"), (ConstPointer(Void), "pVertexStreamZeroData"), (UINT, "VertexStreamZeroStride")]),
+    Method(HRESULT, "ProcessVertices", [(UINT, "SrcStartIndex"), (UINT, "DestIndex"), (UINT, "VertexCount"), (PDIRECT3DVERTEXBUFFER8, "pDestBuffer"), (DWORD, "Flags")]),
+    Method(HRESULT, "CreateVertexShader", [(ConstPointer(DWORD), "pDeclaration"), (ConstPointer(DWORD), "pFunction"), (OutPointer(DWORD), "pHandle"), (DWORD, "Usage")]),
+    Method(HRESULT, "SetVertexShader", [(DWORD, "Handle")]),
+    Method(HRESULT, "GetVertexShader", [(OutPointer(DWORD), "pHandle")]),
+    Method(HRESULT, "DeleteVertexShader", [(DWORD, "Handle")]),
+    Method(HRESULT, "SetVertexShaderConstant", [(DWORD, "Register"), (ConstPointer(Void), "pConstantData"), (DWORD, "ConstantCount")]),
+    Method(HRESULT, "GetVertexShaderConstant", [(DWORD, "Register"), (OutPointer(Void), "pConstantData"), (DWORD, "ConstantCount")]),
+    Method(HRESULT, "GetVertexShaderDeclaration", [(DWORD, "Handle"), (OutPointer(Void), "pData"), (OutPointer(DWORD), "pSizeOfData")]),
+    Method(HRESULT, "GetVertexShaderFunction", [(DWORD, "Handle"), (OutPointer(Void), "pData"), (OutPointer(DWORD), "pSizeOfData")]),
+    Method(HRESULT, "SetStreamSource", [(UINT, "StreamNumber"), (PDIRECT3DVERTEXBUFFER8, "pStreamData"), (UINT, "Stride")]),
+    Method(HRESULT, "GetStreamSource", [(UINT, "StreamNumber"), (OutPointer(PDIRECT3DVERTEXBUFFER8), "ppStreamData"), (OutPointer(UINT), "pStride")]),
+    Method(HRESULT, "SetIndices", [(PDIRECT3DINDEXBUFFER8, "pIndexData"), (UINT, "BaseVertexIndex")]),
+    Method(HRESULT, "GetIndices", [(OutPointer(PDIRECT3DINDEXBUFFER8), "ppIndexData"), (OutPointer(UINT), "pBaseVertexIndex")]),
+    Method(HRESULT, "CreatePixelShader", [(ConstPointer(DWORD), "pFunction"), (OutPointer(DWORD), "pHandle")]),
+    Method(HRESULT, "SetPixelShader", [(DWORD, "Handle")]),
+    Method(HRESULT, "GetPixelShader", [(OutPointer(DWORD), "pHandle")]),
+    Method(HRESULT, "DeletePixelShader", [(DWORD, "Handle")]),
+    Method(HRESULT, "SetPixelShaderConstant", [(DWORD, "Register"), (ConstPointer(Void), "pConstantData"), (DWORD, "ConstantCount")]),
+    Method(HRESULT, "GetPixelShaderConstant", [(DWORD, "Register"), (OutPointer(Void), "pConstantData"), (DWORD, "ConstantCount")]),
+    Method(HRESULT, "GetPixelShaderFunction", [(DWORD, "Handle"), (OutPointer(Void), "pData"), (OutPointer(DWORD), "pSizeOfData")]),
+    Method(HRESULT, "DrawRectPatch", [(UINT, "Handle"), (ConstPointer(Float), "pNumSegs"), (ConstPointer(D3DRECTPATCH_INFO), "pRectPatchInfo")]),
+    Method(HRESULT, "DrawTriPatch", [(UINT, "Handle"), (ConstPointer(Float), "pNumSegs"), (ConstPointer(D3DTRIPATCH_INFO), "pTriPatchInfo")]),
+    Method(HRESULT, "DeletePatch", [(UINT, "Handle")]),
 ]
 
 IDirect3DSwapChain8.methods += [
-       Method(HRESULT, "Present", [(Pointer(Const(RECT)), "pSourceRect"), (Pointer(Const(RECT)), "pDestRect"), (HWND, "hDestWindowOverride"), (Const(Pointer(RGNDATA)), "pDirtyRegion")]),
-       Method(HRESULT, "GetBackBuffer", [(UINT, "BackBuffer"), (D3DBACKBUFFER_TYPE, "Type"), (OutPointer(PDIRECT3DSURFACE8), "ppBackBuffer")]),
+    Method(HRESULT, "Present", [(ConstPointer(RECT), "pSourceRect"), (ConstPointer(RECT), "pDestRect"), (HWND, "hDestWindowOverride"), (ConstPointer(RGNDATA), "pDirtyRegion")]),
+    Method(HRESULT, "GetBackBuffer", [(UINT, "BackBuffer"), (D3DBACKBUFFER_TYPE, "Type"), (OutPointer(PDIRECT3DSURFACE8), "ppBackBuffer")]),
 ]
 
 IDirect3DResource8.methods += [
-       Method(HRESULT, "GetDevice", [(OutPointer(PDIRECT3DDEVICE8), "ppDevice")]),
-       Method(HRESULT, "SetPrivateData", [(REFGUID, "refguid"), (Const(Pointer(Void)), "pData"), (DWORD, "SizeOfData"), (DWORD, "Flags")]),
-       Method(HRESULT, "GetPrivateData", [(REFGUID, "refguid"), (OutPointer(Void), "pData"), (OutPointer(DWORD), "pSizeOfData")]),
-       Method(HRESULT, "FreePrivateData", [(REFGUID, "refguid")]),
-       Method(DWORD, "SetPriority", [(DWORD, "PriorityNew")]),
-       Method(DWORD, "GetPriority", []),
-       Method(Void, "PreLoad", []),
-       Method(D3DRESOURCETYPE, "GetType", []),
+    Method(HRESULT, "GetDevice", [(OutPointer(PDIRECT3DDEVICE8), "ppDevice")]),
+    Method(HRESULT, "SetPrivateData", [(REFGUID, "refguid"), (ConstPointer(Void), "pData"), (DWORD, "SizeOfData"), (DWORD, "Flags")]),
+    Method(HRESULT, "GetPrivateData", [(REFGUID, "refguid"), (OutPointer(Void), "pData"), (OutPointer(DWORD), "pSizeOfData")]),
+    Method(HRESULT, "FreePrivateData", [(REFGUID, "refguid")]),
+    Method(DWORD, "SetPriority", [(DWORD, "PriorityNew")]),
+    Method(DWORD, "GetPriority", []),
+    Method(Void, "PreLoad", []),
+    Method(D3DRESOURCETYPE, "GetType", []),
 ]
 
 IDirect3DBaseTexture8.methods += [
-       Method(DWORD, "SetLOD", [(DWORD, "LODNew")]),
-       Method(DWORD, "GetLOD", []),
-       Method(DWORD, "GetLevelCount", []),
+    Method(DWORD, "SetLOD", [(DWORD, "LODNew")]),
+    Method(DWORD, "GetLOD", []),
+    Method(DWORD, "GetLevelCount", []),
 ]
 
 IDirect3DTexture8.methods += [
-       Method(HRESULT, "GetLevelDesc", [(UINT, "Level"), (OutPointer(D3DSURFACE_DESC), "pDesc")]),
-       Method(HRESULT, "GetSurfaceLevel", [(UINT, "Level"), (OutPointer(PDIRECT3DSURFACE8), "ppSurfaceLevel")]),
-       Method(HRESULT, "LockRect", [(UINT, "Level"), (OutPointer(D3DLOCKED_RECT), "pLockedRect"), (Pointer(Const(RECT)), "pRect"), (DWORD, "Flags")]),
-       Method(HRESULT, "UnlockRect", [(UINT, "Level")]),
-       Method(HRESULT, "AddDirtyRect", [(Pointer(Const(RECT)), "pDirtyRect")]),
+    Method(HRESULT, "GetLevelDesc", [(UINT, "Level"), (OutPointer(D3DSURFACE_DESC), "pDesc")]),
+    Method(HRESULT, "GetSurfaceLevel", [(UINT, "Level"), (OutPointer(PDIRECT3DSURFACE8), "ppSurfaceLevel")]),
+    Method(HRESULT, "LockRect", [(UINT, "Level"), (OutPointer(D3DLOCKED_RECT), "pLockedRect"), (ConstPointer(RECT), "pRect"), (DWORD, "Flags")]),
+    Method(HRESULT, "UnlockRect", [(UINT, "Level")]),
+    Method(HRESULT, "AddDirtyRect", [(ConstPointer(RECT), "pDirtyRect")]),
 ]
 
 IDirect3DVolumeTexture8.methods += [
-       Method(HRESULT, "GetLevelDesc", [(UINT, "Level"), (OutPointer(D3DVOLUME_DESC), "pDesc")]),
-       Method(HRESULT, "GetVolumeLevel", [(UINT, "Level"), (OutPointer(PDIRECT3DVOLUME8), "ppVolumeLevel")]),
-       Method(HRESULT, "LockBox", [(UINT, "Level"), (OutPointer(D3DLOCKED_BOX), "pLockedVolume"), (Pointer(Const(D3DBOX)), "pBox"), (DWORD, "Flags")]),
-       Method(HRESULT, "UnlockBox", [(UINT, "Level")]),
-       Method(HRESULT, "AddDirtyBox", [(Pointer(Const(D3DBOX)), "pDirtyBox")]),
+    Method(HRESULT, "GetLevelDesc", [(UINT, "Level"), (OutPointer(D3DVOLUME_DESC), "pDesc")]),
+    Method(HRESULT, "GetVolumeLevel", [(UINT, "Level"), (OutPointer(PDIRECT3DVOLUME8), "ppVolumeLevel")]),
+    Method(HRESULT, "LockBox", [(UINT, "Level"), (OutPointer(D3DLOCKED_BOX), "pLockedVolume"), (ConstPointer(D3DBOX), "pBox"), (DWORD, "Flags")]),
+    Method(HRESULT, "UnlockBox", [(UINT, "Level")]),
+    Method(HRESULT, "AddDirtyBox", [(ConstPointer(D3DBOX), "pDirtyBox")]),
 ]
 
 IDirect3DCubeTexture8.methods += [
-       Method(HRESULT, "GetLevelDesc", [(UINT, "Level"), (OutPointer(D3DSURFACE_DESC), "pDesc")]),
-       Method(HRESULT, "GetCubeMapSurface", [(D3DCUBEMAP_FACES, "FaceType"), (UINT, "Level"), (OutPointer(PDIRECT3DSURFACE8), "ppCubeMapSurface")]),
-       Method(HRESULT, "LockRect", [(D3DCUBEMAP_FACES, "FaceType"), (UINT, "Level"), (OutPointer(D3DLOCKED_RECT), "pLockedRect"), (Pointer(Const(RECT)), "pRect"), (DWORD, "Flags")]),
-       Method(HRESULT, "UnlockRect", [(D3DCUBEMAP_FACES, "FaceType"), (UINT, "Level")]),
-       Method(HRESULT, "AddDirtyRect", [(D3DCUBEMAP_FACES, "FaceType"), (Pointer(Const(RECT)), "pDirtyRect")]),
+    Method(HRESULT, "GetLevelDesc", [(UINT, "Level"), (OutPointer(D3DSURFACE_DESC), "pDesc")]),
+    Method(HRESULT, "GetCubeMapSurface", [(D3DCUBEMAP_FACES, "FaceType"), (UINT, "Level"), (OutPointer(PDIRECT3DSURFACE8), "ppCubeMapSurface")]),
+    Method(HRESULT, "LockRect", [(D3DCUBEMAP_FACES, "FaceType"), (UINT, "Level"), (OutPointer(D3DLOCKED_RECT), "pLockedRect"), (ConstPointer(RECT), "pRect"), (DWORD, "Flags")]),
+    Method(HRESULT, "UnlockRect", [(D3DCUBEMAP_FACES, "FaceType"), (UINT, "Level")]),
+    Method(HRESULT, "AddDirtyRect", [(D3DCUBEMAP_FACES, "FaceType"), (ConstPointer(RECT), "pDirtyRect")]),
 ]
 
 IDirect3DVertexBuffer8.methods += [
-       Method(HRESULT, "Lock", [(UINT, "OffsetToLock"), (UINT, "SizeToLock"), (OutPointer(Pointer(BYTE)), "ppbData"), (DWORD, "Flags")]),
-       Method(HRESULT, "Unlock", []),
-       Method(HRESULT, "GetDesc", [(OutPointer(D3DVERTEXBUFFER_DESC), "pDesc")]),
+    Method(HRESULT, "Lock", [(UINT, "OffsetToLock"), (UINT, "SizeToLock"), (OutPointer(Pointer(BYTE)), "ppbData"), (DWORD, "Flags")]),
+    Method(HRESULT, "Unlock", []),
+    Method(HRESULT, "GetDesc", [(OutPointer(D3DVERTEXBUFFER_DESC), "pDesc")]),
 ]
 
 IDirect3DIndexBuffer8.methods += [
-       Method(HRESULT, "Lock", [(UINT, "OffsetToLock"), (UINT, "SizeToLock"), (OutPointer(Pointer(BYTE)), "ppbData"), (DWORD, "Flags")]),
-       Method(HRESULT, "Unlock", []),
-       Method(HRESULT, "GetDesc", [(OutPointer(D3DINDEXBUFFER_DESC), "pDesc")]),
+    Method(HRESULT, "Lock", [(UINT, "OffsetToLock"), (UINT, "SizeToLock"), (OutPointer(Pointer(BYTE)), "ppbData"), (DWORD, "Flags")]),
+    Method(HRESULT, "Unlock", []),
+    Method(HRESULT, "GetDesc", [(OutPointer(D3DINDEXBUFFER_DESC), "pDesc")]),
 ]
 
 IDirect3DSurface8.methods += [
-       Method(HRESULT, "GetDevice", [(OutPointer(PDIRECT3DDEVICE8), "ppDevice")]),
-       Method(HRESULT, "SetPrivateData", [(REFGUID, "refguid"), (Const(Pointer(Void)), "pData"), (DWORD, "SizeOfData"), (DWORD, "Flags")]),
-       Method(HRESULT, "GetPrivateData", [(REFGUID, "refguid"), (OutPointer(Void), "pData"), (OutPointer(DWORD), "pSizeOfData")]),
-       Method(HRESULT, "FreePrivateData", [(REFGUID, "refguid")]),
-       Method(HRESULT, "GetContainer", [(REFIID, "riid"), (OutPointer(Pointer(Void)), "ppContainer")]),
-       Method(HRESULT, "GetDesc", [(OutPointer(D3DSURFACE_DESC), "pDesc")]),
-       Method(HRESULT, "LockRect", [(OutPointer(D3DLOCKED_RECT), "pLockedRect"), (Pointer(Const(RECT)), "pRect"), (DWORD, "Flags")]),
-       Method(HRESULT, "UnlockRect", []),
+    Method(HRESULT, "GetDevice", [(OutPointer(PDIRECT3DDEVICE8), "ppDevice")]),
+    Method(HRESULT, "SetPrivateData", [(REFGUID, "refguid"), (ConstPointer(Void), "pData"), (DWORD, "SizeOfData"), (DWORD, "Flags")]),
+    Method(HRESULT, "GetPrivateData", [(REFGUID, "refguid"), (OutPointer(Void), "pData"), (OutPointer(DWORD), "pSizeOfData")]),
+    Method(HRESULT, "FreePrivateData", [(REFGUID, "refguid")]),
+    Method(HRESULT, "GetContainer", [(REFIID, "riid"), (OutPointer(Pointer(Void)), "ppContainer")]),
+    Method(HRESULT, "GetDesc", [(OutPointer(D3DSURFACE_DESC), "pDesc")]),
+    Method(HRESULT, "LockRect", [(OutPointer(D3DLOCKED_RECT), "pLockedRect"), (ConstPointer(RECT), "pRect"), (DWORD, "Flags")]),
+    Method(HRESULT, "UnlockRect", []),
 ]
 
 IDirect3DVolume8.methods += [
-       Method(HRESULT, "GetDevice", [(OutPointer(PDIRECT3DDEVICE8), "ppDevice")]),
-       Method(HRESULT, "SetPrivateData", [(REFGUID, "refguid"), (Const(Pointer(Void)), "pData"), (DWORD, "SizeOfData"), (DWORD, "Flags")]),
-       Method(HRESULT, "GetPrivateData", [(REFGUID, "refguid"), (OutPointer(Void), "pData"), (OutPointer(DWORD), "pSizeOfData")]),
-       Method(HRESULT, "FreePrivateData", [(REFGUID, "refguid")]),
-       Method(HRESULT, "GetContainer", [(REFIID, "riid"), (OutPointer(Pointer(Void)), "ppContainer")]),
-       Method(HRESULT, "GetDesc", [(OutPointer(D3DVOLUME_DESC), "pDesc")]),
-       Method(HRESULT, "LockBox", [(OutPointer(D3DLOCKED_BOX), "pLockedVolume"), (Pointer(Const(D3DBOX)), "pBox"), (DWORD, "Flags")]),
-       Method(HRESULT, "UnlockBox", []),
+    Method(HRESULT, "GetDevice", [(OutPointer(PDIRECT3DDEVICE8), "ppDevice")]),
+    Method(HRESULT, "SetPrivateData", [(REFGUID, "refguid"), (ConstPointer(Void), "pData"), (DWORD, "SizeOfData"), (DWORD, "Flags")]),
+    Method(HRESULT, "GetPrivateData", [(REFGUID, "refguid"), (OutPointer(Void), "pData"), (OutPointer(DWORD), "pSizeOfData")]),
+    Method(HRESULT, "FreePrivateData", [(REFGUID, "refguid")]),
+    Method(HRESULT, "GetContainer", [(REFIID, "riid"), (OutPointer(Pointer(Void)), "ppContainer")]),
+    Method(HRESULT, "GetDesc", [(OutPointer(D3DVOLUME_DESC), "pDesc")]),
+    Method(HRESULT, "LockBox", [(OutPointer(D3DLOCKED_BOX), "pLockedVolume"), (ConstPointer(D3DBOX), "pBox"), (DWORD, "Flags")]),
+    Method(HRESULT, "UnlockBox", []),
 ]
 
 d3d8 = Dll("d3d8")
diff --git a/d3d9.py b/d3d9.py
index b03164c95bc1a62603224403f6a46384f1f16f23..91c8c4d0e71dd729bdf9aa0d683245e02004205b 100644 (file)
--- a/d3d9.py
+++ b/d3d9.py
@@ -23,6 +23,39 @@ from windows import *
 from d3d9types import *
 from d3d9caps import *
 
+HRESULT = Enum("HRESULT", [
+    "D3D_OK",
+    "D3DERR_WRONGTEXTUREFORMAT",
+    "D3DERR_UNSUPPORTEDCOLOROPERATION",
+    "D3DERR_UNSUPPORTEDCOLORARG",
+    "D3DERR_UNSUPPORTEDALPHAOPERATION",
+    "D3DERR_UNSUPPORTEDALPHAARG",
+    "D3DERR_TOOMANYOPERATIONS",
+    "D3DERR_CONFLICTINGTEXTUREFILTER",
+    "D3DERR_UNSUPPORTEDFACTORVALUE",
+    "D3DERR_CONFLICTINGRENDERSTATE",
+    "D3DERR_UNSUPPORTEDTEXTUREFILTER",
+    "D3DERR_CONFLICTINGTEXTUREPALETTE",
+    "D3DERR_DRIVERINTERNALERROR",
+    "D3DERR_NOTFOUND",
+    "D3DERR_MOREDATA",
+    "D3DERR_DEVICELOST",
+    "D3DERR_DEVICENOTRESET",
+    "D3DERR_NOTAVAILABLE",
+    "D3DERR_OUTOFVIDEOMEMORY",
+    "D3DERR_INVALIDDEVICE",
+    "D3DERR_INVALIDCALL",
+    "D3DERR_DRIVERINVALIDCALL",
+    "D3DERR_WASSTILLDRAWING",
+    "D3DOK_NOAUTOGEN",
+    "D3DERR_DEVICEREMOVED",
+    "S_NOT_RESIDENT",
+    "S_RESIDENT_IN_SHARED_MEMORY",
+    "S_PRESENT_MODE_CHANGED",
+    "S_PRESENT_OCCLUDED",
+    "D3DERR_DEVICEHUNG",
+])
+
 IDirect3D9 = Interface("IDirect3D9", IUnknown)
 IDirect3DDevice9 = Interface("IDirect3DDevice9", IUnknown)
 IDirect3DStateBlock9 = Interface("IDirect3DStateBlock9", IUnknown)