3.2.4.6.6 AddMachine (Opnum 12)

The AddMachine method adds a machine to a machine group.

 [id(6), helpstring("method AddMachine")] HRESULT AddMachine(
   [in] BSTR bstrParentMachineGroupId,
   [in] BSTR bstrMachineInfo
 );

bstrParentMachineGroupId: A string that specifies the identifier of the machine group in which to add a machine.

If this parameter is NULL, E_INVALIDARG MUST be returned.

bstrMachineInfo: A string that specifies the machine, in the format specified in Machine element (section 2.2.5.17).<95>

Return Values: This method returns 0x00000000 for success or a negative HRESULT value (in the following table or in [MS-ERREF] section 2.1.1) if an error occurs.

Return value/code

Description

0x00000000

S_OK

Operation successful.

0x80070057

E_INVALIDARG

One or more arguments are invalid.

0xC1FF0070

WRM_ERR_TAGS_NOT_IN_ORDER

The XML data that is maintained by the management service is invalid or cannot be processed.<96>

0xC1FF0389

WRM_ERR_MACHINEGROUPID_INVALID

The specified machine group id is invalid.

0xC1FF038B

WRM_ERR_MACHINE_LIMIT_EXCEEDED

The total number of machines has exceeded an implementation-defined limit.<97>

0xC1FF038C

WRM_ERR_MACHINE_ALREADY_EXISTS

A machine with the specified name already exists as the direct child in the machine group.

Additional IWRMMachineGroup interface methods are specified in section 3.2.4.6.