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

ID3DXFileSaveData::AddDataReference Method


Adds a data reference as a child of this ID3DXFileSaveData file data node. The data reference points to a file data object.

Syntax

HRESULT AddDataReference(      

    LPCSTR szName,     const GUID *pId );

Parameters

szName
[in] Pointer to the name of the data object to add by reference. Specify NULL if the data object does not have a name.
pId
[in] Pointer to a globally unique identifier (GUID) representing the data object to add by reference. If NULL, a reference will be added that points to the data object with the name given by szName.

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.


Remarks

The file data object being referenced must have either a name or a GUID. The file data object must also derive from a different parent ID3DXFileSaveData object.



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