IDirectXFileSaveObject::CreateDataObject method
Creates a data object. Deprecated.
Syntax
HRESULT CreateDataObject(
[in] REFGUID rguidTemplate,
[in] LPCSTR szName,
[in] const GUID *pguid,
[in] DWORD cbSize,
[in] LPVOID pvData,
[out, retval] LPDIRECTXFILEDATA *ppDataObj
);
Parameters
-
rguidTemplate [in]
-
Type: REFGUID
GUID representing the data object's template.
-
szName [in]
-
Type: LPCSTR
Pointer to the name of the data object. Specify NULL if the object does not have a name.
-
pguid [in]
-
Type: const GUID*
Pointer to a GUID representing the data object. Specify NULL if the object does not have a GUID.
-
cbSize [in]
-
Type: DWORD
Size of the data object, in bytes.
-
pvData [in]
-
Type: LPVOID
Pointer to a buffer containing all required member's data.
-
ppDataObj [out, retval]
-
Type: LPDIRECTXFILEDATA*
Address of a pointer to an IDirectXFileData interface, representing the created file data object.
Return value
Type: HRESULT
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
Requirement | Value |
---|---|
Header |
|
Library |
|
See also