<div class="content" name="ModifyResourceGroup" uuid="d96e0417-9b11-47c9-b6c7-23db6672af22"><p>The <b>ModifyResourceGroup</b> method modifies an existing
resource group.</p><dl>
<dd>
<div><pre> [id(2), helpstring(&#34;method ModifyResourceGroup&#34;)] HRESULT ModifyResourceGroup(
   [in] BSTR bstrResourceGroupInfo,
   [in] BOOL bOverwrite
 );
</pre></div>
</dd></dl><p><b>bstrResourceGroupInfo: </b>A string that contains
the modified resource group, in the form of a <a href="b31d31ce-1030-43c6-abff-ea77edb2d5b7" data-linktype="relative-path">ProcessMatchingCriteria</a>
element (section 2.2.5.24). Sample <a href="e371cc74-bf4c-4870-8afe-5062cc628b4f#gt_982b7f8e-d516-4fd5-8d5e-1a836081ed85" data-linktype="relative-path">XML</a> is provided in <a href="702d097a-9c16-4a63-8254-89e349a182d4" data-linktype="relative-path">ProcessMatchingCriteria</a>
example (section <a href="84880779-fe33-4629-8c94-31d81a429585" data-linktype="relative-path">4.2.20</a>).</p><p><b>bOverwrite: </b>A Boolean value that specifies
whether to ignore the timestamp of the resource group when validating. </p><dl>
<dd>
<p>A timestamp MUST be defined inside a common node at
the root level of an XML element, as shown in the <a href="1fd26c60-e8c3-432c-805a-48fa5407ea34" data-linktype="relative-path">Calendar</a> example (section
4.2.6). The format of a timestamp is specified in section <a href="cee8ad39-3c17-48ef-8196-0ec67d7cc4a0" data-linktype="relative-path">2.2.1.4</a>.</p>
</dd>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Value</p>
   </th>
   <th>
   <p>Meaning</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>FALSE 0x00000000</td>
  <td>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.</td>
 </tr><tr>
  <td>TRUE 0x00000001</td>
  <td>The resource group is validated and modified without checking the timestamp.</td>
 </tr></tbody></table>
</dd></dl><p><b>Return Values: </b>This method returns 0x00000000
for success or a negative <a href="e371cc74-bf4c-4870-8afe-5062cc628b4f#gt_799103ab-b3cb-4eab-8c55-322821b2b235" data-linktype="relative-path">HRESULT</a>
value (in the following table or in <a href="../ms-erref/1bc92ddf-b79e-413c-bbaa-99a5281a6c90" data-linktype="relative-path">[MS-ERREF]</a>
section <a href="../ms-erref/705fb797-2175-4a90-b5a3-3918024b10b8" data-linktype="relative-path">2.1.1</a>)
if an error occurs.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Return value/code</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>0x00000000 S_OK</td>
  <td>The call was successful.</td>
 </tr><tr>
  <td>0xC1FF0069 WRM_ERR_OLD_INFORMATION</td>
  <td>The XML timestamp is out-of-date.</td>
 </tr><tr>
  <td>0xC1FF006A WRM_ERR_NO_TIMESTAMP_PRESENT</td>
  <td>The specified resource group could not be modified because the XML timestamp in the bstrResourceGroupInfo parameter was not found.</td>
 </tr><tr>
  <td>0xC1FF006F WRM_ERR_ID_VALUE</td>
  <td>The specified name of the ProcessMatchingCriteria element contains characters that are not valid. The name cannot start with a hyphen (&#34;-&#34;), cannot contain spaces, and cannot contain any of the following characters:   \   / ? * | : &lt; &gt; &#34; , ;</td>
 </tr><tr>
  <td>0xC1FF0070 WRM_ERR_TAGS_NOT_IN_ORDER</td>
  <td>The XML data that is maintained by the management service is not valid or cannot be processed.&lt;115&gt;</td>
 </tr><tr>
  <td>0xC1FF012D WRM_ERR_TOO_LONG_RESOURCE_GROUP_ID</td>
  <td>The resource group name has exceeded an implementation-defined&lt;116&gt; limit. The modify request has been aborted.</td>
 </tr><tr>
  <td>0xC1FF012E WRM_ERR_RESOURCEGROUPID_INVALID</td>
  <td>The specified resource group does not exist, or &#34;\&#34; was specified. &#34;\&#34; is a reserved name for resource group identifiers.</td>
 </tr><tr>
  <td>0xC1FF0132 WRM_ERR_PATH_LIMIT_EXCEEDED</td>
  <td>The command-line length has exceeded an implementation-defined limit.&lt;117&gt;</td>
 </tr><tr>
  <td>0xC1FF0134 WRM_ERR_USER_LIMIT_EXCEEDED</td>
  <td>The user name or group value has exceeded an implementation-defined limit.&lt;118&gt;</td>
 </tr><tr>
  <td>0xC1FF0135 WRM_ERR_RULE_LIMIT_EXCEEDED</td>
  <td>The specified resource group could not be modified because a resource group cannot have more than 64 rules.</td>
 </tr><tr>
  <td>0xC1FF0138 WRM_ERR_RESERVED_RESOURCEGROUP</td>
  <td>The specified resource group is built-in. It cannot be modified.&lt;119&gt;</td>
 </tr></tbody></table>
</dd></dl><p>Additional <a href="a314adf4-0bff-40d1-a5b2-d909dcf176a3" data-linktype="relative-path">IWRMResourceGroup</a>
interface methods are specified in section 3.2.4.10.</p></div>