<div class="content"><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>
  <p>FALSE</p>
  <p>0x00000000</p>
  </td>
  <td>
  <p>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
  <b>WRM_ERR_OLD_INFORMATION</b> SHOULD be returned.</p>
  </td>
 </tr><tr>
  <td>
  <p>TRUE</p>
  <p>0x00000001</p>
  </td>
  <td>
  <p>The resource group is validated and modified without
  checking the timestamp.</p>
  </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>
  <p>0x00000000</p>
  <p>S_OK</p>
  </td>
  <td>
  <p>The call was successful.</p>
  </td>
 </tr><tr>
  <td>
  <p>0xC1FF0069</p>
  <p>WRM_ERR_OLD_INFORMATION</p>
  </td>
  <td>
  <p>The XML timestamp is out-of-date.</p>
  </td>
 </tr><tr>
  <td>
  <p>0xC1FF006A</p>
  <p>WRM_ERR_NO_TIMESTAMP_PRESENT</p>
  </td>
  <td>
  <p>The specified resource group could not be modified
  because the XML timestamp in the <i>bstrResourceGroupInfo</i> parameter was
  not found.</p>
  </td>
 </tr><tr>
  <td>
  <p>0xC1FF006F</p>
  <p>WRM_ERR_ID_VALUE</p>
  </td>
  <td>
  <p>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:</p>
  <dl>
<dd>
<div><pre> \   / ? * | : &lt; &gt; &#34; , ;
</pre></div>
</dd></dl>
  </td>
 </tr><tr>
  <td>
  <p>0xC1FF0070</p>
  <p>WRM_ERR_TAGS_NOT_IN_ORDER</p>
  </td>
  <td>
  <p>The XML data that is maintained by the <a href="e371cc74-bf4c-4870-8afe-5062cc628b4f#gt_1517eb9b-d2b2-48f0-bf23-bde76923ed30" data-linktype="relative-path">management service</a> is not
  valid or cannot be processed.<a id="Appendix_A_Target_115"></a><a aria-label="Product behavior note 115" href="1af5b971-a682-44a0-affe-c98947d5e7f7#Appendix_A_115" data-linktype="relative-path">&lt;115&gt;</a></p>
  </td>
 </tr><tr>
  <td>
  <p>0xC1FF012D</p>
  <p>WRM_ERR_TOO_LONG_RESOURCE_GROUP_ID</p>
  </td>
  <td>
  <p>The resource group name has exceeded an
  implementation-defined<a id="Appendix_A_Target_116"></a><a aria-label="Product behavior note 116" href="1af5b971-a682-44a0-affe-c98947d5e7f7#Appendix_A_116" data-linktype="relative-path">&lt;116&gt;</a> limit.
  The modify request has been aborted.</p>
  </td>
 </tr><tr>
  <td>
  <p>0xC1FF012E</p>
  <p>WRM_ERR_RESOURCEGROUPID_INVALID</p>
  </td>
  <td>
  <p>The specified resource group does not exist, or
  &#34;\&#34; was specified. &#34;\&#34; is a reserved name for resource
  group identifiers.</p>
  </td>
 </tr><tr>
  <td>
  <p>0xC1FF0132</p>
  <p>WRM_ERR_PATH_LIMIT_EXCEEDED</p>
  </td>
  <td>
  <p>The command-line length has exceeded an
  implementation-defined limit.<a id="Appendix_A_Target_117"></a><a aria-label="Product behavior note 117" href="1af5b971-a682-44a0-affe-c98947d5e7f7#Appendix_A_117" data-linktype="relative-path">&lt;117&gt;</a></p>
  </td>
 </tr><tr>
  <td>
  <p>0xC1FF0134</p>
  <p>WRM_ERR_USER_LIMIT_EXCEEDED</p>
  </td>
  <td>
  <p>The user name or group value has exceeded an
  implementation-defined limit.<a id="Appendix_A_Target_118"></a><a aria-label="Product behavior note 118" href="1af5b971-a682-44a0-affe-c98947d5e7f7#Appendix_A_118" data-linktype="relative-path">&lt;118&gt;</a></p>
  </td>
 </tr><tr>
  <td>
  <p>0xC1FF0135</p>
  <p>WRM_ERR_RULE_LIMIT_EXCEEDED</p>
  </td>
  <td>
  <p>The specified resource group could not be modified
  because a resource group cannot have more than 64 rules.</p>
  </td>
 </tr><tr>
  <td>
  <p>0xC1FF0138</p>
  <p>WRM_ERR_RESERVED_RESOURCEGROUP</p>
  </td>
  <td>
  <p>The specified resource group is built-in. It cannot be
  modified.<a id="Appendix_A_Target_119"></a><a aria-label="Product behavior note 119" href="1af5b971-a682-44a0-affe-c98947d5e7f7#Appendix_A_119" data-linktype="relative-path">&lt;119&gt;</a></p>
  </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>