|
|
|
ID3DXFileData Interface |
|
' ****************************************************************************************
' ID3DXFileData interface
' $IID_ID3DXFileData = GUID$("{cef08cfd-7b4f-4429-9624-2a690a933201}")
' ****************************************************************************************
' ****************************************************************************************
' Applications use the methods of the ID3DXFileData interface to build or to access the
' immediate hierarchy of the data object. Template restrictions determine the hierarchy.
' Remarks
' Data types allowed by the template are called optional members. The optional members are
' not required, but an object might miss important information without them. These optional
' members are saved as children of the data object. A child can be another data object or a
' reference to an earlier data object.
' The GUID for the ID3DXFileData interface is IID_ID3DXFileData.
' The LPD3DXFILEDATA type is defined as a pointer to this interface.
' Interface Information
' Stock Implementation d3d9.dll
' Custom Implementation No
' Inherits from IUnknown
' Header d3dx9xof.h
' Import library d3dx9.lib
' Minimum operating systems Windows 98
' ****************************************************************************************
' ****************************************************************************************
'DECLARE_INTERFACE_( ID3DXFileData, IUnknown )
'{
' 0. STDMETHOD( QueryInterface )( THIS_ REFIID, LPVOID* ) PURE;
' 1. STDMETHOD_( ULONG, AddRef )( THIS ) PURE;
' 2. STDMETHOD_( ULONG, Release )( THIS ) PURE;
' 3. STDMETHOD( GetEnum )( THIS_ ID3DXFileEnumObject** ) PURE;
' 4. STDMETHOD( GetName )( THIS_ LPSTR, SIZE_T* ) PURE;
' 5. STDMETHOD( GetId )( THIS_ LPGUID ) PURE;
' 6. STDMETHOD( Lock )( THIS_ SIZE_T*, LPCVOID* ) PURE;
' 7. STDMETHOD( Unlock )( THIS ) PURE;
' 8. STDMETHOD( GetType )( THIS_ GUID* ) PURE;
' 9. STDMETHOD_( BOOL, IsReference )( THIS ) PURE;
' 10. STDMETHOD( GetChildren )( THIS_ SIZE_T* ) PURE;
' 11. STDMETHOD( GetChild )( THIS_ SIZE_T, ID3DXFileData** ) PURE;
'};
' ****************************************************************************************
' ****************************************************************************************
' GetEnum method
' Retrieves the enumeration object in this file data object.
' HRESULT GetEnum(
' ID3DXFileEnumObject ** ppObj
' );
' ****************************************************************************************
FUNCTION ID3DXFileData_GetEnum ALIAS "ID3DXFileData_GetEnum" ( _
BYVAL pthis AS DWORD PTR, BYREF ppObj AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[3] USING ID3DXFileData_GetEnum(pthis, ppObj) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GetName method
' Retrieves the name of this file data object.
' HRESULT GetName(
' LPSTR szName,
' SIZE_T * puiSize
' );
' ****************************************************************************************
FUNCTION ID3DXFileData_GetName ALIAS "ID3DXFileData_GetName" ( _
BYVAL pthis AS DWORD PTR, BYVAL szName AS DWORD, BYREF puiSize AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[4] USING ID3DXFileData_GetName(pthis, szName, puiSize) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GetId method
' Retrieves the globally unique identifier (GUID) of this file data object.
' HRESULT GetId(
' LPGUID pId
' );
' ****************************************************************************************
FUNCTION ID3DXFileData_GetId ALIAS "ID3DXFileData_GetId" ( _
BYVAL pthis AS DWORD PTR, BYREF pId AS GUID) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[5] USING ID3DXFileData_GetId(pthis, pId) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' Lock method
' Accesses the .x file data.
' HRESULT Lock(
' SIZE_T * pSize,
' CONST VOID ** ppData
' );
' ****************************************************************************************
FUNCTION ID3DXFileData_Lock ALIAS "ID3DXFileData_Lock" ( _
BYVAL pthis AS DWORD PTR, BYREF pSize AS DWORD, BYREF ppData AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[6] USING ID3DXFileData_Lock(pthis, pSize, ppData) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' Unlock method
' Ends the lifespan of the ppData pointer returned by ID3DXFileData::Lock.
' BOOL Unlock();
' ****************************************************************************************
FUNCTION ID3DXFileData_Unlock ALIAS "ID3DXFileData_Unlock" (BYVAL pthis AS DWORD PTR) EXPORT AS LONG
LOCAL LRESULT AS LONG
IF pthis = %NULL THEN EXIT FUNCTION
CALL DWORD @@pthis[7] USING ID3DXFileData_Unlock(pthis) TO LRESULT
FUNCTION = LRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GetType method
' Retrieves the template identifier (ID) in this file data object.
' HRESULT GetType(
' CONST GUID * pType
' );
' ****************************************************************************************
FUNCTION ID3DXFileData_GetType ALIAS "ID3DXFileData_GetType" ( _
BYVAL pthis AS DWORD PTR, BYREF pType AS GUID) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[8] USING ID3DXFileData_GetType(pthis, pType) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' IsReference method
' Indicates whether this file data object is a reference object that points to another
' child data object.
' BOOL IsReference();
' ****************************************************************************************
FUNCTION ID3DXFileData_IsReference ALIAS "ID3DXFileData_IsReference" (BYVAL pthis AS DWORD PTR) EXPORT AS LONG
LOCAL LRESULT AS LONG
IF pthis = %NULL THEN EXIT FUNCTION
CALL DWORD @@pthis[9] USING ID3DXFileData_IsReference(pthis) TO LRESULT
FUNCTION = LRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GetChildren method
' Retrieves the number of children in this file data object.
' HRESULT GetChildren(
' SIZE_T * puiChildren
' );
' ****************************************************************************************
FUNCTION ID3DXFileData_GetChildren ALIAS "ID3DXFileData_GetChildren" ( _
BYVAL pthis AS DWORD PTR, BYVAL puiChildren AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[10] USING ID3DXFileData_GetChildren(pthis, puiChildren) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GetChild method
' Retrieves a child object in this file data object.
' HRESULT GetChild(
' SIZE_T uiChild,
' ID3DXFileData ** ppChild
' );
' ****************************************************************************************
FUNCTION ID3DXFileData_GetChild ALIAS "ID3DXFileData_GetChild" ( _
BYVAL pthis AS DWORD PTR, BYVAL uiChild AS DWORD, BYREF ppChild AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[11] USING ID3DXFileData_GetChild(pthis, uiChild, ppChild) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
|
Page last updated on Wednesday, 15 March 2006 00:26:45 +0100