3.2.4.10.2 ModifyResourceGroup (Opnum 8)

The ModifyResourceGroup method modifies an existing resource group.

 [id(2), helpstring("method ModifyResourceGroup")] HRESULT ModifyResourceGroup(
   [in] BSTR bstrResourceGroupInfo,
   [in] BOOL bOverwrite
 );

bstrResourceGroupInfo: A string that contains the modified resource group, in the form of a ProcessMatchingCriteria element (section 2.2.5.24). Sample XML is provided in ProcessMatchingCriteria example (section 4.2.20).

bOverwrite: A Boolean value that specifies whether to ignore the timestamp of the resource group when validating.

A timestamp MUST be defined inside a common node at the root level of an XML element, as shown in the Calendar example (section 4.2.6). The format of a timestamp is specified in section 2.2.1.4.

Value

Meaning

FALSE

0x00000000

The timestamp of the new resource group MUST specify a time that is equal to or later than the timestamp of any modifications made to the PMC object on the server. Otherwise, the modification SHOULD fail, and WRM_ERR_OLD_INFORMATION SHOULD be returned.

TRUE

0x00000001

The resource group is validated and modified without checking the timestamp.

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

The call was successful.

0xC1FF0069

WRM_ERR_OLD_INFORMATION

The XML timestamp is out-of-date.

0xC1FF006A

WRM_ERR_NO_TIMESTAMP_PRESENT

The specified resource group could not be modified because the XML timestamp in the bstrResourceGroupInfo parameter was not found.

0xC1FF006F

WRM_ERR_ID_VALUE

The specified name of the ProcessMatchingCriteria element contains characters that are not valid. The name cannot start with a hyphen ("-"), cannot contain spaces, and cannot contain any of the following characters:

 \   / ? * | : < > " , ;

0xC1FF0070

WRM_ERR_TAGS_NOT_IN_ORDER

The XML data that is maintained by the management service is not valid or cannot be processed.<115>

0xC1FF012D

WRM_ERR_TOO_LONG_RESOURCE_GROUP_ID

The resource group name has exceeded an implementation-defined<116> limit. The modify request has been aborted.

0xC1FF012E

WRM_ERR_RESOURCEGROUPID_INVALID

The specified resource group does not exist, or "\" was specified. "\" is a reserved name for resource group identifiers.

0xC1FF0132

WRM_ERR_PATH_LIMIT_EXCEEDED

The command-line length has exceeded an implementation-defined limit.<117>

0xC1FF0134

WRM_ERR_USER_LIMIT_EXCEEDED

The user name or group value has exceeded an implementation-defined limit.<118>

0xC1FF0135

WRM_ERR_RULE_LIMIT_EXCEEDED

The specified resource group could not be modified because a resource group cannot have more than 64 rules.

0xC1FF0138

WRM_ERR_RESERVED_RESOURCEGROUP

The specified resource group is built-in. It cannot be modified.<119>

Additional IWRMResourceGroup interface methods are specified in section 3.2.4.10.