<div class="content"><p>The RenameAllocationPolicy method renames an existing <a href="e371cc74-bf4c-4870-8afe-5062cc628b4f#gt_ce127d6a-8b12-40d6-b9c9-cf544c3ffd08" data-linktype="relative-path">resource allocation policy
(RAP)</a>.</p><dl>
<dd>
<div><pre> [id(5), helpstring(&#34;method RenameAllocationPolicy&#34;)] HRESULT RenameAllocationPolicy(
   [in] BSTR bstrNewPolicyName,
   [in] BSTR bstrOldPolicyName
 );
</pre></div>
</dd></dl><p><b>bstrNewPolicyName: </b>The new policy name that
replaces the old one.</p><dl>
<dd>
<p>If this parameter is NULL, E_INVALIDARG MUST be
returned.</p>
</dd>
<dd>
<p>The following <a href="e371cc74-bf4c-4870-8afe-5062cc628b4f#gt_6442eac9-3264-4d95-a435-fdc08e71603f" data-linktype="relative-path">RAP</a> names are reserved. If
this parameter specifies a reserved name, <b>WRM_ERR_POLICYID_RESERVED_WORD</b>
SHOULD be returned: &#34;\&#34;, &#34;current&#34;, &#34;none&#34;, and
&#34;Residual&#34;. Reserved words are case-insensitive.</p>
</dd></dl><p><b>bstrOldPolicyName: </b>The old policy name to be
replaced.</p><dl>
<dd>
<p>If this parameter is NULL, <b>E_INVALIDARG</b> MUST
be returned.</p>
</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>Operation successful.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x80070057</p>
  <p>E_INVALIDARG</p>
  </td>
  <td>
  <p>One or more arguments are invalid.</p>
  </td>
 </tr><tr>
  <td>
  <p>0xC1FF006F</p>
  <p>WRM_ERR_ID_VALUE</p>
  </td>
  <td>
  <p>The specified name contains characters that are
  invalid. 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>0xC1FF00C8</p>
  <p>WRM_ERR_TOO_LONG_POLICY_ID</p>
  </td>
  <td>
  <p>The request has been aborted, because the RAP name has
  exceeded an implementation-defined limit.<a id="Appendix_A_Target_108"></a><a aria-label="Product behavior note 108" href="1af5b971-a682-44a0-affe-c98947d5e7f7#Appendix_A_108" data-linktype="relative-path">&lt;108&gt;</a></p>
  </td>
 </tr><tr>
  <td>
  <p>0xC1FF00C9</p>
  <p>WRM_ERR_POLICYID_INVALID</p>
  </td>
  <td>
  <p>The specified RAP does not exist.</p>
  </td>
 </tr><tr>
  <td>
  <p>0xC1FF00CA</p>
  <p>WRM_ERR_POLICYID_ALREADY_EXISTS</p>
  </td>
  <td>
  <p>A RAP with the specified name already exists.</p>
  </td>
 </tr><tr>
  <td>
  <p>0xC1FF00CB</p>
  <p>WRM_ERR_POLICYID_RESERVED_WORD</p>
  </td>
  <td>
  <p>The specified RAP name is a reserved word used by WSRM
  and cannot be used as a name. Reserved words for RAPs are
  &#34;current&#34;, &#34;none&#34;, &#34;\&#34; and &#34;Residual&#34;.
  Reserved words are case-insensitive.</p>
  </td>
 </tr><tr>
  <td>
  <p>0xC1FF00E0</p>
  <p>WRM_ERR_WSRM_RESERVED_POLICY</p>
  </td>
  <td>
  <p>The specified policy is a built-in policy. It cannot
  be altered.</p>
  </td>
 </tr><tr>
  <td>
  <p>0xC1FF0070</p>
  <p>WRM_ERR_TAGS_NOT_IN_ORDER</p>
  </td>
  <td>
  <p>The <a href="e371cc74-bf4c-4870-8afe-5062cc628b4f#gt_982b7f8e-d516-4fd5-8d5e-1a836081ed85" data-linktype="relative-path">XML</a>
  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
  invalid or cannot be processed.<a id="Appendix_A_Target_109"></a><a aria-label="Product behavior note 109" href="1af5b971-a682-44a0-affe-c98947d5e7f7#Appendix_A_109" data-linktype="relative-path">&lt;109&gt;</a> </p>
  </td>
 </tr><tr>
  <td>
  <p>0xC1FF00E5</p>
  <p>WRM_ERR_RENAME_ACTIVE_POLICY</p>
  </td>
  <td>
  <p>The specified RAP is being used by WSRM and cannot be
  renamed.</p>
  </td>
 </tr></tbody></table>
</dd></dl><p>Additional <a href="a03f4cd5-ad33-46aa-94e7-2c9a92f02b6f" data-linktype="relative-path">IWRMPolicy</a> interface
methods are specified in section 3.2.4.7.</p></div>