d3d9.dllAddDataObject
Microsoft DirectX 9.0 SDK Update (October 2004)

ID3DXFileSaveData::AddDataObject Method


Adds a data object as a child of the ID3DXFileSaveData file data node.

Syntax

HRESULT AddDataObject(      

    REFGUID rguidTemplate,     LPCSTR szName,     const GUID *pId,     SIZE_T cbSize,     LPCVOID pvData,     ID3DXFileSaveData **ppObj );

Parameters

rguidTemplate
[in] Globally unique identifier (GUID) representing the data object's template.
szName
[in] Pointer to the name of the data object to add. Specify NULL if the object does not have a name.
pId
[in] Pointer to a GUID representing the data object. The data object must have been registered with ID3DXFile::RegisterTemplates or ID3DXFile::RegisterEnumTemplates. Specify NULL if the object does not have a GUID.
cbSize
[in] Size of the data object, in bytes.
pvData
[in] Pointer to a buffer containing all required data in the data object.
ppObj
[in, retval] Address of a pointer to an ID3DXFileSaveData interface, representing the file data node to which the data object will be added.

Return Value

If the method succeeds, the return value is S_OK.

If the method fails, the return value can be one of the following:

D3DXFERR_BADOBJECTData could not be read from or written to an object.
D3DXFERR_BADVALUEA variable is outside its expected range; typically returned when an object pointer is invalid.
E_OUTOFMEMORYMicrosoft Direct3D could not allocate sufficient memory to complete the call.




© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.