<div class="content"><p>The RegisterAccountingClient method registers an <a href="e371cc74-bf4c-4870-8afe-5062cc628b4f#gt_bb8795a8-ff43-416b-976a-6257b68fe7fa" data-linktype="relative-path">accounting client</a> for
remote <a href="e371cc74-bf4c-4870-8afe-5062cc628b4f#gt_1156c8ef-4d49-462b-9f76-aebcb6c57011" data-linktype="relative-path">accounting</a> on an <a href="e371cc74-bf4c-4870-8afe-5062cc628b4f#gt_00ade642-0391-435b-980a-8fb488ef1b68" data-linktype="relative-path">accounting server</a>. A
default accounting database SHOULD<a id="Appendix_A_Target_50"></a><a aria-label="Product behavior note 50" href="1af5b971-a682-44a0-affe-c98947d5e7f7#Appendix_A_50" data-linktype="relative-path">&lt;50&gt;</a> be
defined.</p><p><b>Note</b>  This method is expected to be called
remotely by the <a href="e371cc74-bf4c-4870-8afe-5062cc628b4f#gt_d83f4163-fac6-4d2e-b143-a7e0420b6e4b" data-linktype="relative-path">WSRM
management service</a> that is acting as an accounting client. A client SHOULD
NOT call this method.</p><dl>
<dd>
<div><pre> [id(9), helpstring(&#34;method RegisterAccountingClient&#34;)] HRESULT RegisterAccountingClient(
   [in] BSTR bstrClientId
 );
</pre></div>
</dd></dl><p><b>bstrClientId: </b>A string that specifies a client
machine name.</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>0xC1FF0209</p>
  <p>WRM_ERR_ACC_DISABLED_FOR_REMOTE_CLIENT</p>
  </td>
  <td>
  <p>WSRM encountered an error in accounting.</p>
  </td>
 </tr><tr>
  <td>
  <p>0xC1FF020C</p>
  <p>WRM_ERR_REMOTE_SERVICE_NOT_SETUP_FOR_REMOTING</p>
  </td>
  <td>
  <p>Connection to the remote server could not be
  established. The server is not set up for remote accounting.</p>
  <p>This error is returned when an accounting client is
  trying to register itself on an accounting server machine which itself is an
  accounting client.<a id="Appendix_A_Target_51"></a><a aria-label="Product behavior note 51" href="1af5b971-a682-44a0-affe-c98947d5e7f7#Appendix_A_51" data-linktype="relative-path">&lt;51&gt;</a></p>
  </td>
 </tr><tr>
  <td>
  <p>0xC1FF0212</p>
  <p>WRM_ERR_INVALID_OPERATION</p>
  </td>
  <td>
  <p>The operation is invalid.</p>
  <p>This error is returned when a WSRM management service
  acting as an accounting client tries to register itself twice, as when this
  method is called with the same <a href="e371cc74-bf4c-4870-8afe-5062cc628b4f#gt_ae2a9876-7fed-4f0d-a390-bf78f76c0736" data-linktype="relative-path">DCOM</a> interface instance. </p>
  </td>
 </tr><tr>
  <td>
  <p>0xC1FF0216</p>
  <p>WRM_ERR_DBSERVER_CANNOT_BE_REMOTE</p>
  </td>
  <td>
  <p>Data cannot be logged on the remote system.</p>
  <p>This error is returned when an accounting client calls
  this method on the accounting server but accounting is not yet initialized.<a id="Appendix_A_Target_52"></a><a aria-label="Product behavior note 52" href="1af5b971-a682-44a0-affe-c98947d5e7f7#Appendix_A_52" data-linktype="relative-path">&lt;52&gt;</a></p>
  </td>
 </tr></tbody></table>
</dd></dl><p>It is possible for multiple WSRM servers to act as
accounting clients and have a common accounting database server. </p><p><b>Note</b>  Remote accounting is not supported in
a workgroup environment.</p><p>Additional <a href="d5942816-752f-480a-9712-38ef0a248b6a" data-linktype="relative-path">IWRMAccounting</a> interface
methods are specified in section 3.2.4.3.</p></div>