OV_ConfigFileVariety::SaveAsTemplate()
OV_ConfigFileVariety::SaveAsTemplate_Trans()
- void SaveAsTemplate(
- [in] string Content,
- [in, optional] string Filename)
Parameters
- Content
- The content of a file that should be saved as the
template.
- Filename
- Name of a file to use as a template. If you do not specify this
parameter, the method uses the Filename property.
Calling Convention
These methods can be called only from a WMI instance object.
Description
Saves the specified content of a file as the template.
If, for the current variety, save-as-template is not allowed
(method HasTemplateFolder returns false), the method fails with
MDLAPI_E_CONFIGFILEVAR_TEMPL_NOT_ALLOW.
If the name of file (either the Filename parameter or the
Filename property) is '<*>', the method fails with
MDLAPI_E_CONFIGFILEVAR_TEMPL_FILENAME.
Return Value
None.
Extended Status Codes
- MDLAPI_E_CONFIGFILEVAR_TEMPL_NOT_ALLOW
- Template is not allowed for this variety.
- MDLAPI_E_CONFIGFILEVAR_TEMPL_FILENAME
- String '<*>' cannot be used as the Filename.
- MDLAPI_E_TRANSACTION_NOT_EXIST
- Transaction with the specified ID does not exist.