3.2.4.6.9 DeleteMachine (Opnum 15)

The DeleteMachine method deletes a machine from a machine group.

 [id(9), helpstring("method DeleteMachine")] HRESULT DeleteMachine(
   [in] BSTR bstrParentMachineGroupId,
   [in] BSTR bstrMachineId,
   BOOL bRecursive
 );

bstrParentMachineGroupId: A string that specifies the identifier of the machine group that contains the machine to delete.

If this parameter is NULL, E_INVALIDARG MUST be returned.

bstrMachineId: A string that specifies the identifier of the machine to delete.

If this parameter is NULL, E_INVALIDARG MUST be returned.

bRecursive: A Boolean value that specifies whether to recursively delete all instances of the specified machine.<103>

Value

Meaning

TRUE

0x00000001

All instances of the specified machine MUST be recursively searched in the specified machine group and deleted.

FALSE

0x00000000

Only a machine that is a direct child in the specified machine group SHOULD be deleted.

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.

0xC1FF0389

WRM_ERR_MACHINEGROUPID_INVALID

The specified machine group ID is invalid.

0xC1FF038A

WRM_ERR_MACHINEID_INVALID

The specified machine ID is not found.<104>

Additional IWRMMachineGroup interface methods are specified in section 3.2.4.6.