OV_Tools::Create()
OV_Tools::Create_Trans()
- OV_Tools Create(
- [in] string Caption,
- [in] string ParentName,
- [in, optional] string Name,
- [in, optional] string Description)
- OV_Tools Create_Trans(
- [in] string TransId,
- [in] string Caption,
- [in] string ParentName,
- [in, optional] string Name,
- [in, optional] string Description)
Parameters
- TransId
- Transaction ID returned from OV_Transaction::Start().
- Caption
- The Caption property of the instance of OV_Tools to be created.
If a tool group with the same Caption already exists on the same
hierarchy path level (as a child of the same parent), nothing
happens, and the method fails with
MDLAPI_E_TOOLGROUP_HIERPATH_EXISTS. If the Caption parameter is an
empty string, contains invalid characters, or has more then 1024
characters, the method fails with MDLAPI_E_INVALID_CAPTION.
- ParentName
- The Name property of the instance of OV_Tools to which the
newly created node group is added. If the property is equal to an
empty string, the root node group is used. If the specified node
group does not exist, the method fails with
MDLAPI_E_PARENT_TOOLGROUP_NOT_EXIST.
- Name
- The Name property of the instance of OV_Tools to be created.
Optional parameter. If you do not specify this parameter, or if it
is equal to an empty string, it is created as a new GUID. If a Tool
Group with the same Name already exists, nothing happens, and the
method fails with MDLAPI_E_TOOLGROUP_NAME_EXISTS.
- Description
- The Description property of the instance of OV_Tools to be
created. Optional parameter.
Calling Convention
These methods can be called from a WMI class or instance
object.
Description
Creates a tool group (new instance of OV_Tools).
Return Value
Instance of the newly created OV_Tools.
Extended Status Codes
- MDLAPI_E_INVALID_CAPTION
- Specified object Caption parameter is not valid.
- MDLAPI_E_PARENT_TOOLGROUP_NOT_EXIST
- Parent Tool Group does not exist.
- MDLAPI_E_TOOLGROUP_NAME_EXISTS
- Tool Group with the same Name already exists.
- MDLAPI_E_TOOLGROUP_HIERPATH_EXISTS
- Tool Group with the same hierarchy path (Caption) already
exists.
- MDLAPI_E_TRANSACTION_NOT_EXIST
- Transaction with the specified ID does not exist.