IDirect3DSurface9 Interface

 

 

' ****************************************************************************************
' IDirect3DSurface9 interface
' $IID_IDirect3DSurface9 = GUID$("{0CFBAF3A-9FF6-429a-99B3-A2796AF8B89B}")
' ****************************************************************************************

' ****************************************************************************************
' Applications use the methods of the IDirect3DSurface9 interface to query and prepare surfaces
' Interface Information
'    Stock Implementation   d3d9.dll
'    Custom Implementation  No
'    Inherits from  IDirect3DSurface9
'    Header     d3d9.h
'    Import library     d3d9.lib
'    Minimum operating systems  Windows 98
' ****************************************************************************************

' ****************************************************************************************
'DECLARE_INTERFACE_(IDirect3DSurface9, IDirect3DSurface9)
'{
'    /*** IUnknown methods ***/
'  0.  STDMETHOD(QueryInterface)(THIS_ REFIID riid, void** ppvObj) PURE;
'  1.  STDMETHOD_(ULONG,AddRef)(THIS) PURE;
'  2.  STDMETHOD_(ULONG,Release)(THIS) PURE;

'    /*** IDirect3DResource9 methods ***/
'  3.  STDMETHOD(GetDevice)(THIS_ IDirect3DDevice9** ppDevice) PURE;
'  4.  STDMETHOD(SetPrivateData)(THIS_ REFGUID refguid,CONST void* pData,DWORD SizeOfData,DWORD Flags) PURE;
'  5.  STDMETHOD(GetPrivateData)(THIS_ REFGUID refguid,void* pData,DWORD* pSizeOfData) PURE;
'  6.  STDMETHOD(FreePrivateData)(THIS_ REFGUID refguid) PURE;
'  7.  STDMETHOD_(DWORD, SetPriority)(THIS_ DWORD PriorityNew) PURE;
'  8.  STDMETHOD_(DWORD, GetPriority)(THIS) PURE;
'  9.  STDMETHOD_(void, PreLoad)(THIS) PURE;
' 10.  STDMETHOD_(D3DRESOURCETYPE, GetType)(THIS) PURE;

'    /*** IDirect3DSurface9 methods ***/

' 11.  STDMETHOD(GetContainer)(THIS_ REFIID riid,void** ppContainer) PURE;
' 12.  STDMETHOD(GetDesc)(THIS_ D3DSURFACE_DESC *pDesc) PURE;
' 13.  STDMETHOD(LockRect)(THIS_ D3DLOCKED_RECT* pLockedRect,CONST RECT* pRect,DWORD Flags) PURE;
' 14.  STDMETHOD(UnlockRect)(THIS) PURE;
' 15.  STDMETHOD(GetDC)(THIS_ HDC *phdc) PURE;
' 16.  STDMETHOD(ReleaseDC)(THIS_ HDC hdc) PURE;
'};
' ****************************************************************************************

' ****************************************************************************************
' GetContainer method
' Provides access to the parent cube texture or texture (mipmap) object, if this surface
' is a child level of a cube texture or a mipmap. This method can also provide access to
' the parent swap chain if the surface is a back-buffer child.
' HRESULT GetContainer(
'   REFIID riid,
'   void ** ppContainer
' );
' ****************************************************************************************
FUNCTION IDirect3DSurface9_GetContainer ALIAS "IDirect3DSurface9_GetContainer" ( _
    BYVAL pthis AS DWORD PTR, BYREF riid AS GUID, BYREF ppContainer AS DWORD) EXPORT AS LONG

    LOCAL HRESULT AS LONG
    IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
    CALL DWORD @@pthis[11] USING IDirect3DSurface9_GetContainer(pthis, riid, ppContainer) TO HRESULT
    FUNCTION = HRESULT

END FUNCTION
' ****************************************************************************************

' ****************************************************************************************
' GetDesc method
' Retrieves a description of the surface.
' HRESULT GetDesc(
'   D3DSURFACE_DESC * pDesc
' );
' ****************************************************************************************
FUNCTION IDirect3DSurface9_GetDesc ALIAS "IDirect3DSurface9_GetDesc" ( _
    BYVAL pthis AS DWORD PTR, BYREF pDesc AS D3DSURFACE_DESC) EXPORT AS LONG

    LOCAL HRESULT AS LONG
    IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
    CALL DWORD @@pthis[12] USING IDirect3DSurface9_GetDesc(pthis, pDesc) TO HRESULT
    FUNCTION = HRESULT

END FUNCTION
' ****************************************************************************************

' ****************************************************************************************
' LockRect method
' Locks a rectangle on a surface.
' HRESULT LockRect(
'   D3DLOCKED_RECT * pLockedRect,
'   CONST RECT * pRect,
'   DWORD Flags
' );
' ****************************************************************************************
FUNCTION IDirect3DSurface9_LockRect ALIAS "IDirect3DSurface9_LockRect" ( _
    BYVAL pthis AS DWORD PTR, BYREF pLockedRect AS D3DLOCKED_RECT, BYREF pRect AS RECT, _
    BYVAL Flags AS DWORD) EXPORT AS LONG

    LOCAL HRESULT AS LONG
    IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
    CALL DWORD @@pthis[13] USING IDirect3DSurface9_LockRect(pthis, pLockedRect, pRect, Flags) TO HRESULT
    FUNCTION = HRESULT

END FUNCTION
' ****************************************************************************************

' ****************************************************************************************
' UnlockRect method
' Unlocks a rectangle on a surface.
' HRESULT UnlockRect();
' ****************************************************************************************
FUNCTION IDirect3DSurface9_UnlockRect ALIAS "IDirect3DSurface9_UnlockRect" (BYVAL pthis AS DWORD PTR) EXPORT AS LONG

    LOCAL HRESULT AS LONG
    IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
    CALL DWORD @@pthis[14] USING IDirect3DSurface9_UnlockRect(pthis) TO HRESULT
    FUNCTION = HRESULT

END FUNCTION
' ****************************************************************************************

' ****************************************************************************************
' GetDC method
' Retrieves a device context.
' HRESULT GetDC(
'   HDC* phdc
' );
' ****************************************************************************************
FUNCTION IDirect3DSurface9_GetDC ALIAS "IDirect3DSurface9_GetDC" ( _
    BYVAL pthis AS DWORD PTR, BYREF phdc AS DWORD) EXPORT AS LONG

    LOCAL HRESULT AS LONG
    IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
    CALL DWORD @@pthis[15] USING IDirect3DSurface9_GetDC(pthis, phdc) TO HRESULT
    FUNCTION = HRESULT

END FUNCTION
' ****************************************************************************************

' ****************************************************************************************
' ReleaseDC method
' Release a device context handle.
' HRESULT ReleaseDC(
'   HDC hdc
' );
' ****************************************************************************************
FUNCTION IDirect3DSurface9_ReleaseDC ALIAS "IDirect3DSurface9_ReleaseDC" ( _
    BYVAL pthis AS DWORD PTR, BYVAL hdc AS DWORD) EXPORT AS LONG

    LOCAL HRESULT AS LONG
    IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
    CALL DWORD @@pthis[16] USING IDirect3DSurface9_ReleaseDC(pthis, hdc) TO HRESULT
    FUNCTION = HRESULT

END FUNCTION
' ****************************************************************************************
 

 

Page last updated on Tuesday, 14 March 2006 20:20:53 +0100