IDirectXFileSaveObject::CreateDataObject

Creates a data object. Deprecated.

HRESULT CreateDataObject(
  REFGUID rguidTemplate,
  LPCSTR szName,
  CONST GUID * pguid,
  DWORD cbSize,
  LPVOID pvData,
  LPDIRECTXFILEDATA * ppDataObj
);

Parameters

rguidTemplate
[in] GUID representing the data object's template.
szName
[in] Pointer to the name of the data object. Specify NULL if the object does not have a name.
pguid
[in] Pointer to a GUID representing the data object. 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 member's data.
ppDataObj
[out, retval] Address of a pointer to an IDirectXFileData interface, representing the created file data object.

Return Values

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

Remarks

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 IDirectXFileSaveObject::SaveData. If the object has child objects, add them before calling IDirectXFileSaveObject::SaveData.

Requirements

Header: Declared in Dxfile.h.

See Also

IDirectXFileData::AddDataObject, IDirectXFileSaveObject::SaveData, IDirectXFileSaveObject::SaveTemplates