Microsoft DirectX 8.1 (C++) |
Creates a data object.
HRESULT CreateDataObject( REFGUID rguidTemplate, LPCSTR szName, const GUID* pguid, DWORD cbSize, LPVOID pvData, LPDIRECTXFILEDATA* ppDataObj );
If the method succeeds, the return value is DXFILE_OK.
If the method fails, the return value can be one of the following values.
DXFILEERR_BADALLOC |
DXFILEERR_BADVALUE |
If a data reference object will reference the data object, either the szName or pguid parameter must be non-NULL.
Save any templates by using the IDirectXFileSaveObject::SaveTemplates method before saving the data created by this method. Save the created data by using the IDirectXFileSaveObject::SaveData method.
If you need to save optional data, use the IDirectXFileData::AddDataObject method after using this method and before using SaveData. If the object has child objects, add them before calling SaveData.
Header: Declared in Dxfile.h.
Import Library: Use D3dxof.lib.
IDirectXFileData::AddDataObject, IDirectXFileSaveObject::SaveData, IDirectXFileSaveObject::SaveTemplates