ID3DXFile::CreateSaveObject method
Creates a save object that will be used to save data to a .x file.
Syntax
HRESULT CreateSaveObject(
[in] LPCVOID pData,
[in] D3DXF_FILESAVEOPTIONS flags,
[in] D3DXF_FILEFORMAT dwFileFormat,
[out] ID3DXFileSaveObject **ppSaveObj
);
Parameters
-
pData [in]
-
Type: LPCVOID
Pointer to the name of the file to use for saving data.
-
flags [in]
-
Type: D3DXF_FILESAVEOPTIONS
Value that specifies the name of the file to which data is to be saved. This value can be one of the File Save Options flags.
-
dwFileFormat [in]
-
Type: D3DXF_FILEFORMAT
Indicates the format to use when saving the .x file. This value can be one of the File Formats flags. For more information, see Remarks.
-
ppSaveObj [out]
-
Type: ID3DXFileSaveObject**
Address of a pointer to an ID3DXFileSaveObject interface, representing the created save object.
Return value
Type: HRESULT
If the method succeeds, the return value is S_OK. If the method fails, the return value can be one of the following: D3DXFERR_BADVALUE, D3DXFERR_PARSEERROR.
Remarks
After using this method, use methods of the ID3DXFileSaveObject interface to create data objects and to save templates or data.
For the saved file format dwFileFormat, one of the binary, legacy binary, or text flags in File Formats must be specified. The file can be compressed by using the optional D3DXF_FILEFORMAT_COMPRESSED flag.
The file format values can be combined in a logical OR to create compressed text or compressed binary files. If you indicate that the file format should be text and compressed, the file will be written out first as text and then compressed. However, compressed text files are not as efficient as binary text files; in most cases, therefore, you will want to indicate binary and compressed.
Requirements
Requirement | Value |
---|---|
Header |
|
Library |
|
See also