<div class="content" name="FAX_OpenConnection" uuid="6a8d8440-25a7-49aa-a4a1-7043b040dde4"><p>The <b>FAX_OpenConnection (Opnum 0)</b> method returns the
context handle that is supplied by the <b>FAX_StartServerNotification</b>
family of calls. This is done to provide a security layer, by verifying that
the notifications are coming from an expected source.</p><p>In response, the fax client (acting as an <a href="46aba9c4-ebb1-4b10-86ac-4bb3025657b9#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a> server for this call)
SHOULD validate the notification context referred by the Context argument to
ensure this is a valid notification context previously submitted by the fax
client to a <b>FAX_StartServerNotification</b> (section <a href="693ea4ae-60cd-4043-b775-1a1f19920cbb" data-linktype="relative-path">3.1.4.1.100</a>), <b>FAX_StartServerNotificationEx</b> (section
<a href="b73163aa-5f4b-45b3-9c5b-f95077f103c2" data-linktype="relative-path">3.1.4.1.101</a>), or <b>FAX_StartServerNotificationEx2</b> (section
<a href="55770fa2-8c93-40c1-a56e-2c17e8ff707b" data-linktype="relative-path">3.1.4.1.102</a>) method
call through the argument with the same name (Context). The fax client MUST
validate whether the fax server (acting as an RPC client for this call) uses an
authentication scheme better than RPC_C_AUTHN_LEVEL_PKT_PRIVACY. An RPC client
always uses a packet <a href="46aba9c4-ebb1-4b10-86ac-4bb3025657b9#gt_bfb9708e-9d05-4f79-8969-ef63f73aa434" data-linktype="relative-path">authentication
level</a>, as specified in <a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a>
section <a href="../ms-rpce/dc0b2fa4-2d1d-49c7-8d93-43736725b55b" data-linktype="relative-path">3.3.1.5.2</a>.</p><p>On success, the fax client MUST open a notification session
to the fax server and MUST return the same <i>Context</i> in the FaxHandle
argument that was passed by the fax server in the FaxHandle argument.</p><dl>
<dd>
<div><pre> error_status_t FAX_OpenConnection(
   [in] handle_t hBinding,
   [in] unsigned __int64 Context,
   [out] PRPC_FAX_HANDLE FaxHandle
 );
</pre></div>
</dd></dl><p><b>hBinding: </b>Handle provided by the client RPC
layer when the RPC call is made.</p><p><b>Context: </b>A <b>ULONG64</b> (<a href="../ms-dtyp/cca27429-5689-4a16-b2b4-9325d93e4ba2" data-linktype="relative-path">[MS-DTYP]</a>
section <a href="../ms-dtyp/32862b84-f6e6-40f9-85ca-c4faf985b822" data-linktype="relative-path">2.2.51</a>)
containing a context information handle. This handle SHOULD match the one
supplied to the server when using the <b>FAX_StartServerNotification</b> family
of calls. For more information, see the following topics:</p><p><span>§<span>  </span></span><b>FAX_StartServerNotification</b></p><ul><li><p><span><span> 
</span></span><b>FAX_StartServerNotificationEx</b></p>
</li><li><p><span><span> 
</span></span><b>FAX_StartServerNotificationEx2</b></p>
</li></ul><p><b>FaxHandle: </b>A pointer to an RPC_FAX_HANDLE
indicating a context handle to open. This value is used in other fax client
calls.</p><dl>
<dd>
<p>This method MUST return 0x00000000 (ERROR_SUCCESS)
for success; otherwise, it MUST return one of the following error codes, one of
the fax-specific errors that are defined in section <a href="cbe6c4fb-4dda-4f6c-9701-0d490ba0d105" data-linktype="relative-path">2.2.52</a>, or one of the
other standard errors defined in [MS-ERREF] section <a href="../ms-erref/18d8fbe8-a967-4f1c-ae50-99ca8e491d2d" data-linktype="relative-path">2.2</a>.</p>
</dd>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Return value/code</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>ERROR_ACCESS_DENIED 0x00000005</td>
  <td>The method requires at least packet-level privacy. The server checks the authentication level of the client. If it is less than RPC_C_AUTHN_LEVEL_PKT_PRIVACY, refuse access. Or there are other access-related problems.</td>
 </tr><tr>
  <td>ERROR_INVALID_PARAMETER 0x00000057</td>
  <td>An invalid AssyncInfo structure is pointed to by the Context parameter or there are parameter-related problems.</td>
 </tr></tbody></table>
</dd></dl><p><b>Exceptions Thrown:</b> No exceptions are thrown
except those thrown by the underlying RPC protocol, [MS-RPCE].</p><p>The returned PRPC_FAX_HANDLE is the <i>Context</i> parameter
cast to a HANDLE. </p><p>The <b>FAX_OpenConnection</b> method returns the context
handle supplied by the <b>FAX_StartServerNotification</b> family of calls. This
is done to provide a security layer, by verifying that the notifications are
coming from an expected source. </p></div>