IDirect3DVolume9 Interface

 

 

' ****************************************************************************************
' IDirect3DVolume9 interface
' $IID_IDirect3DVolume9 = GUID$("{24F416E6-1F67-4aa7-B88E-D33F6F3128A1}")
' ****************************************************************************************

' ****************************************************************************************
' Applications use the methods of the IDirect3DVolume9 interface to manipulate volume resources.
' The IDirect3DVolume9 interface is obtained by calling the IDirect3DVolumeTexture9::GetVolumeLevel method.
' Interface Information
'    Stock Implementation   d3d9.dll
'    Custom Implementation  No
'    Inherits from  IUnknown
'    Header     d3d9.h
'    Import library     d3d9.lib
'    Minimum operating systems  Windows 98
' ****************************************************************************************

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

'    /*** IDirect3DVolume9 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(GetContainer)(THIS_ REFIID riid,void** ppContainer) PURE;
'  8.  STDMETHOD(GetDesc)(THIS_ D3DVOLUME_DESC *pDesc) PURE;
'  9.  STDMETHOD(LockBox)(THIS_ D3DLOCKED_BOX * pLockedVolume,CONST D3DBOX* pBox,DWORD Flags) PURE;
' 10.  STDMETHOD(UnlockBox)(THIS) PURE;
'};
' ****************************************************************************************

' ****************************************************************************************
' GetDevice method
' Retrieves the device associated with a volume.
' Note  Calling this method will increase the internal reference count on the
' IDirect3DDevice9 interface. Be sure to call IUnknown::Release when you are done using
' this IDirect3DDevice9 interface or you will have a memory leak.
' HRESULT GetDevice(
'   IDirect3DDevice9 ** ppDevice
' );
' ****************************************************************************************
FUNCTION IDirect3DVolume9_GetDevice ALIAS "IDirect3DVolume9_GetDevice" ( _
    BYVAL pthis AS DWORD PTR, BYREF ppDevice AS DWORD) EXPORT AS LONG

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

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

' ****************************************************************************************
' SetPrivateData method
' Associates data with the volume that is intended for use by the application, not by
' Microsoft® Direct3D.
' HRESULT SetPrivateData(
'   REFGUID refguid,
'   CONST void * pData,
'   DWORD SizeOfData,
'   DWORD Flags
' );
' ****************************************************************************************
FUNCTION IDirect3DVolume9_SetPrivateData ALIAS "IDirect3DVolume9_SetPrivateData" ( _
    BYVAL pthis AS DWORD PTR, BYREF refguid AS GUID, BYVAL pData AS DWORD, _
    BYVAL SizeOfData AS DWORD, BYVAL Flags AS DWORD) EXPORT AS LONG

    LOCAL HRESULT AS LONG
    IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
    CALL DWORD @@pthis[4] USING IDirect3DVolume9_SetPrivateData(pthis, refguid, pData, SizeOfData, Flags) TO HRESULT
    FUNCTION = HRESULT

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

' ****************************************************************************************
' GetPrivateData method
' Copies the private data associated with the volume to a provided buffer.
' HRESULT GetPrivateData(
'   REFGUID refguid,
'   void * pData,
'   DWORD * pSizeOfData
' );
' ****************************************************************************************
FUNCTION IDirect3DVolume9_GetPrivateData ALIAS "IDirect3DVolume9_GetPrivateData" ( _
    BYVAL pthis AS DWORD PTR, BYREF refguid AS GUID, BYVAL pData AS DWORD, _
    BYREF pSizeOfData AS DWORD) EXPORT AS LONG

    LOCAL HRESULT AS LONG
    IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
    CALL DWORD @@pthis[5] USING IDirect3DVolume9_GetPrivateData(pthis, refguid, pData, pSizeOfData) TO HRESULT
    FUNCTION = HRESULT

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

' ****************************************************************************************
' FreePrivateData method
' Frees the specified private data associated with this volume.
' HRESULT FreePrivateData(
'   REFGUID refguid
' );
' ****************************************************************************************
FUNCTION IDirect3DVolume9_FreePrivateData ALIAS "IDirect3DVolume9_FreePrivateData" ( _
    BYVAL pthis AS DWORD PTR, BYREF refguid AS GUID) EXPORT AS LONG

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

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

' ****************************************************************************************
' GetContainer method
' Provides access to the parent volume texture object, if this surface is a child level of
' a volume texture.
' HRESULT GetContainer(
'   REFIID riid,
'   void ** ppContainer
' );
' ****************************************************************************************
FUNCTION IDirect3DVolume9_GetContainer ALIAS "IDirect3DVolume9_GetContainer" ( _
    BYVAL pthis AS DWORD PTR, BYREF refguid 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[7] USING IDirect3DVolume9_GetContainer(pthis, refguid, ppContainer) TO HRESULT
    FUNCTION = HRESULT

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

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

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

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

' ****************************************************************************************
' LockBox method
' Locks a box on a volume resource.
' HRESULT LockBox(
'   D3DLOCKED_BOX * pLockedVolume,
'   CONST D3DBOX * pBox,
'   DWORD Flags
' );
' ****************************************************************************************
FUNCTION IDirect3DVolume9_LockBox ALIAS "IDirect3DVolume9_LockBox" ( _
    BYVAL pthis AS DWORD PTR, BYREF pLockedVolume AS D3DLOCKED_BOX, _
    BYREF pBox AS D3DBOX, BYVAL Flags AS DWORD) EXPORT AS LONG

    LOCAL HRESULT AS LONG
    IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
    CALL DWORD @@pthis[9] USING IDirect3DVolume9_LockBox(pthis, pLockedVolume, pBox, Flags) TO HRESULT
    FUNCTION = HRESULT

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

' ****************************************************************************************
' UnlockBox method
' Unlocks a box on a volume resource.
' HRESULT UnlockBox();
' ****************************************************************************************
FUNCTION IDirect3DVolume9_UnlockBox ALIAS "IDirect3DVolume9_UnlockBox" (BYVAL pthis AS DWORD PTR) EXPORT AS LONG

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

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

 

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