Saving to an X File (Legacy) (Direct3D 9)

Use the following procedure in legacy applications to save .x file templates and data to a .x file.

  1. Use the DirectXFileCreate function to create an IDirectXFile object.
  2. Use the IDirectXFile::RegisterTemplates method to inform the DirectX file system about any templates that you will use.
  3. Use the IDirectXFile::CreateSaveObject method to create an IDirectXFileSaveObject object.
  4. Use the IDirectXFileSaveObject::SaveTemplates method to save templates, if desired.
  5. Loop through the objects to save. For each top-level object, perform the following steps.
  6. Release the IDirectXFileSaveObject object.
  7. Release the IDirectXFile object.

X Files (Legacy)