| Microsoft DirectX 8.1 (C++) | 
Saves templates to a Microsoft® DirectX® file.
HRESULT SaveTemplates( DWORD cTemplates, const GUID** ppguidTemplates );
If the method succeeds, the return value is DXFILE_OK.
If the method fails, the return value can be DXFILEERR_BADVALUE.
The following code fragment provides an example call to SaveTemplates and example contents for the array to which ppguidTemplates points.
IDirectXFileSaveObject * pDXFileSaveObject;
const GUID *aIds[] = {
    &DXFILEOBJ_SimpleData,
    &DXFILEOBJ_ArrayData,
    &DXFILEOBJ_RestrictedData};
hr = pDXFileSaveObject->SaveTemplates(3, aIds);
After using this method to save the templates, use the IDirectXFileSaveObject::CreateDataObject method to create a data object.
  Header: Declared in Dxfile.h.
  Import Library: Use D3dxof.lib.