<div class="content"><p> </p><p>The fax client application calls the <b>FAX_SetExtensionData
(Opnum 50)</b> method in order to write the private data for a routing
extension or routing method for one or all fax devices installed on the fax
server. The corresponding method that the fax client calls to read this private
data is <b>FAX_GetExtensionData</b> (section <span><a href="b585fe59-dd89-42a5-a066-9820d97a34f5" data-linktype="relative-path">3.1.4.1.39</a></span>). The
value for the <i>dwDeviceId</i> parameter can be obtained using either the <b>FAX_EnumPorts </b>(section
<span><a href="7143a58b-d7c5-4353-8857-39c7f708e778" data-linktype="relative-path">3.1.4.1.28</a></span>)
or <b>FAX_EnumPortsEx</b> (section <span><a href="f26e50ab-ed8e-448d-928c-1820f4a42918" data-linktype="relative-path">3.1.4.1.29</a></span>) method.
The <i>lpcwstrNameGUID</i> parameter MUST be for a valid routing extension or
routing method for which the client requests the private data to be written.</p><p>In response, the server MUST validate that the client&#39;s fax
user account has access to manage configuration on the server.</p><p>On success, the server MUST apply the specified private
routing extension data or private routing method data for the specified device.</p><p>When <span><a href="46aba9c4-ebb1-4b10-86ac-4bb3025657b9#gt_efaa1290-6d4b-4f44-9e84-35a867069d45" data-linktype="relative-path">routing</a></span> method
configuration data is specified, <i>lpcwstrNameGUID</i> MUST contain the GUID
of the corresponding routing method.</p><dl>
<dd>
<div><pre> error_status_t FAX_SetExtensionData(
   [in] handle_t hFaxHandle,
   [in, string] LPCWSTR lpcwstrComputerName,
   [in] DWORD dwDeviceId,
   [in, string] LPCWSTR lpcwstrNameGUID,
   [in, ref, size_is(dwDataSize)] LPBYTE pData,
   [in, range(0,FAX_MAX_RPC_BUFFER)] 
     DWORD dwDataSize
 );
</pre></div>
</dd></dl><p><b>hFaxHandle: </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 <span><a href="5cbfd38d-7a14-4560-ad24-9ed78f19a3bb" data-linktype="relative-path">3.1.4.1.10</a></span>)
or <b>FAX_ConnectionRefCoun</b>t (section <span><a href="a92941ac-bd07-4a71-af85-c2c157c97cf9" data-linktype="relative-path">3.1.4.1.11</a></span>) method
call used to connect to the fax server.</p><p><b>lpcwstrComputerName: </b>A null-terminated
character string that SHOULD hold the name of the client computer.</p><p><b>dwDeviceId: </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 of the unique device identifier. A value of zero indicates the caller
needs to set a named data BLOB that is not associated with any specific device.
This value can be used to store configurations that affect all the devices. For
example, an Optical Character Recognition (OCR) routing extension might export
several different routing methods that all rely on the same OCR parameters.
This routing extension can associate the OCR configuration with a non-specific
device so that it becomes global.</p><p><b>lpcwstrNameGUID: </b>A curly-braced GUID string
that identifies the data to set. The GUID can identify a routing extension or a
routing method. Because GUIDs are unique, the server determines from the
specific GUID value whether the call is requesting to set routing extension
data or routing method data. If some data is already set for the specified <span><a href="46aba9c4-ebb1-4b10-86ac-4bb3025657b9#gt_f49694cc-c350-462d-ab8e-816f0103c6c1" data-linktype="relative-path">GUID</a></span>,
the fax server SHOULD replace it with the new data that is pointed to by the <i>pData</i>
parameter.</p><p><b>pData: </b>A pointer to the data buffer to set.
For the default routing methods described in the Default Routing Methods
(section <span><a href="89220226-b68e-4d97-96ef-ce622145ecfa" data-linktype="relative-path">2.2.87</a></span>) this data
is a null-terminated character string containing an EmailID, Printer, or Folder
name. For other routing extensions or methods the format of this data depends
on the respective routing extension or routing method and SHOULD be treated as
opaque binary data by the fax server.</p><p><b>dwDataSize: </b>A <b>DWORD</b> value that
indicates the size, in bytes, of the <i>pData</i> buffer. The maximum size is <b>FAX_MAX_RPC_BUFFER</b> (section
<span><a href="8bb4ba82-db45-44ea-9caa-af64d7448e6d" data-linktype="relative-path">2.2.82</a></span>).</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 required FAX_ACCESS_MANAGE_CONFIG authorization for this
  operation.</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:<a id="Appendix_A_Target_161"></a><a aria-label="Product behavior note 161" href="056171e7-80bc-45ff-8107-66ba3abb2023#Appendix_A_161" data-linktype="relative-path">&lt;161&gt;</a></p>
  <p><span>§<span>  
  </span></span>The <i>lpcwstrComputerName</i> parameter is set to a NULL
  pointer value.</p>
  <p><span>§<span>  
  </span></span>The <i>lpcwstrNameGUID</i> parameter is set to a NULL pointer
  value.</p>
  <p><span>§<span>  
  </span></span>The <i>pData</i> parameter is set to a NULL pointer value.</p>
  <p><span>§<span>  
  </span></span>The <i>dwDataSize</i> parameter is set to zero.</p>
  <p><span>§<span>  
  </span></span>The <i>lpcwstrNameGUID</i> parameter holds an invalid
  curly-braced GUID string.</p>
  </td>
 </tr><tr>
  <td>
  <p>ERROR_REGISTRY_CORRUPT</p>
  <p>0x000003F7</p>
  </td>
  <td>
  <p>The registry is corrupted. The structure of one of the
  files that contain registry data is corrupted, or the system&#39;s memory image
  of the file is corrupted, or the file could not be recovered because the
  alternate copy or log was absent or corrupted.</p>
  </td>
 </tr></tbody></table>
</dd></dl><p><b>Exceptions Thrown:</b> No exceptions are thrown
except those that are thrown by the underlying <span><a href="46aba9c4-ebb1-4b10-86ac-4bb3025657b9#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a></span> protocol <span><a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a></span>.</p></div>