ID3DXSaveUserData::RegisterTemplates

A callback for the user to register a .x file template.

HRESULT RegisterTemplates(
  LPD3DXFILE pXFileApi
);

Parameters

pXFileApi
[in] Use this pointer to register user-defined .x file templates. See ID3DXFile. Do not use this parameter to add data objects.

Return Values

The return values of this method are implemented by an application programmer. In general, if no error occurs, program the method to return D3D_OK. Otherwise, program the method to return an appropriate error message from D3DERR or D3DXERR, as this will cause D3DXLoadMeshHierarchyFromX to fail also, and return the error.

Remarks

ID3DXSaveUserData::RegisterTemplates and ID3DXSaveUserData::SaveTemplates provide a mechanism for adding a template to a .x file for saving user data.

Requirements

Header: Declared in D3dx9anim.h.