From: José Fonseca Date: Tue, 8 Jul 2008 23:12:34 +0000 (+0900) Subject: Specify d3d9 output parameters. X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=b974caae5453d6759f19dd8a791c06eff158ca79;p=apitrace Specify d3d9 output parameters. --- diff --git a/base.py b/base.py index 6092056..5abed45 100644 --- a/base.py +++ b/base.py @@ -97,6 +97,10 @@ class Pointer(Type): self.type.wrap_instance("*" + instance) +def ConstPointer(type): + return Pointer(Const(type)) + + class OutPointer(Pointer): def isoutput(self): diff --git a/d3d9.py b/d3d9.py index 7489c18..b03164c 100644 --- a/d3d9.py +++ b/d3d9.py @@ -68,159 +68,159 @@ PDIRECT3DSWAPCHAIN9EX = WrapPointer(IDirect3DSwapChain9Ex) IDirect3D9.methods += [ Method(HRESULT, "RegisterSoftwareDevice", [(Pointer(Void), "pInitializeFunction")]), Method(UINT, "GetAdapterCount", []), - Method(HRESULT, "GetAdapterIdentifier", [(UINT, "Adapter"), (DWORD, "Flags"), (Pointer(D3DADAPTER_IDENTIFIER9), "pIdentifier")]), + Method(HRESULT, "GetAdapterIdentifier", [(UINT, "Adapter"), (DWORD, "Flags"), (OutPointer(D3DADAPTER_IDENTIFIER9), "pIdentifier")]), Method(UINT, "GetAdapterModeCount", [(UINT, "Adapter"), (D3DFORMAT, "Format")]), - Method(HRESULT, "EnumAdapterModes", [(UINT, "Adapter"), (D3DFORMAT, "Format"), (UINT, "Mode"), (Pointer(D3DDISPLAYMODE), "pMode")]), - Method(HRESULT, "GetAdapterDisplayMode", [(UINT, "Adapter"), (Pointer(D3DDISPLAYMODE), "pMode")]), + Method(HRESULT, "EnumAdapterModes", [(UINT, "Adapter"), (D3DFORMAT, "Format"), (UINT, "Mode"), (OutPointer(D3DDISPLAYMODE), "pMode")]), + Method(HRESULT, "GetAdapterDisplayMode", [(UINT, "Adapter"), (OutPointer(D3DDISPLAYMODE), "pMode")]), Method(HRESULT, "CheckDeviceType", [(UINT, "Adapter"), (D3DDEVTYPE, "DevType"), (D3DFORMAT, "AdapterFormat"), (D3DFORMAT, "BackBufferFormat"), (BOOL, "bWindowed")]), 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"), (Pointer(DWORD), "pQualityLevels")]), + Method(HRESULT, "CheckDeviceMultiSampleType", [(UINT, "Adapter"), (D3DDEVTYPE, "DeviceType"), (D3DFORMAT, "SurfaceFormat"), (BOOL, "Windowed"), (D3DMULTISAMPLE_TYPE, "MultiSampleType"), (OutPointer(DWORD), "pQualityLevels")]), Method(HRESULT, "CheckDepthStencilMatch", [(UINT, "Adapter"), (D3DDEVTYPE, "DeviceType"), (D3DFORMAT, "AdapterFormat"), (D3DFORMAT, "RenderTargetFormat"), (D3DFORMAT, "DepthStencilFormat")]), Method(HRESULT, "CheckDeviceFormatConversion", [(UINT, "Adapter"), (D3DDEVTYPE, "DeviceType"), (D3DFORMAT, "SourceFormat"), (D3DFORMAT, "TargetFormat")]), - Method(HRESULT, "GetDeviceCaps", [(UINT, "Adapter"), (D3DDEVTYPE, "DeviceType"), (Pointer(D3DCAPS9), "pCaps")]), + Method(HRESULT, "GetDeviceCaps", [(UINT, "Adapter"), (D3DDEVTYPE, "DeviceType"), (OutPointer(D3DCAPS9), "pCaps")]), Method(HMONITOR, "GetAdapterMonitor", [(UINT, "Adapter")]), - Method(HRESULT, "CreateDevice", [(UINT, "Adapter"), (D3DDEVTYPE, "DeviceType"), (HWND, "hFocusWindow"), (DWORD, "BehaviorFlags"), (Pointer(D3DPRESENT_PARAMETERS), "pPresentationParameters"), (Pointer(Pointer(IDirect3DDevice9)), "ppReturnedDeviceInterface")]), + Method(HRESULT, "CreateDevice", [(UINT, "Adapter"), (D3DDEVTYPE, "DeviceType"), (HWND, "hFocusWindow"), (DWORD, "BehaviorFlags"), (OutPointer(D3DPRESENT_PARAMETERS), "pPresentationParameters"), (OutPointer(PDIRECT3DDEVICE9), "ppReturnedDeviceInterface")]), ] IDirect3DDevice9.methods += [ Method(HRESULT, "TestCooperativeLevel", []), Method(UINT, "GetAvailableTextureMem", []), Method(HRESULT, "EvictManagedResources", []), - Method(HRESULT, "GetDirect3D", [(Pointer(Pointer(IDirect3D9)), "ppD3D9")]), - Method(HRESULT, "GetDeviceCaps", [(Pointer(D3DCAPS9), "pCaps")]), - Method(HRESULT, "GetDisplayMode", [(UINT, "iSwapChain"), (Pointer(D3DDISPLAYMODE), "pMode")]), - Method(HRESULT, "GetCreationParameters", [(Pointer(D3DDEVICE_CREATION_PARAMETERS), "pParameters")]), - Method(HRESULT, "SetCursorProperties", [(UINT, "XHotSpot"), (UINT, "YHotSpot"), (Pointer(IDirect3DSurface9), "pCursorBitmap")]), + Method(HRESULT, "GetDirect3D", [(OutPointer(PDIRECT3D9), "ppD3D9")]), + Method(HRESULT, "GetDeviceCaps", [(OutPointer(D3DCAPS9), "pCaps")]), + Method(HRESULT, "GetDisplayMode", [(UINT, "iSwapChain"), (OutPointer(D3DDISPLAYMODE), "pMode")]), + Method(HRESULT, "GetCreationParameters", [(OutPointer(D3DDEVICE_CREATION_PARAMETERS), "pParameters")]), + Method(HRESULT, "SetCursorProperties", [(UINT, "XHotSpot"), (UINT, "YHotSpot"), (PDIRECT3DSURFACE9, "pCursorBitmap")]), Method(Void, "SetCursorPosition", [(Int, "X"), (Int, "Y"), (DWORD, "Flags")]), Method(BOOL, "ShowCursor", [(BOOL, "bShow")]), - Method(HRESULT, "CreateAdditionalSwapChain", [(Pointer(D3DPRESENT_PARAMETERS), "pPresentationParameters"), (Pointer(Pointer(IDirect3DSwapChain9)), "pSwapChain")]), - Method(HRESULT, "GetSwapChain", [(UINT, "iSwapChain"), (Pointer(Pointer(IDirect3DSwapChain9)), "pSwapChain")]), + Method(HRESULT, "CreateAdditionalSwapChain", [(OutPointer(D3DPRESENT_PARAMETERS), "pPresentationParameters"), (OutPointer(PDIRECT3DSWAPCHAIN9), "pSwapChain")]), + Method(HRESULT, "GetSwapChain", [(UINT, "iSwapChain"), (OutPointer(PDIRECT3DSWAPCHAIN9), "pSwapChain")]), Method(UINT, "GetNumberOfSwapChains", []), - Method(HRESULT, "Reset", [(Pointer(D3DPRESENT_PARAMETERS), "pPresentationParameters")]), - Method(HRESULT, "Present", [(Pointer(Const(RECT)), "pSourceRect"), (Pointer(Const(RECT)), "pDestRect"), (HWND, "hDestWindowOverride"), (Pointer(Const(RGNDATA)), "pDirtyRegion")]), - Method(HRESULT, "GetBackBuffer", [(UINT, "iSwapChain"), (UINT, "iBackBuffer"), (D3DBACKBUFFER_TYPE, "Type"), (Pointer(Pointer(IDirect3DSurface9)), "ppBackBuffer")]), - Method(HRESULT, "GetRasterStatus", [(UINT, "iSwapChain"), (Pointer(D3DRASTER_STATUS), "pRasterStatus")]), + 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, "iSwapChain"), (UINT, "iBackBuffer"), (D3DBACKBUFFER_TYPE, "Type"), (OutPointer(PDIRECT3DSURFACE9), "ppBackBuffer")]), + Method(HRESULT, "GetRasterStatus", [(UINT, "iSwapChain"), (OutPointer(D3DRASTER_STATUS), "pRasterStatus")]), Method(HRESULT, "SetDialogBoxMode", [(BOOL, "bEnableDialogs")]), - Method(Void, "SetGammaRamp", [(UINT, "iSwapChain"), (DWORD, "Flags"), (Pointer(Const(D3DGAMMARAMP)), "pRamp")]), - Method(Void, "GetGammaRamp", [(UINT, "iSwapChain"), (Pointer(D3DGAMMARAMP), "pRamp")]), - Method(HRESULT, "CreateTexture", [(UINT, "Width"), (UINT, "Height"), (UINT, "Levels"), (DWORD, "Usage"), (D3DFORMAT, "Format"), (D3DPOOL, "Pool"), (Pointer(Pointer(IDirect3DTexture9)), "ppTexture"), (Pointer(HANDLE), "pSharedHandle")]), - Method(HRESULT, "CreateVolumeTexture", [(UINT, "Width"), (UINT, "Height"), (UINT, "Depth"), (UINT, "Levels"), (DWORD, "Usage"), (D3DFORMAT, "Format"), (D3DPOOL, "Pool"), (Pointer(Pointer(IDirect3DVolumeTexture9)), "ppVolumeTexture"), (Pointer(HANDLE), "pSharedHandle")]), - Method(HRESULT, "CreateCubeTexture", [(UINT, "EdgeLength"), (UINT, "Levels"), (DWORD, "Usage"), (D3DFORMAT, "Format"), (D3DPOOL, "Pool"), (Pointer(Pointer(IDirect3DCubeTexture9)), "ppCubeTexture"), (Pointer(HANDLE), "pSharedHandle")]), - Method(HRESULT, "CreateVertexBuffer", [(UINT, "Length"), (DWORD, "Usage"), (DWORD, "FVF"), (D3DPOOL, "Pool"), (Pointer(Pointer(IDirect3DVertexBuffer9)), "ppVertexBuffer"), (Pointer(HANDLE), "pSharedHandle")]), - Method(HRESULT, "CreateIndexBuffer", [(UINT, "Length"), (DWORD, "Usage"), (D3DFORMAT, "Format"), (D3DPOOL, "Pool"), (Pointer(Pointer(IDirect3DIndexBuffer9)), "ppIndexBuffer"), (Pointer(HANDLE), "pSharedHandle")]), - Method(HRESULT, "CreateRenderTarget", [(UINT, "Width"), (UINT, "Height"), (D3DFORMAT, "Format"), (D3DMULTISAMPLE_TYPE, "MultiSample"), (DWORD, "MultisampleQuality"), (BOOL, "Lockable"), (Pointer(Pointer(IDirect3DSurface9)), "ppSurface"), (Pointer(HANDLE), "pSharedHandle")]), - Method(HRESULT, "CreateDepthStencilSurface", [(UINT, "Width"), (UINT, "Height"), (D3DFORMAT, "Format"), (D3DMULTISAMPLE_TYPE, "MultiSample"), (DWORD, "MultisampleQuality"), (BOOL, "Discard"), (Pointer(Pointer(IDirect3DSurface9)), "ppSurface"), (Pointer(HANDLE), "pSharedHandle")]), - Method(HRESULT, "UpdateSurface", [(Pointer(IDirect3DSurface9), "pSourceSurface"), (Pointer(Const(RECT)), "pSourceRect"), (Pointer(IDirect3DSurface9), "pDestinationSurface"), (Pointer(Const(POINT)), "pDestPoint")]), - Method(HRESULT, "UpdateTexture", [(Pointer(IDirect3DBaseTexture9), "pSourceTexture"), (Pointer(IDirect3DBaseTexture9), "pDestinationTexture")]), - Method(HRESULT, "GetRenderTargetData", [(Pointer(IDirect3DSurface9), "pRenderTarget"), (Pointer(IDirect3DSurface9), "pDestSurface")]), - Method(HRESULT, "GetFrontBufferData", [(UINT, "iSwapChain"), (Pointer(IDirect3DSurface9), "pDestSurface")]), - Method(HRESULT, "StretchRect", [(Pointer(IDirect3DSurface9), "pSourceSurface"), (Pointer(Const(RECT)), "pSourceRect"), (Pointer(IDirect3DSurface9), "pDestSurface"), (Pointer(Const(RECT)), "pDestRect"), (D3DTEXTUREFILTERTYPE, "Filter")]), - Method(HRESULT, "ColorFill", [(Pointer(IDirect3DSurface9), "pSurface"), (Pointer(Const(RECT)), "pRect"), (D3DCOLOR, "color")]), - Method(HRESULT, "CreateOffscreenPlainSurface", [(UINT, "Width"), (UINT, "Height"), (D3DFORMAT, "Format"), (D3DPOOL, "Pool"), (Pointer(Pointer(IDirect3DSurface9)), "ppSurface"), (Pointer(HANDLE), "pSharedHandle")]), - Method(HRESULT, "SetRenderTarget", [(DWORD, "RenderTargetIndex"), (Pointer(IDirect3DSurface9), "pRenderTarget")]), - Method(HRESULT, "GetRenderTarget", [(DWORD, "RenderTargetIndex"), (Pointer(Pointer(IDirect3DSurface9)), "ppRenderTarget")]), - Method(HRESULT, "SetDepthStencilSurface", [(Pointer(IDirect3DSurface9), "pNewZStencil")]), - Method(HRESULT, "GetDepthStencilSurface", [(Pointer(Pointer(IDirect3DSurface9)), "ppZStencilSurface")]), + Method(Void, "SetGammaRamp", [(UINT, "iSwapChain"), (DWORD, "Flags"), (ConstPointer(D3DGAMMARAMP), "pRamp")]), + Method(Void, "GetGammaRamp", [(UINT, "iSwapChain"), (OutPointer(D3DGAMMARAMP), "pRamp")]), + Method(HRESULT, "CreateTexture", [(UINT, "Width"), (UINT, "Height"), (UINT, "Levels"), (DWORD, "Usage"), (D3DFORMAT, "Format"), (D3DPOOL, "Pool"), (OutPointer(PDIRECT3DTEXTURE9), "ppTexture"), (OutPointer(HANDLE), "pSharedHandle")]), + Method(HRESULT, "CreateVolumeTexture", [(UINT, "Width"), (UINT, "Height"), (UINT, "Depth"), (UINT, "Levels"), (DWORD, "Usage"), (D3DFORMAT, "Format"), (D3DPOOL, "Pool"), (OutPointer(PDIRECT3DVOLUMETEXTURE9), "ppVolumeTexture"), (OutPointer(HANDLE), "pSharedHandle")]), + Method(HRESULT, "CreateCubeTexture", [(UINT, "EdgeLength"), (UINT, "Levels"), (DWORD, "Usage"), (D3DFORMAT, "Format"), (D3DPOOL, "Pool"), (OutPointer(PDIRECT3DCUBETEXTURE9), "ppCubeTexture"), (OutPointer(HANDLE), "pSharedHandle")]), + Method(HRESULT, "CreateVertexBuffer", [(UINT, "Length"), (DWORD, "Usage"), (DWORD, "FVF"), (D3DPOOL, "Pool"), (OutPointer(PDIRECT3DVERTEXBUFFER9), "ppVertexBuffer"), (OutPointer(HANDLE), "pSharedHandle")]), + Method(HRESULT, "CreateIndexBuffer", [(UINT, "Length"), (DWORD, "Usage"), (D3DFORMAT, "Format"), (D3DPOOL, "Pool"), (OutPointer(PDIRECT3DINDEXBUFFER9), "ppIndexBuffer"), (OutPointer(HANDLE), "pSharedHandle")]), + Method(HRESULT, "CreateRenderTarget", [(UINT, "Width"), (UINT, "Height"), (D3DFORMAT, "Format"), (D3DMULTISAMPLE_TYPE, "MultiSample"), (DWORD, "MultisampleQuality"), (BOOL, "Lockable"), (OutPointer(PDIRECT3DSURFACE9), "ppSurface"), (OutPointer(HANDLE), "pSharedHandle")]), + Method(HRESULT, "CreateDepthStencilSurface", [(UINT, "Width"), (UINT, "Height"), (D3DFORMAT, "Format"), (D3DMULTISAMPLE_TYPE, "MultiSample"), (DWORD, "MultisampleQuality"), (BOOL, "Discard"), (OutPointer(PDIRECT3DSURFACE9), "ppSurface"), (OutPointer(HANDLE), "pSharedHandle")]), + Method(HRESULT, "UpdateSurface", [(PDIRECT3DSURFACE9, "pSourceSurface"), (ConstPointer(RECT), "pSourceRect"), (PDIRECT3DSURFACE9, "pDestinationSurface"), (ConstPointer(POINT), "pDestPoint")]), + Method(HRESULT, "UpdateTexture", [(PDIRECT3DBASETEXTURE9, "pSourceTexture"), (PDIRECT3DBASETEXTURE9, "pDestinationTexture")]), + Method(HRESULT, "GetRenderTargetData", [(PDIRECT3DSURFACE9, "pRenderTarget"), (PDIRECT3DSURFACE9, "pDestSurface")]), + Method(HRESULT, "GetFrontBufferData", [(UINT, "iSwapChain"), (PDIRECT3DSURFACE9, "pDestSurface")]), + Method(HRESULT, "StretchRect", [(PDIRECT3DSURFACE9, "pSourceSurface"), (ConstPointer(RECT), "pSourceRect"), (PDIRECT3DSURFACE9, "pDestSurface"), (ConstPointer(RECT), "pDestRect"), (D3DTEXTUREFILTERTYPE, "Filter")]), + Method(HRESULT, "ColorFill", [(PDIRECT3DSURFACE9, "pSurface"), (ConstPointer(RECT), "pRect"), (D3DCOLOR, "color")]), + Method(HRESULT, "CreateOffscreenPlainSurface", [(UINT, "Width"), (UINT, "Height"), (D3DFORMAT, "Format"), (D3DPOOL, "Pool"), (OutPointer(PDIRECT3DSURFACE9), "ppSurface"), (OutPointer(HANDLE), "pSharedHandle")]), + Method(HRESULT, "SetRenderTarget", [(DWORD, "RenderTargetIndex"), (PDIRECT3DSURFACE9, "pRenderTarget")]), + Method(HRESULT, "GetRenderTarget", [(DWORD, "RenderTargetIndex"), (OutPointer(PDIRECT3DSURFACE9), "ppRenderTarget")]), + Method(HRESULT, "SetDepthStencilSurface", [(PDIRECT3DSURFACE9, "pNewZStencil")]), + Method(HRESULT, "GetDepthStencilSurface", [(OutPointer(PDIRECT3DSURFACE9), "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"), (Pointer(D3DMATRIX), "pMatrix")]), - Method(HRESULT, "MultiplyTransform", [(D3DTRANSFORMSTATETYPE, "State"), (Pointer(Const(D3DMATRIX)), "pMatrix")]), - Method(HRESULT, "SetViewport", [(Pointer(Const(D3DVIEWPORT9)), "pViewport")]), - Method(HRESULT, "GetViewport", [(Pointer(D3DVIEWPORT9), "pViewport")]), - Method(HRESULT, "SetMaterial", [(Pointer(Const(D3DMATERIAL9)), "pMaterial")]), - Method(HRESULT, "GetMaterial", [(Pointer(D3DMATERIAL9), "pMaterial")]), - Method(HRESULT, "SetLight", [(DWORD, "Index"), (Pointer(Const(D3DLIGHT9)), "pLight")]), - Method(HRESULT, "GetLight", [(DWORD, "Index"), (Pointer(D3DLIGHT9), "pLight")]), + 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(D3DVIEWPORT9), "pViewport")]), + Method(HRESULT, "GetViewport", [(OutPointer(D3DVIEWPORT9), "pViewport")]), + Method(HRESULT, "SetMaterial", [(ConstPointer(D3DMATERIAL9), "pMaterial")]), + Method(HRESULT, "GetMaterial", [(OutPointer(D3DMATERIAL9), "pMaterial")]), + Method(HRESULT, "SetLight", [(DWORD, "Index"), (ConstPointer(D3DLIGHT9), "pLight")]), + Method(HRESULT, "GetLight", [(DWORD, "Index"), (OutPointer(D3DLIGHT9), "pLight")]), Method(HRESULT, "LightEnable", [(DWORD, "Index"), (BOOL, "Enable")]), - Method(HRESULT, "GetLightEnable", [(DWORD, "Index"), (Pointer(BOOL), "pEnable")]), - Method(HRESULT, "SetClipPlane", [(DWORD, "Index"), (Pointer(Const(Float)), "pPlane")]), - Method(HRESULT, "GetClipPlane", [(DWORD, "Index"), (Pointer(Float), "pPlane")]), + 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"), (Pointer(DWORD), "pValue")]), - Method(HRESULT, "CreateStateBlock", [(D3DSTATEBLOCKTYPE, "Type"), (Pointer(Pointer(IDirect3DStateBlock9)), "ppSB")]), + Method(HRESULT, "GetRenderState", [(D3DRENDERSTATETYPE, "State"), (OutPointer(DWORD), "pValue")]), + Method(HRESULT, "CreateStateBlock", [(D3DSTATEBLOCKTYPE, "Type"), (OutPointer(PDIRECT3DSTATEBLOCK9), "ppSB")]), Method(HRESULT, "BeginStateBlock", []), - Method(HRESULT, "EndStateBlock", [(Pointer(Pointer(IDirect3DStateBlock9)), "ppSB")]), - Method(HRESULT, "SetClipStatus", [(Pointer(Const(D3DCLIPSTATUS9)), "pClipStatus")]), - Method(HRESULT, "GetClipStatus", [(Pointer(D3DCLIPSTATUS9), "pClipStatus")]), - Method(HRESULT, "GetTexture", [(DWORD, "Stage"), (Pointer(Pointer(IDirect3DBaseTexture9)), "ppTexture")]), - Method(HRESULT, "SetTexture", [(DWORD, "Stage"), (Pointer(IDirect3DBaseTexture9), "pTexture")]), - Method(HRESULT, "GetTextureStageState", [(DWORD, "Stage"), (D3DTEXTURESTAGESTATETYPE, "Type"), (Pointer(DWORD), "pValue")]), + Method(HRESULT, "EndStateBlock", [(OutPointer(PDIRECT3DSTATEBLOCK9), "ppSB")]), + Method(HRESULT, "SetClipStatus", [(ConstPointer(D3DCLIPSTATUS9), "pClipStatus")]), + Method(HRESULT, "GetClipStatus", [(OutPointer(D3DCLIPSTATUS9), "pClipStatus")]), + Method(HRESULT, "GetTexture", [(DWORD, "Stage"), (OutPointer(PDIRECT3DBASETEXTURE9), "ppTexture")]), + Method(HRESULT, "SetTexture", [(DWORD, "Stage"), (PDIRECT3DBASETEXTURE9, "pTexture")]), + Method(HRESULT, "GetTextureStageState", [(DWORD, "Stage"), (D3DTEXTURESTAGESTATETYPE, "Type"), (OutPointer(DWORD), "pValue")]), Method(HRESULT, "SetTextureStageState", [(DWORD, "Stage"), (D3DTEXTURESTAGESTATETYPE, "Type"), (DWORD, "Value")]), - Method(HRESULT, "GetSamplerState", [(DWORD, "Sampler"), (D3DSAMPLERSTATETYPE, "Type"), (Pointer(DWORD), "pValue")]), + Method(HRESULT, "GetSamplerState", [(DWORD, "Sampler"), (D3DSAMPLERSTATETYPE, "Type"), (OutPointer(DWORD), "pValue")]), Method(HRESULT, "SetSamplerState", [(DWORD, "Sampler"), (D3DSAMPLERSTATETYPE, "Type"), (DWORD, "Value")]), - Method(HRESULT, "ValidateDevice", [(Pointer(DWORD), "pNumPasses")]), - Method(HRESULT, "SetPaletteEntries", [(UINT, "PaletteNumber"), (Pointer(Const(PALETTEENTRY)), "pEntries")]), - Method(HRESULT, "GetPaletteEntries", [(UINT, "PaletteNumber"), (Pointer(PALETTEENTRY), "pEntries")]), + Method(HRESULT, "ValidateDevice", [(OutPointer(DWORD), "pNumPasses")]), + Method(HRESULT, "SetPaletteEntries", [(UINT, "PaletteNumber"), (ConstPointer(PALETTEENTRY), "pEntries")]), + Method(HRESULT, "GetPaletteEntries", [(UINT, "PaletteNumber"), (OutPointer(PALETTEENTRY), "pEntries")]), Method(HRESULT, "SetCurrentTexturePalette", [(UINT, "PaletteNumber")]), - Method(HRESULT, "GetCurrentTexturePalette", [(Pointer(UINT), "PaletteNumber")]), - Method(HRESULT, "SetScissorRect", [(Pointer(Const(RECT)), "pRect")]), - Method(HRESULT, "GetScissorRect", [(Pointer(RECT), "pRect")]), + Method(HRESULT, "GetCurrentTexturePalette", [(OutPointer(UINT), "PaletteNumber")]), + Method(HRESULT, "SetScissorRect", [(ConstPointer(RECT), "pRect")]), + Method(HRESULT, "GetScissorRect", [(OutPointer(RECT), "pRect")]), Method(HRESULT, "SetSoftwareVertexProcessing", [(BOOL, "bSoftware")]), Method(BOOL, "GetSoftwareVertexProcessing", []), Method(HRESULT, "SetNPatchMode", [(Float, "nSegments")]), Method(Float, "GetNPatchMode", []), Method(HRESULT, "DrawPrimitive", [(D3DPRIMITIVETYPE, "PrimitiveType"), (UINT, "StartVertex"), (UINT, "PrimitiveCount")]), Method(HRESULT, "DrawIndexedPrimitive", [(D3DPRIMITIVETYPE, "PrimitiveType"), (INT, "BaseVertexIndex"), (UINT, "MinVertexIndex"), (UINT, "NumVertices"), (UINT, "startIndex"), (UINT, "primCount")]), - Method(HRESULT, "DrawPrimitiveUP", [(D3DPRIMITIVETYPE, "PrimitiveType"), (UINT, "PrimitiveCount"), (Pointer(Const(Void)), "pVertexStreamZeroData"), (UINT, "VertexStreamZeroStride")]), - Method(HRESULT, "DrawIndexedPrimitiveUP", [(D3DPRIMITIVETYPE, "PrimitiveType"), (UINT, "MinVertexIndex"), (UINT, "NumVertices"), (UINT, "PrimitiveCount"), (Pointer(Const(Void)), "pIndexData"), (D3DFORMAT, "IndexDataFormat"), (Pointer(Const(Void)), "pVertexStreamZeroData"), (UINT, "VertexStreamZeroStride")]), - Method(HRESULT, "ProcessVertices", [(UINT, "SrcStartIndex"), (UINT, "DestIndex"), (UINT, "VertexCount"), (Pointer(IDirect3DVertexBuffer9), "pDestBuffer"), (Pointer(IDirect3DVertexDeclaration9), "pVertexDecl"), (DWORD, "Flags")]), - Method(HRESULT, "CreateVertexDeclaration", [(Pointer(Const(D3DVERTEXELEMENT9)), "pVertexElements"), (Pointer(Pointer(IDirect3DVertexDeclaration9)), "ppDecl")]), - Method(HRESULT, "SetVertexDeclaration", [(Pointer(IDirect3DVertexDeclaration9), "pDecl")]), - Method(HRESULT, "GetVertexDeclaration", [(Pointer(Pointer(IDirect3DVertexDeclaration9)), "ppDecl")]), + Method(HRESULT, "DrawPrimitiveUP", [(D3DPRIMITIVETYPE, "PrimitiveType"), (UINT, "PrimitiveCount"), (ConstPointer(Void), "pVertexStreamZeroData"), (UINT, "VertexStreamZeroStride")]), + Method(HRESULT, "DrawIndexedPrimitiveUP", [(D3DPRIMITIVETYPE, "PrimitiveType"), (UINT, "MinVertexIndex"), (UINT, "NumVertices"), (UINT, "PrimitiveCount"), (ConstPointer(Void), "pIndexData"), (D3DFORMAT, "IndexDataFormat"), (ConstPointer(Void), "pVertexStreamZeroData"), (UINT, "VertexStreamZeroStride")]), + Method(HRESULT, "ProcessVertices", [(UINT, "SrcStartIndex"), (UINT, "DestIndex"), (UINT, "VertexCount"), (PDIRECT3DVERTEXBUFFER9, "pDestBuffer"), (PDIRECT3DVERTEXDECLARATION9, "pVertexDecl"), (DWORD, "Flags")]), + Method(HRESULT, "CreateVertexDeclaration", [(ConstPointer(D3DVERTEXELEMENT9), "pVertexElements"), (OutPointer(PDIRECT3DVERTEXDECLARATION9), "ppDecl")]), + Method(HRESULT, "SetVertexDeclaration", [(PDIRECT3DVERTEXDECLARATION9, "pDecl")]), + Method(HRESULT, "GetVertexDeclaration", [(OutPointer(PDIRECT3DVERTEXDECLARATION9), "ppDecl")]), Method(HRESULT, "SetFVF", [(DWORD, "FVF")]), - Method(HRESULT, "GetFVF", [(Pointer(DWORD), "pFVF")]), - Method(HRESULT, "CreateVertexShader", [(Pointer(Const(DWORD)), "pFunction"), (Pointer(Pointer(IDirect3DVertexShader9)), "ppShader")]), - Method(HRESULT, "SetVertexShader", [(Pointer(IDirect3DVertexShader9), "pShader")]), - Method(HRESULT, "GetVertexShader", [(Pointer(Pointer(IDirect3DVertexShader9)), "ppShader")]), - Method(HRESULT, "SetVertexShaderConstantF", [(UINT, "StartRegister"), (Pointer(Const(Float)), "pConstantData"), (UINT, "Vector4fCount")]), - Method(HRESULT, "GetVertexShaderConstantF", [(UINT, "StartRegister"), (Pointer(Float), "pConstantData"), (UINT, "Vector4fCount")]), - Method(HRESULT, "SetVertexShaderConstantI", [(UINT, "StartRegister"), (Pointer(Const(Int)), "pConstantData"), (UINT, "Vector4iCount")]), - Method(HRESULT, "GetVertexShaderConstantI", [(UINT, "StartRegister"), (Pointer(Int), "pConstantData"), (UINT, "Vector4iCount")]), - Method(HRESULT, "SetVertexShaderConstantB", [(UINT, "StartRegister"), (Pointer(Const(BOOL)), "pConstantData"), (UINT, "BoolCount")]), - Method(HRESULT, "GetVertexShaderConstantB", [(UINT, "StartRegister"), (Pointer(BOOL), "pConstantData"), (UINT, "BoolCount")]), - Method(HRESULT, "SetStreamSource", [(UINT, "StreamNumber"), (Pointer(IDirect3DVertexBuffer9), "pStreamData"), (UINT, "OffsetInBytes"), (UINT, "Stride")]), - Method(HRESULT, "GetStreamSource", [(UINT, "StreamNumber"), (Pointer(Pointer(IDirect3DVertexBuffer9)), "ppStreamData"), (Pointer(UINT), "pOffsetInBytes"), (Pointer(UINT), "pStride")]), + Method(HRESULT, "GetFVF", [(OutPointer(DWORD), "pFVF")]), + Method(HRESULT, "CreateVertexShader", [(ConstPointer(DWORD), "pFunction"), (OutPointer(PDIRECT3DVERTEXSHADER9), "ppShader")]), + Method(HRESULT, "SetVertexShader", [(PDIRECT3DVERTEXSHADER9, "pShader")]), + Method(HRESULT, "GetVertexShader", [(OutPointer(PDIRECT3DVERTEXSHADER9), "ppShader")]), + Method(HRESULT, "SetVertexShaderConstantF", [(UINT, "StartRegister"), (ConstPointer(Float), "pConstantData"), (UINT, "Vector4fCount")]), + Method(HRESULT, "GetVertexShaderConstantF", [(UINT, "StartRegister"), (OutPointer(Float), "pConstantData"), (UINT, "Vector4fCount")]), + Method(HRESULT, "SetVertexShaderConstantI", [(UINT, "StartRegister"), (ConstPointer(Int), "pConstantData"), (UINT, "Vector4iCount")]), + Method(HRESULT, "GetVertexShaderConstantI", [(UINT, "StartRegister"), (OutPointer(Int), "pConstantData"), (UINT, "Vector4iCount")]), + Method(HRESULT, "SetVertexShaderConstantB", [(UINT, "StartRegister"), (ConstPointer(BOOL), "pConstantData"), (UINT, "BoolCount")]), + Method(HRESULT, "GetVertexShaderConstantB", [(UINT, "StartRegister"), (OutPointer(BOOL), "pConstantData"), (UINT, "BoolCount")]), + Method(HRESULT, "SetStreamSource", [(UINT, "StreamNumber"), (PDIRECT3DVERTEXBUFFER9, "pStreamData"), (UINT, "OffsetInBytes"), (UINT, "Stride")]), + Method(HRESULT, "GetStreamSource", [(UINT, "StreamNumber"), (OutPointer(PDIRECT3DVERTEXBUFFER9), "ppStreamData"), (OutPointer(UINT), "pOffsetInBytes"), (OutPointer(UINT), "pStride")]), Method(HRESULT, "SetStreamSourceFreq", [(UINT, "StreamNumber"), (UINT, "Setting")]), - Method(HRESULT, "GetStreamSourceFreq", [(UINT, "StreamNumber"), (Pointer(UINT), "pSetting")]), - Method(HRESULT, "SetIndices", [(Pointer(IDirect3DIndexBuffer9), "pIndexData")]), - Method(HRESULT, "GetIndices", [(Pointer(Pointer(IDirect3DIndexBuffer9)), "ppIndexData")]), - Method(HRESULT, "CreatePixelShader", [(Pointer(Const(DWORD)), "pFunction"), (Pointer(Pointer(IDirect3DPixelShader9)), "ppShader")]), - Method(HRESULT, "SetPixelShader", [(Pointer(IDirect3DPixelShader9), "pShader")]), - Method(HRESULT, "GetPixelShader", [(Pointer(Pointer(IDirect3DPixelShader9)), "ppShader")]), - Method(HRESULT, "SetPixelShaderConstantF", [(UINT, "StartRegister"), (Pointer(Const(Float)), "pConstantData"), (UINT, "Vector4fCount")]), - Method(HRESULT, "GetPixelShaderConstantF", [(UINT, "StartRegister"), (Pointer(Float), "pConstantData"), (UINT, "Vector4fCount")]), - Method(HRESULT, "SetPixelShaderConstantI", [(UINT, "StartRegister"), (Pointer(Const(Int)), "pConstantData"), (UINT, "Vector4iCount")]), - Method(HRESULT, "GetPixelShaderConstantI", [(UINT, "StartRegister"), (Pointer(Int), "pConstantData"), (UINT, "Vector4iCount")]), - Method(HRESULT, "SetPixelShaderConstantB", [(UINT, "StartRegister"), (Pointer(Const(BOOL)), "pConstantData"), (UINT, "BoolCount")]), - Method(HRESULT, "GetPixelShaderConstantB", [(UINT, "StartRegister"), (Pointer(BOOL), "pConstantData"), (UINT, "BoolCount")]), - 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, "GetStreamSourceFreq", [(UINT, "StreamNumber"), (OutPointer(UINT), "pSetting")]), + Method(HRESULT, "SetIndices", [(PDIRECT3DINDEXBUFFER9, "pIndexData")]), + Method(HRESULT, "GetIndices", [(OutPointer(PDIRECT3DINDEXBUFFER9), "ppIndexData")]), + Method(HRESULT, "CreatePixelShader", [(ConstPointer(DWORD), "pFunction"), (OutPointer(PDIRECT3DPIXELSHADER9), "ppShader")]), + Method(HRESULT, "SetPixelShader", [(PDIRECT3DPIXELSHADER9, "pShader")]), + Method(HRESULT, "GetPixelShader", [(OutPointer(PDIRECT3DPIXELSHADER9), "ppShader")]), + Method(HRESULT, "SetPixelShaderConstantF", [(UINT, "StartRegister"), (ConstPointer(Float), "pConstantData"), (UINT, "Vector4fCount")]), + Method(HRESULT, "GetPixelShaderConstantF", [(UINT, "StartRegister"), (OutPointer(Float), "pConstantData"), (UINT, "Vector4fCount")]), + Method(HRESULT, "SetPixelShaderConstantI", [(UINT, "StartRegister"), (ConstPointer(Int), "pConstantData"), (UINT, "Vector4iCount")]), + Method(HRESULT, "GetPixelShaderConstantI", [(UINT, "StartRegister"), (OutPointer(Int), "pConstantData"), (UINT, "Vector4iCount")]), + Method(HRESULT, "SetPixelShaderConstantB", [(UINT, "StartRegister"), (ConstPointer(BOOL), "pConstantData"), (UINT, "BoolCount")]), + Method(HRESULT, "GetPixelShaderConstantB", [(UINT, "StartRegister"), (OutPointer(BOOL), "pConstantData"), (UINT, "BoolCount")]), + 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")]), - Method(HRESULT, "CreateQuery", [(D3DQUERYTYPE, "Type"), (Pointer(Pointer(IDirect3DQuery9)), "ppQuery")]), + Method(HRESULT, "CreateQuery", [(D3DQUERYTYPE, "Type"), (OutPointer(PDIRECT3DQUERY9), "ppQuery")]), ] IDirect3DStateBlock9.methods += [ - Method(HRESULT, "GetDevice", [(Pointer(Pointer(IDirect3DDevice9)), "ppDevice")]), + Method(HRESULT, "GetDevice", [(OutPointer(PDIRECT3DDEVICE9), "ppDevice")]), Method(HRESULT, "Capture", []), Method(HRESULT, "Apply", []), ] IDirect3DSwapChain9.methods += [ - Method(HRESULT, "Present", [(Pointer(Const(RECT)), "pSourceRect"), (Pointer(Const(RECT)), "pDestRect"), (HWND, "hDestWindowOverride"), (Pointer(Const(RGNDATA)), "pDirtyRegion"), (DWORD, "dwFlags")]), - Method(HRESULT, "GetFrontBufferData", [(Pointer(IDirect3DSurface9), "pDestSurface")]), - Method(HRESULT, "GetBackBuffer", [(UINT, "iBackBuffer"), (D3DBACKBUFFER_TYPE, "Type"), (Pointer(Pointer(IDirect3DSurface9)), "ppBackBuffer")]), - Method(HRESULT, "GetRasterStatus", [(Pointer(D3DRASTER_STATUS), "pRasterStatus")]), - Method(HRESULT, "GetDisplayMode", [(Pointer(D3DDISPLAYMODE), "pMode")]), - Method(HRESULT, "GetDevice", [(Pointer(Pointer(IDirect3DDevice9)), "ppDevice")]), - Method(HRESULT, "GetPresentParameters", [(Pointer(D3DPRESENT_PARAMETERS), "pPresentationParameters")]), + Method(HRESULT, "Present", [(ConstPointer(RECT), "pSourceRect"), (ConstPointer(RECT), "pDestRect"), (HWND, "hDestWindowOverride"), (ConstPointer(RGNDATA), "pDirtyRegion"), (DWORD, "dwFlags")]), + Method(HRESULT, "GetFrontBufferData", [(PDIRECT3DSURFACE9, "pDestSurface")]), + Method(HRESULT, "GetBackBuffer", [(UINT, "iBackBuffer"), (D3DBACKBUFFER_TYPE, "Type"), (OutPointer(PDIRECT3DSURFACE9), "ppBackBuffer")]), + Method(HRESULT, "GetRasterStatus", [(OutPointer(D3DRASTER_STATUS), "pRasterStatus")]), + Method(HRESULT, "GetDisplayMode", [(OutPointer(D3DDISPLAYMODE), "pMode")]), + Method(HRESULT, "GetDevice", [(OutPointer(PDIRECT3DDEVICE9), "ppDevice")]), + Method(HRESULT, "GetPresentParameters", [(OutPointer(D3DPRESENT_PARAMETERS), "pPresentationParameters")]), ] IDirect3DResource9.methods += [ - Method(HRESULT, "GetDevice", [(Pointer(Pointer(IDirect3DDevice9)), "ppDevice")]), - Method(HRESULT, "SetPrivateData", [(REFGUID, "refguid"), (Pointer(Const(Void)), "pData"), (DWORD, "SizeOfData"), (DWORD, "Flags")]), - Method(HRESULT, "GetPrivateData", [(REFGUID, "refguid"), (Pointer(Void), "pData"), (Pointer(DWORD), "pSizeOfData")]), + Method(HRESULT, "GetDevice", [(OutPointer(PDIRECT3DDEVICE9), "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", []), @@ -229,18 +229,18 @@ IDirect3DResource9.methods += [ ] IDirect3DVertexDeclaration9.methods += [ - Method(HRESULT, "GetDevice", [(Pointer(Pointer(IDirect3DDevice9)), "ppDevice")]), - Method(HRESULT, "GetDeclaration", [(Pointer(D3DVERTEXELEMENT9), "pElement"), (Pointer(UINT), "pNumElements")]), + Method(HRESULT, "GetDevice", [(OutPointer(PDIRECT3DDEVICE9), "ppDevice")]), + Method(HRESULT, "GetDeclaration", [(OutPointer(D3DVERTEXELEMENT9), "pElement"), (OutPointer(UINT), "pNumElements")]), ] IDirect3DVertexShader9.methods += [ - Method(HRESULT, "GetDevice", [(Pointer(Pointer(IDirect3DDevice9)), "ppDevice")]), - Method(HRESULT, "GetFunction", [(Pointer(Void), "pData"), (Pointer(UINT), "pSizeOfData")]), + Method(HRESULT, "GetDevice", [(OutPointer(PDIRECT3DDEVICE9), "ppDevice")]), + Method(HRESULT, "GetFunction", [(OutPointer(Void), "pData"), (OutPointer(UINT), "pSizeOfData")]), ] IDirect3DPixelShader9.methods += [ - Method(HRESULT, "GetDevice", [(Pointer(Pointer(IDirect3DDevice9)), "ppDevice")]), - Method(HRESULT, "GetFunction", [(Pointer(Void), "pData"), (Pointer(UINT), "pSizeOfData")]), + Method(HRESULT, "GetDevice", [(OutPointer(PDIRECT3DDEVICE9), "ppDevice")]), + Method(HRESULT, "GetFunction", [(OutPointer(Void), "pData"), (OutPointer(UINT), "pSizeOfData")]), ] IDirect3DBaseTexture9.methods += [ @@ -253,105 +253,105 @@ IDirect3DBaseTexture9.methods += [ ] IDirect3DTexture9.methods += [ - Method(HRESULT, "GetLevelDesc", [(UINT, "Level"), (Pointer(D3DSURFACE_DESC), "pDesc")]), - Method(HRESULT, "GetSurfaceLevel", [(UINT, "Level"), (Pointer(Pointer(IDirect3DSurface9)), "ppSurfaceLevel")]), - Method(HRESULT, "LockRect", [(UINT, "Level"), (Pointer(D3DLOCKED_RECT), "pLockedRect"), (Pointer(Const(RECT)), "pRect"), (DWORD, "Flags")]), + Method(HRESULT, "GetLevelDesc", [(UINT, "Level"), (OutPointer(D3DSURFACE_DESC), "pDesc")]), + Method(HRESULT, "GetSurfaceLevel", [(UINT, "Level"), (OutPointer(PDIRECT3DSURFACE9), "ppSurfaceLevel")]), + Method(HRESULT, "LockRect", [(UINT, "Level"), (OutPointer(D3DLOCKED_RECT), "pLockedRect"), (ConstPointer(RECT), "pRect"), (DWORD, "Flags")]), Method(HRESULT, "UnlockRect", [(UINT, "Level")]), - Method(HRESULT, "AddDirtyRect", [(Pointer(Const(RECT)), "pDirtyRect")]), + Method(HRESULT, "AddDirtyRect", [(ConstPointer(RECT), "pDirtyRect")]), ] IDirect3DVolumeTexture9.methods += [ - Method(HRESULT, "GetLevelDesc", [(UINT, "Level"), (Pointer(D3DVOLUME_DESC), "pDesc")]), - Method(HRESULT, "GetVolumeLevel", [(UINT, "Level"), (Pointer(Pointer(IDirect3DVolume9)), "ppVolumeLevel")]), - Method(HRESULT, "LockBox", [(UINT, "Level"), (Pointer(D3DLOCKED_BOX), "pLockedVolume"), (Pointer(Const(D3DBOX)), "pBox"), (DWORD, "Flags")]), + Method(HRESULT, "GetLevelDesc", [(UINT, "Level"), (OutPointer(D3DVOLUME_DESC), "pDesc")]), + Method(HRESULT, "GetVolumeLevel", [(UINT, "Level"), (OutPointer(PDIRECT3DVOLUME9), "ppVolumeLevel")]), + Method(HRESULT, "LockBox", [(UINT, "Level"), (OutPointer(D3DLOCKED_BOX), "pLockedVolume"), (ConstPointer(D3DBOX), "pBox"), (DWORD, "Flags")]), Method(HRESULT, "UnlockBox", [(UINT, "Level")]), - Method(HRESULT, "AddDirtyBox", [(Pointer(Const(D3DBOX)), "pDirtyBox")]), + Method(HRESULT, "AddDirtyBox", [(ConstPointer(D3DBOX), "pDirtyBox")]), ] IDirect3DCubeTexture9.methods += [ - Method(HRESULT, "GetLevelDesc", [(UINT, "Level"), (Pointer(D3DSURFACE_DESC), "pDesc")]), - Method(HRESULT, "GetCubeMapSurface", [(D3DCUBEMAP_FACES, "FaceType"), (UINT, "Level"), (Pointer(Pointer(IDirect3DSurface9)), "ppCubeMapSurface")]), - Method(HRESULT, "LockRect", [(D3DCUBEMAP_FACES, "FaceType"), (UINT, "Level"), (Pointer(D3DLOCKED_RECT), "pLockedRect"), (Pointer(Const(RECT)), "pRect"), (DWORD, "Flags")]), + Method(HRESULT, "GetLevelDesc", [(UINT, "Level"), (OutPointer(D3DSURFACE_DESC), "pDesc")]), + Method(HRESULT, "GetCubeMapSurface", [(D3DCUBEMAP_FACES, "FaceType"), (UINT, "Level"), (OutPointer(PDIRECT3DSURFACE9), "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"), (Pointer(Const(RECT)), "pDirtyRect")]), + Method(HRESULT, "AddDirtyRect", [(D3DCUBEMAP_FACES, "FaceType"), (ConstPointer(RECT), "pDirtyRect")]), ] IDirect3DVertexBuffer9.methods += [ - Method(HRESULT, "Lock", [(UINT, "OffsetToLock"), (UINT, "SizeToLock"), (Pointer(Pointer(Void)), "ppbData"), (DWORD, "Flags")]), + Method(HRESULT, "Lock", [(UINT, "OffsetToLock"), (UINT, "SizeToLock"), (OutPointer(Pointer(Void)), "ppbData"), (DWORD, "Flags")]), Method(HRESULT, "Unlock", []), - Method(HRESULT, "GetDesc", [(Pointer(D3DVERTEXBUFFER_DESC), "pDesc")]), + Method(HRESULT, "GetDesc", [(OutPointer(D3DVERTEXBUFFER_DESC), "pDesc")]), ] IDirect3DIndexBuffer9.methods += [ - Method(HRESULT, "Lock", [(UINT, "OffsetToLock"), (UINT, "SizeToLock"), (Pointer(Pointer(Void)), "ppbData"), (DWORD, "Flags")]), + Method(HRESULT, "Lock", [(UINT, "OffsetToLock"), (UINT, "SizeToLock"), (OutPointer(Pointer(Void)), "ppbData"), (DWORD, "Flags")]), Method(HRESULT, "Unlock", []), - Method(HRESULT, "GetDesc", [(Pointer(D3DINDEXBUFFER_DESC), "pDesc")]), + Method(HRESULT, "GetDesc", [(OutPointer(D3DINDEXBUFFER_DESC), "pDesc")]), ] IDirect3DSurface9.methods += [ - Method(HRESULT, "GetContainer", [(REFIID, "riid"), (Pointer(Pointer(Void)), "ppContainer")]), - Method(HRESULT, "GetDesc", [(Pointer(D3DSURFACE_DESC), "pDesc")]), - Method(HRESULT, "LockRect", [(Pointer(D3DLOCKED_RECT), "pLockedRect"), (Pointer(Const(RECT)), "pRect"), (DWORD, "Flags")]), + 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", []), - Method(HRESULT, "GetDC", [(Pointer(HDC), "phdc")]), + Method(HRESULT, "GetDC", [(OutPointer(HDC), "phdc")]), Method(HRESULT, "ReleaseDC", [(HDC, "hdc")]), ] IDirect3DVolume9.methods += [ - Method(HRESULT, "GetDevice", [(Pointer(Pointer(IDirect3DDevice9)), "ppDevice")]), - Method(HRESULT, "SetPrivateData", [(REFGUID, "refguid"), (Pointer(Const(Void)), "pData"), (DWORD, "SizeOfData"), (DWORD, "Flags")]), - Method(HRESULT, "GetPrivateData", [(REFGUID, "refguid"), (Pointer(Void), "pData"), (Pointer(DWORD), "pSizeOfData")]), + Method(HRESULT, "GetDevice", [(OutPointer(PDIRECT3DDEVICE9), "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"), (Pointer(Pointer(Void)), "ppContainer")]), - Method(HRESULT, "GetDesc", [(Pointer(D3DVOLUME_DESC), "pDesc")]), - Method(HRESULT, "LockBox", [(Pointer(D3DLOCKED_BOX), "pLockedVolume"), (Pointer(Const(D3DBOX)), "pBox"), (DWORD, "Flags")]), + 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", []), ] IDirect3DQuery9.methods += [ - Method(HRESULT, "GetDevice", [(Pointer(Pointer(IDirect3DDevice9)), "ppDevice")]), + Method(HRESULT, "GetDevice", [(OutPointer(PDIRECT3DDEVICE9), "ppDevice")]), Method(D3DQUERYTYPE, "GetType", []), Method(DWORD, "GetDataSize", []), Method(HRESULT, "Issue", [(DWORD, "dwIssueFlags")]), - Method(HRESULT, "GetData", [(Pointer(Void), "pData"), (DWORD, "dwSize"), (DWORD, "dwGetDataFlags")]), + Method(HRESULT, "GetData", [(OutPointer(Void), "pData"), (DWORD, "dwSize"), (DWORD, "dwGetDataFlags")]), ] IDirect3D9Ex.methods += [ - Method(UINT, "GetAdapterModeCountEx", [(UINT, "Adapter"), (Pointer(Const(D3DDISPLAYMODEFILTER)), "pFilter") ]), - Method(HRESULT, "EnumAdapterModesEx", [(UINT, "Adapter"), (Pointer(Const(D3DDISPLAYMODEFILTER)), "pFilter"), (UINT, "Mode"), (Pointer(D3DDISPLAYMODEEX), "pMode")]), - Method(HRESULT, "GetAdapterDisplayModeEx", [(UINT, "Adapter"), (Pointer(D3DDISPLAYMODEEX), "pMode"), (Pointer(D3DDISPLAYROTATION), "pRotation")]), - Method(HRESULT, "CreateDeviceEx", [(UINT, "Adapter"), (D3DDEVTYPE, "DeviceType"), (HWND, "hFocusWindow"), (DWORD, "BehaviorFlags"), (Pointer(D3DPRESENT_PARAMETERS), "pPresentationParameters"), (Pointer(D3DDISPLAYMODEEX), "pFullscreenDisplayMode"), (Pointer(Pointer(IDirect3DDevice9Ex)), "ppReturnedDeviceInterface")]), - Method(HRESULT, "GetAdapterLUID", [(UINT, "Adapter"), (Pointer(LUID), "pLUID")]), + Method(UINT, "GetAdapterModeCountEx", [(UINT, "Adapter"), (ConstPointer(D3DDISPLAYMODEFILTER), "pFilter") ]), + Method(HRESULT, "EnumAdapterModesEx", [(UINT, "Adapter"), (ConstPointer(D3DDISPLAYMODEFILTER), "pFilter"), (UINT, "Mode"), (OutPointer(D3DDISPLAYMODEEX), "pMode")]), + Method(HRESULT, "GetAdapterDisplayModeEx", [(UINT, "Adapter"), (OutPointer(D3DDISPLAYMODEEX), "pMode"), (OutPointer(D3DDISPLAYROTATION), "pRotation")]), + Method(HRESULT, "CreateDeviceEx", [(UINT, "Adapter"), (D3DDEVTYPE, "DeviceType"), (HWND, "hFocusWindow"), (DWORD, "BehaviorFlags"), (OutPointer(D3DPRESENT_PARAMETERS), "pPresentationParameters"), (OutPointer(D3DDISPLAYMODEEX), "pFullscreenDisplayMode"), (OutPointer(PDIRECT3DDEVICE9EX), "ppReturnedDeviceInterface")]), + Method(HRESULT, "GetAdapterLUID", [(UINT, "Adapter"), (OutPointer(LUID), "pLUID")]), ] IDirect3DDevice9Ex.methods += [ - Method(HRESULT, "SetConvolutionMonoKernel", [(UINT, "width"), (UINT, "height"), (Pointer(Float), "rows"), (Pointer(Float), "columns")]), - Method(HRESULT, "ComposeRects", [(Pointer(IDirect3DSurface9), "pSrc"), (Pointer(IDirect3DSurface9), "pDst"), (Pointer(IDirect3DVertexBuffer9), "pSrcRectDescs"), (UINT, "NumRects"), (Pointer(IDirect3DVertexBuffer9), "pDstRectDescs"), (D3DCOMPOSERECTSOP, "Operation"), (Int, "Xoffset"), (Int, "Yoffset")]), - Method(HRESULT, "PresentEx", [(Pointer(Const(RECT)), "pSourceRect"), (Pointer(Const(RECT)), "pDestRect"), (HWND, "hDestWindowOverride"), (Pointer(Const(RGNDATA)), "pDirtyRegion"), (DWORD, "dwFlags")]), - Method(HRESULT, "GetGPUThreadPriority", [(Pointer(INT), "pPriority")]), + Method(HRESULT, "SetConvolutionMonoKernel", [(UINT, "width"), (UINT, "height"), (OutPointer(Float), "rows"), (OutPointer(Float), "columns")]), + Method(HRESULT, "ComposeRects", [(PDIRECT3DSURFACE9, "pSrc"), (PDIRECT3DSURFACE9, "pDst"), (PDIRECT3DVERTEXBUFFER9, "pSrcRectDescs"), (UINT, "NumRects"), (PDIRECT3DVERTEXBUFFER9, "pDstRectDescs"), (D3DCOMPOSERECTSOP, "Operation"), (Int, "Xoffset"), (Int, "Yoffset")]), + Method(HRESULT, "PresentEx", [(ConstPointer(RECT), "pSourceRect"), (ConstPointer(RECT), "pDestRect"), (HWND, "hDestWindowOverride"), (ConstPointer(RGNDATA), "pDirtyRegion"), (DWORD, "dwFlags")]), + Method(HRESULT, "GetGPUThreadPriority", [(OutPointer(INT), "pPriority")]), Method(HRESULT, "SetGPUThreadPriority", [(INT, "Priority")]), Method(HRESULT, "WaitForVBlank", [(UINT, "iSwapChain")]), - Method(HRESULT, "CheckResourceResidency", [(Pointer(Pointer(IDirect3DResource9)), "pResourceArray"), (UINT32, "NumResources")]), + Method(HRESULT, "CheckResourceResidency", [(OutPointer(PDIRECT3DRESOURCE9), "pResourceArray"), (UINT32, "NumResources")]), Method(HRESULT, "SetMaximumFrameLatency", [(UINT, "MaxLatency")]), - Method(HRESULT, "GetMaximumFrameLatency", [(Pointer(UINT), "pMaxLatency")]), + Method(HRESULT, "GetMaximumFrameLatency", [(OutPointer(UINT), "pMaxLatency")]), Method(HRESULT, "CheckDeviceState", [(HWND, "hDestinationWindow")]), - Method(HRESULT, "CreateRenderTargetEx", [(UINT, "Width"), (UINT, "Height"), (D3DFORMAT, "Format"), (D3DMULTISAMPLE_TYPE, "MultiSample"), (DWORD, "MultisampleQuality"), (BOOL, "Lockable"), (Pointer(Pointer(IDirect3DSurface9)), "ppSurface"), (Pointer(HANDLE), "pSharedHandle"), (DWORD, "Usage")]), - Method(HRESULT, "CreateOffscreenPlainSurfaceEx", [(UINT, "Width"), (UINT, "Height"), (D3DFORMAT, "Format"), (D3DPOOL, "Pool"), (Pointer(Pointer(IDirect3DSurface9)), "ppSurface"), (Pointer(HANDLE), "pSharedHandle"), (DWORD, "Usage")]), - Method(HRESULT, "CreateDepthStencilSurfaceEx", [(UINT, "Width"), (UINT, "Height"), (D3DFORMAT, "Format"), (D3DMULTISAMPLE_TYPE, "MultiSample"), (DWORD, "MultisampleQuality"), (BOOL, "Discard"), (Pointer(Pointer(IDirect3DSurface9)), "ppSurface"), (Pointer(HANDLE), "pSharedHandle"), (DWORD, "Usage")]), - Method(HRESULT, "ResetEx", [(Pointer(D3DPRESENT_PARAMETERS), "pPresentationParameters"), (Pointer(D3DDISPLAYMODEEX), "pFullscreenDisplayMode")]), - Method(HRESULT, "GetDisplayModeEx", [(UINT, "iSwapChain"), (Pointer(D3DDISPLAYMODEEX), "pMode"), (Pointer(D3DDISPLAYROTATION), "pRotation")]), + Method(HRESULT, "CreateRenderTargetEx", [(UINT, "Width"), (UINT, "Height"), (D3DFORMAT, "Format"), (D3DMULTISAMPLE_TYPE, "MultiSample"), (DWORD, "MultisampleQuality"), (BOOL, "Lockable"), (OutPointer(PDIRECT3DSURFACE9), "ppSurface"), (OutPointer(HANDLE), "pSharedHandle"), (DWORD, "Usage")]), + Method(HRESULT, "CreateOffscreenPlainSurfaceEx", [(UINT, "Width"), (UINT, "Height"), (D3DFORMAT, "Format"), (D3DPOOL, "Pool"), (OutPointer(PDIRECT3DSURFACE9), "ppSurface"), (OutPointer(HANDLE), "pSharedHandle"), (DWORD, "Usage")]), + Method(HRESULT, "CreateDepthStencilSurfaceEx", [(UINT, "Width"), (UINT, "Height"), (D3DFORMAT, "Format"), (D3DMULTISAMPLE_TYPE, "MultiSample"), (DWORD, "MultisampleQuality"), (BOOL, "Discard"), (OutPointer(PDIRECT3DSURFACE9), "ppSurface"), (OutPointer(HANDLE), "pSharedHandle"), (DWORD, "Usage")]), + Method(HRESULT, "ResetEx", [(OutPointer(D3DPRESENT_PARAMETERS), "pPresentationParameters"), (OutPointer(D3DDISPLAYMODEEX), "pFullscreenDisplayMode")]), + Method(HRESULT, "GetDisplayModeEx", [(UINT, "iSwapChain"), (OutPointer(D3DDISPLAYMODEEX), "pMode"), (OutPointer(D3DDISPLAYROTATION), "pRotation")]), ] IDirect3DSwapChain9Ex.methods += [ - Method(HRESULT, "GetLastPresentCount", [(Pointer(UINT), "pLastPresentCount")]), - Method(HRESULT, "GetPresentStats", [(Pointer(D3DPRESENTSTATS), "pPresentationStatistics")]), - Method(HRESULT, "GetDisplayModeEx", [(Pointer(D3DDISPLAYMODEEX), "pMode"), (Pointer(D3DDISPLAYROTATION), "pRotation")]), + Method(HRESULT, "GetLastPresentCount", [(OutPointer(UINT), "pLastPresentCount")]), + Method(HRESULT, "GetPresentStats", [(OutPointer(D3DPRESENTSTATS), "pPresentationStatistics")]), + Method(HRESULT, "GetDisplayModeEx", [(OutPointer(D3DDISPLAYMODEEX), "pMode"), (OutPointer(D3DDISPLAYROTATION), "pRotation")]), ] d3d9 = Dll("d3d9") d3d9.functions += [ Function(PDIRECT3D9, "Direct3DCreate9", [(UINT, "SDKVersion")]), - Function(HRESULT, "Direct3DCreate9Ex", [(UINT, "SDKVersion"), (Pointer(Pointer(IDirect3D9Ex)), "ppD3D")]), + Function(HRESULT, "Direct3DCreate9Ex", [(UINT, "SDKVersion"), (OutPointer(PDIRECT3D9EX), "ppD3D")]), ] if __name__ == '__main__':