<div class="content"><p> </p><p>The <b>FAX_ClientEventQueueEx (Opnum 3)</b> method is called
by the fax server (acting as an <span><a href="46aba9c4-ebb1-4b10-86ac-4bb3025657b9#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a></span> client for this
call) when it needs to deliver an extended fax event to the fax client (acting
as an RPC server for this call). The fax client registers for notifications
with the fax server by calling either <b>FAX_StartServerNotificationEx</b>
(section <span><a href="b73163aa-5f4b-45b3-9c5b-f95077f103c2" data-linktype="relative-path">3.1.4.1.101</a></span>) or <b>FAX_StartServerNotificationEx2</b>
(section <span><a href="55770fa2-8c93-40c1-a56e-2c17e8ff707b" data-linktype="relative-path">3.1.4.1.102</a></span>). In
this call, the fax client MUST pass a fax client notification context, which
the fax server MUST pass back to the fax client when it sends an event. This is
done to provide a security layer, by verifying that the notifications are
coming from an expected source.</p><p>Data in <b>FAX_ClientEventQueueEx</b> is serialized.
Pointers to variable-size data (such as strings) are replaced with offsets from
the beginning of the buffer. </p><p>In response, the fax client MUST validate the notification
context in the hClientContext argument, which is sent by the fax server, to
ensure that this is a valid notification context created with a successful <b>FAX_OpenConnection</b> (section
<span><a href="6a8d8440-25a7-49aa-a4a1-7043b040dde4" data-linktype="relative-path">3.2.4.5</a></span>)
method call for which <b>FAX_CloseConnection</b> (section <span><a href="71fcdc39-0e2a-4025-96f8-f96d81d8694b" data-linktype="relative-path">3.2.4.4</a></span>)
was not already successfully called. If the validation fails, the fax client
MUST abort the operation and MUST return ERROR_SUCCESS. If the notification
context is valid, the fax client MUST accept notifications for fax client
events.</p><dl>
<dd>
<div><pre> error_status_t FAX_ClientEventQueueEx(
   [in, ref] RPC_FAX_HANDLE hClientContext,
   [in, ref, size_is(dwDataSize)] const LPBYTE lpbData,
   [in] DWORD dwDataSize
 );
</pre></div>
</dd></dl><p><b>hClientContext: </b>A fax data type indicating a
context handle for this call.</p><p><b>lpbData: </b>A pointer to a <b>FAX_EVENT_EX</b> (section
<span><a href="3a9ae7f7-9825-43cd-aa78-1c077fd99bd2" data-linktype="relative-path">2.2.67</a></span>)
or <b>FAX_EVENT_EX_1</b> (section <span><a href="425c3686-00b8-493d-bba5-d4ce677e47db" data-linktype="relative-path">2.2.68</a></span>) structure.
The data is serialized. Pointers to variable size data (such as strings) are
replaced with offsets from the beginning of the buffer. Since the client is to
be notified of each event separately, in this case ORing of events is not
allowed.</p><p>If the client requested extended events by calling <b>FAX_StartServerNotificationEx</b>,
the client MUST use a <b>FAX_EVENT_EX</b>. If the client called FAX_StartServerNotificationEx2 to
receive these events, the client MUST use a <b>FAX_EVENT_EX_1</b>.</p><p><b>dwDataSize: </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>)
containing the size of the buffer pointed to by the <i>lpbData</i> parameter.</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 <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>.</p>
</dd>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Return value/code</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>ERROR_INVALID_DATA</p>
  <p>0x0000000D</p>
  </td>
  <td>
  <p>The <b>hClientContext</b> handle is not a valid
  subscription context handle returned by <b>FAX_StartServerNotificationEx</b>
  or <b>FAX_StartServerNotificationEx2</b>.<a id="Appendix_A_Target_218"></a><a aria-label="Product behavior note 218" href="056171e7-80bc-45ff-8107-66ba3abb2023#Appendix_A_218" data-linktype="relative-path">&lt;218&gt;</a></p>
  </td>
 </tr><tr>
  <td>
  <p>ERROR_OUTOFMEMORY</p>
  <p>0x0000000E</p>
  </td>
  <td>
  <p>The fax client needs to make a copy of the data
  provided by the fax server in the <b>lpbData</b> buffer, and the fax client
  failed to allocate <b>dwDataSize</b> bytes to hold this copy.</p>
  </td>
 </tr><tr>
  <td>
  <p>ERROR_INTERNAL_ERROR</p>
  <p>0x0000054F</p>
  </td>
  <td>
  <p>The fax client failed to recognize the custom
  marshaled <b>FAX_EVENT_EX</b> or <b>FAX_EVENT_EX_1</b> provided by the fax
  server in the <b>lpbData</b> buffer.</p>
  </td>
 </tr></tbody></table>
</dd></dl><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><p>Data in FAX_ClientEventQueueEx is serialized. Pointers to
variable size data (such as strings) are replaced with offsets from the
beginning of the buffer.</p></div>