<div class="content" name="FAX_StartServerNotificationEx" uuid="b73163aa-5f4b-45b3-9c5b-f95077f103c2"><p>The <b>FAX_StartServerNotificationEx (Opnum 74)</b> method
is called by the client to get notification about extended or legacy events. On
success, the server MUST start to notify the fax client about the occurring fax
events.</p><dl>
<dd>
<div><pre> error_status_t FAX_StartServerNotificationEx(
   [in] handle_t hBinding,
   [in, string, ref] LPCWSTR lpcwstrMachineName,
   [in, string, ref] LPCWSTR lpcwstrEndPoint,
   [in] ULONG64 Context,
   [in, ref, string] LPCWSTR lpcwstrProtSeq,
   [in] BOOL bEventEx,
   [in] DWORD dwEventTypes,
   [out, ref] PRPC_FAX_EVENT_EX_HANDLE lpHandle
 );
</pre></div>
</dd></dl><p><b>hBinding: </b>The RPC binding handle for this
call. The client SHOULD reuse the RPC binding handle used as an input <i>hBinding</i>
argument for the <b>FAX_ConnectFaxServer</b> (section <a href="5cbfd38d-7a14-4560-ad24-9ed78f19a3bb" data-linktype="relative-path">3.1.4.1.10</a>) or <b>FAX_ConnectionRefCount</b> (section
<a href="a92941ac-bd07-4a71-af85-c2c157c97cf9" data-linktype="relative-path">3.1.4.1.11</a>) method call
used to connect to the fax server.</p><p><b>lpcwstrMachineName: </b>A pointer to a string
containing the name of the fax client machine. The machine name MUST be NULL
for a local machine and an <a href="46aba9c4-ebb1-4b10-86ac-4bb3025657b9#gt_1769aec9-237e-44ed-9014-1abb3ec6de6e" data-linktype="relative-path">FQDN</a>
for a remote machine.</p><p><b>lpcwstrEndPoint: </b>A pointer to a string
containing the client machine <a href="46aba9c4-ebb1-4b10-86ac-4bb3025657b9#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a>
server <a href="46aba9c4-ebb1-4b10-86ac-4bb3025657b9#gt_b91c1e27-e8e0-499b-8c65-738006af72ee" data-linktype="relative-path">endpoint</a> string.
The endpoint MUST be a TCP port between 1024 and 65534 (in increments of 10).</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/2dc4c492-95db-4fa6-ae2b-8546b13c9141" data-linktype="relative-path">2.2.54</a>)
value that can be passed to <b>FAX_OpenConnection</b> (section <a href="6a8d8440-25a7-49aa-a4a1-7043b040dde4" data-linktype="relative-path">3.2.4.5</a>) as a notification
context.</p><p><b>lpcwstrProtSeq: </b>A pointer to a string
containing the fax client RPC server&#39;s protocol sequence string. The protocol
used for sending the notifications is always TCP/IP. The protocol sequence
string MUST be ncalrpc for local and respectively ncan_ip_tcp for remote. <a id="Appendix_A_Target_174"></a><a aria-label="Product behavior note 174" href="056171e7-80bc-45ff-8107-66ba3abb2023#Appendix_A_174" data-linktype="relative-path">&lt;174&gt;</a></p><p><b>bEventEx: </b>A Boolean value that indicates which
notification method to use for notifications. If set to <b>TRUE</b>, the
registration is for extended events (<b>FAX_EVENT_EX</b> (section <a href="3a9ae7f7-9825-43cd-aa78-1c077fd99bd2" data-linktype="relative-path">2.2.67</a>)). If <b>FALSE</b>,
the registration is for legacy events (<b>FAX_EVENT</b> (section <a href="26974d69-9306-4683-b4b8-23fda467e717" data-linktype="relative-path">2.2.66</a>)).</p><p><b>dwEventTypes: </b>A <b>DWORD</b> ([MS-DTYP]
section <a href="../ms-dtyp/262627d8-3418-4627-9218-4ffe110850b2" data-linktype="relative-path">2.2.9</a>)
value containing bitwise OR combination of <b>FAX_ENUM_EVENT_TYPE</b> (section
<a href="bc289dcf-1675-403e-9060-bb2743fe0352" data-linktype="relative-path">2.2.63</a>) event type
flags, events the client needs to receive. During registration the client is
allowed to register for multiple events, so that if any of them occur the
client will get a notification. Hence bitwise ORing of events is allowed in
this case. For more information, see <b>FAX_ENUM_EVENT_TYPE</b>.</p><p><b>lpHandle: </b>The returned <a href="46aba9c4-ebb1-4b10-86ac-4bb3025657b9#gt_34431739-568a-4d53-b449-2a771383922e" data-linktype="relative-path">subscription context</a>
handle. This handle can be used in the <b>FAX_EndServerNotification</b> (section
<a href="59663586-4f1a-4f10-a548-c9b088995028" data-linktype="relative-path">3.1.4.1.17</a>) method.</p><p><b>Return Values: </b>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 <a href="../ms-erref/1bc92ddf-b79e-413c-bbaa-99a5281a6c90" data-linktype="relative-path">[MS-ERREF]</a>
section <a href="../ms-erref/18d8fbe8-a967-4f1c-ae50-99ca8e491d2d" data-linktype="relative-path">2.2</a>.</p><dl>
<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>Access is denied. This error code is returned under any of the following conditions: § The value specified for the dwEventTypes argument contains the FAX_EVENT_TYPE_NEW_CALL and/or FAX_EVENT_TYPE_IN_QUEUE flags and the caller cannot access unsigned faxes: incoming faxes are not public and the caller does not have the FAX_ACCESS_MANAGE_RECEIVE_FOLDER rights. § The value specified for the dwEventTypes argument contains the FAX_EVENT_TYPE_CONFIG, FAX_EVENT_TYPE_DEVICE_STATUS and/or the FAX_EVENT_TYPE_ACTIVITY flags and the caller does not have the FAX_ACCESS_QUERY_CONFIG rights.</td>
 </tr><tr>
  <td>ERROR_BAD_FORMAT 0x0000000B</td>
  <td>This error code is returned under any of the following conditions: § The length of the fax client machine name specified by the lpcwstrMachineName argument, excluding the length of the terminating null character, is longer than 256 characters. § The length of the endpoint string specified by the lpcwstrEndPoint argument, excluding the length of the terminating null character, is longer than or equal to 11 characters.</td>
 </tr><tr>
  <td>ERROR_OUTOFMEMORY 0x0000000E</td>
  <td>Not enough storage is available to complete this operation.</td>
 </tr><tr>
  <td>ERROR_INVALID_PARAMETER 0x00000057</td>
  <td>Invalid parameter. This error code is returned under any of the following conditions: § Any of these arguments specify a NULL pointer value: lcpwstrEndPoint, lpcwstrMachineName, lpHandle.&lt;175&gt; § The value specified for the dwEventTypes argument is not a bitwise OR combination of the following FAX_ENUM_EVENT_TYPE values:   § FAX_EVENT_TYPE_IN_QUEUE   § FAX_EVENT_TYPE_OUT_QUEUE   § FAX_EVENT_TYPE_CONFIG   § FAX_EVENT_TYPE_ACTIVITY   § FAX_EVENT_TYPE_QUEUE_STATE   § FAX_EVENT_TYPE_IN_ARCHIVE   § FAX_EVENT_TYPE_OUT_ARCHIVE   § FAX_EVENT_TYPE_FXSSVC_ENDED   § FAX_EVENT_TYPE_DEVICE_STATUS   § FAX_EVENT_TYPE_NEW_CALL</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, <a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a>.</p><p>A fax client calls <b>FAX_StartServerNotificationEx</b> to
inform the server that it needs to receive the notifications of extended or
legacy fax events. The fax server SHOULD call <b>FAX_OpenConnection</b> on
the client by using the supplied endpoint, protocol sequence information, and
context handle information. The server then sends notification of events to the
client by using either <b>FAX_ClientEventQueueEx</b> (section <a href="d1ec6615-73e1-4c86-aef9-c738c71f08d1" data-linktype="relative-path">3.2.4.3</a>) or <b>FAX_ClientEventQueue</b> (section
<a href="c123443a-b672-4bce-ad30-50d2eb4d6cf9" data-linktype="relative-path">3.2.4.2</a>) as specified
by the <i>bEventEx</i> parameter. When the client no longer needs to receive
notifications, it calls <b>FAX_EndServerNotification</b>; the server SHOULD
call <b>FAX_CloseConnection</b> (section <a href="71fcdc39-0e2a-4025-96f8-f96d81d8694b" data-linktype="relative-path">3.2.4.4</a>) to close the
connection.</p></div>