<div class="content"><p> </p><p>The <b>FaxObs_ConnectionRefCount (Opnum 0)</b> method is
called by the client to connect to or disconnect from the server.</p><p>In response the server MUST connect to or disconnect from
the client.</p><p>If this call is successfully made with a <i>Connect</i>
argument value of Connect (0x00000001), the client SHOULD retain the RPC
binding handle used for the <i>hBinding</i> argument and reuse it as the RPC
binding handle input argument for all subsequent fax server calls made, until
the connection with the server is disconnected.</p><dl>
<dd>
<div><pre> error_status_t FaxObs_ConnectionRefCount(
   [in] handle_t hBinding,
   [in, out] PRPC_FAX_SVC_HANDLE Handle,
   [in] DWORD Connect,
   [out] LPDWORD CanShare
 );
</pre></div>
</dd></dl><p><b>hBinding: </b>The RPC binding handle that is
provided by the client <span><a href="46aba9c4-ebb1-4b10-86ac-4bb3025657b9#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a></span> layer when the
RPC call is made. If <i>Connect</i> is set to Disconnect (0x00000000), the
client SHOULD reuse the RPC binding handle used for the <b>FaxObs_ConnectionRefCount</b>
call used to connect to the fax server.</p><p><b>Handle: </b>The connection handle that references
a connection between the client and the server. If <i>Connect</i> is set to
0x00000001 (Connect), a new handle is returned in this parameter. Otherwise,
this parameter MUST be set to a handle returned from a previous call to this
method.</p><p><b>Connect: </b>A <b>DWORD</b> (<span><a href="../ms-dtyp/cca27429-5689-4a16-b2b4-9325d93e4ba2" data-linktype="relative-path">[MS-DTYP]</a></span>
section <span><a href="../ms-dtyp/262627d8-3418-4627-9218-4ffe110850b2" data-linktype="relative-path">2.2.9</a></span>)
value that specifies connection information.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Value/code</p>
   </th>
   <th>
   <p>Meaning</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>Disconnect</p>
  <p>0x00000000</p>
  </td>
  <td>
  <p>Close the Fax Server connection.</p>
  <p>The handle specified in <i>Handle</i> MUST have been
  returned by a previous call to <b>FaxObs_ConnectionRefCount</b> with a <i>Connect</i>
  value of 0x00000001 (Connect). After this call, the handle in <i>Handle</i>
  will be invalid and MUST NOT be used in any subsequent calls. </p>
  </td>
 </tr><tr>
  <td>
  <p>Connect</p>
  <p>0x00000001</p>
  </td>
  <td>
  <p>Connect to the Fax Server.</p>
  </td>
 </tr></tbody></table>
</dd></dl><p><b>CanShare: </b>The fax server MUST return a nonzero
value in the <b>DWORD</b> referenced by this parameter if the fax <span><a href="46aba9c4-ebb1-4b10-86ac-4bb3025657b9#gt_569f1f1c-f426-46fa-91d2-3d1eb0b19aa1" data-linktype="relative-path">print
queues</a></span> can be shared as described in section <span><a href="bd422bcf-7ce8-4576-addb-89345ea84f9f" data-linktype="relative-path">3.1.1</a></span>,
and a zero value otherwise.<a id="Appendix_A_Target_183"></a><a aria-label="Product behavior note 183" href="056171e7-80bc-45ff-8107-66ba3abb2023#Appendix_A_183" data-linktype="relative-path">&lt;183&gt;</a></p><p><b>Return Values: </b>This method MUST return
0x00000000 (ERROR_SUCCESS) for success; otherwise, it MUST return one of the
fax-specific errors that are defined in section <span><a href="cbe6c4fb-4dda-4f6c-9701-0d490ba0d105" data-linktype="relative-path">2.2.52</a></span> or one of
the other standard errors defined in <span><a href="../ms-erref/1bc92ddf-b79e-413c-bbaa-99a5281a6c90" data-linktype="relative-path">[MS-ERREF]</a></span>
section <span><a href="../ms-erref/18d8fbe8-a967-4f1c-ae50-99ca8e491d2d" data-linktype="relative-path">2.2</a></span>.
There are no predefined specific error codes to be returned by this method.</p><p><b>Exceptions Thrown:</b> No exceptions are thrown
except those that are thrown by the underlying RPC protocol, <span><a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a></span>.</p></div>