<div class="content"><p> </p><p>A fax client application uses the <b>FAX_SetPort (Opnum 12)</b>
method to set fax device information. The function sets extension configuration
properties that are stored at the device level, such as enabling or disabling
sending and receiving, and the auto or manual answering of calls.</p><p>In response, the server MUST validate whether the
FaxPortHandle argument that is passed by the client refers to a port handle
that is obtained by a call to <b>FAX_OpenPort</b> (section <span><a href="aca2b58a-e310-42dc-9903-18c5b6c35797" data-linktype="relative-path">3.1.4.1.65</a></span>)
with the PORT_OPEN_MODIFY port access mode flag specified with the <i>Flags</i>
argument. The server MUST validate whether the client&#39;s fax user account has
access to modify the properties of this port. On success, the server MUST
modify the properties of the port as specified by the client.<a id="Appendix_A_Target_165"></a><a aria-label="Product behavior note 165" href="056171e7-80bc-45ff-8107-66ba3abb2023#Appendix_A_165" data-linktype="relative-path">&lt;165&gt;</a></p><dl>
<dd>
<div><pre> error_status_t FAX_SetPort(
   [in] RPC_FAX_PORT_HANDLE FaxPortHandle,
   [in] const FAX_PORT_INFO* PortInfo
 );
</pre></div>
</dd></dl><p><b>FaxPortHandle: </b>An <span><a href="46aba9c4-ebb1-4b10-86ac-4bb3025657b9#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a></span> context handle
that references a specified fax port.</p><p><b>PortInfo: </b>A pointer to a <b>FAX_PORT_INFO</b>
(section <span><a href="2b46d16c-e74a-4e3b-b50c-0b94f78bebd0" data-linktype="relative-path">2.2.7</a></span>) structure.
The structure (except the <b>State</b> field, which has no purpose for this
call and which the fax server SHOULD ignore) contains data to modify the
configuration of the specified fax port. The client MUST set the <b>SizeofStruct</b>
member of this structure to the correct size described in section 2.2.7 before
it calls the <b>FAX_SetPort</b>.</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 <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><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Return value/code</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>ERROR_ACCESS_DENIED</p>
  <p>0x00000005</p>
  </td>
  <td>
  <p>Access is denied. The client&#39;s fax user account does
  not have the FAX_ACCESS_MANAGE_CONFIG fax access right.</p>
  </td>
 </tr><tr>
  <td>
  <p>ERROR_INVALID_DATA</p>
  <p>0x0000000D</p>
  </td>
  <td>
  <p>The handle specified by the <i>FaxPortHandle</i>
  argument is not a valid fax port handle obtained by a call to <b>FAX_OpenPort</b>.<a id="Appendix_A_Target_166"></a><a aria-label="Product behavior note 166" href="056171e7-80bc-45ff-8107-66ba3abb2023#Appendix_A_166" data-linktype="relative-path">&lt;166&gt;</a></p>
  </td>
 </tr><tr>
  <td>
  <p>ERROR_INVALID_PARAMETER</p>
  <p>0x00000057</p>
  </td>
  <td>
  <p>The parameter is incorrect. This error code is
  returned if any of the following conditions are met:</p>
  <p><span>§<span>  
  </span></span>The pointer specified by the <i>PortInfo</i> argument is NULL.</p>
  <p><span>§<span>  
  </span></span>The handle specified by the <i>FaxPortHandle</i> argument is
  NULL.</p>
  <p><span>§<span>  
  </span></span>The requested value of the <i>Priority</i> member of the <i>PortInfo</i>
  parameter is 0, or is greater than the total number of installed fax devices.</p>
  <p><span>§<span>  
  </span></span>The size of the <i>PortInfo</i> argument specified in the <b>SizeOfStruct</b>
  field is not the correct size, in bytes, for the <b>FAX_PORT_INFO</b>.</p>
  <p><span>§<span>  
  </span></span>When FAX_ERR_DEVICE_NUM_LIMIT_EXCEEDED is to be returned, but
  the fax client does not support this error code (the fax client API version
  described in section <span><a href="5cbfd38d-7a14-4560-ad24-9ed78f19a3bb" data-linktype="relative-path">3.1.4.1.10</a></span> is
  FAX_API_VERSION_0).</p>
  </td>
 </tr><tr>
  <td>
  <p>FAX_ERR_DEVICE_NUM_LIMIT_EXCEEDED</p>
  <p>0x00001B62</p>
  </td>
  <td>
  <p>The fax server cannot complete the operation because
  all of the following conditions are true: </p>
  <p>If the fax server has an implementation-dependent
  maximum number of supported devices set<a id="Appendix_A_Target_167"></a><a aria-label="Product behavior note 167" href="056171e7-80bc-45ff-8107-66ba3abb2023#Appendix_A_167" data-linktype="relative-path">&lt;167&gt;</a> and
  the number of fax devices currently connected to the server is equal to or
  exceeds this maximum number of supported devices.</p>
  <p>The device is not send, receive, or manual-receive
  enabled.</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></div>