<div class="content"><p> </p><p>The <b>FAX_GetExtensionData (Opnum 49)</b> method is called
by the client to retrieve the private configuration data for a fax routing
extension or a routing method. Such private configuration data is written with
a <b>FAX_SetExtensionData</b> (section <span><a href="eb6d732d-5025-4bb6-9671-e61553bc2d9b" data-linktype="relative-path">3.1.4.1.79</a></span>) call.
The <i>lpcwstrNameGUID</i> parameter MUST be for a valid <span><a href="46aba9c4-ebb1-4b10-86ac-4bb3025657b9#gt_efaa1290-6d4b-4f44-9e84-35a867069d45" data-linktype="relative-path">routing</a></span>
extension or routing method for which the client requests the private data. The
value for the <i>dwDeviceId</i> parameter can be obtained from 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 the <b>FAX_EnumPortsEx</b> (section <span><a href="f26e50ab-ed8e-448d-928c-1820f4a42918" data-linktype="relative-path">3.1.4.1.29</a></span>)
methods.</p><p>In response, the server MUST validate that the client&#39;s fax
user account has the access rights required to query the configuration data. It
MUST then allocate memory for the routing extension data to be passed out and
fill it with data.</p><p>To indicate success, the server MUST return the buffer that
contains the routing extension data, along with the buffer size.</p><p>The client SHOULD free the buffer.</p><dl>
<dd>
<div><pre> error_status_t FAX_GetExtensionData(
   [in] handle_t hFaxHandle,
   [in] DWORD dwDeviceId,
   [in, string, ref] LPCWSTR lpcwstrNameGUID,
   [out, size_is(, *lpdwDataSize)] 
     LPBYTE* ppData,
   [out, ref] LPDWORD lpdwDataSize
 );
</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_ConnectionRefCount</b> (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>dwDeviceId: </b>The device identifier. A value of
zero indicates the caller requests 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 would become global.</p><p><b>lpcwstrNameGUID: </b>A curly-braced <span><a href="46aba9c4-ebb1-4b10-86ac-4bb3025657b9#gt_f49694cc-c350-462d-ab8e-816f0103c6c1" data-linktype="relative-path">GUID</a></span>
string that identifies the data to return. 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 routing extension
data or routing method data. </p><p><b>ppData: </b>A pointer to an allocated private data
buffer. This buffer contains the data that is returned by the fax server. For
the default routing methods described in 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>lpdwDataSize: </b>A pointer to 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 that returns the size, in bytes, of the data that is pointed to by the <i>ppData</i>
parameter.</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_FILE_NOT_FOUND</p>
  <p>0x00000002</p>
  </td>
  <td>
  <p>The fax server cannot find the requested data.</p>
  </td>
 </tr><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 access rights (<b>FAX_ACCESS_QUERY_CONFIG</b>) required 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_109"></a><a aria-label="Product behavior note 109" href="056171e7-80bc-45ff-8107-66ba3abb2023#Appendix_A_109" data-linktype="relative-path">&lt;109&gt;</a></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>ppData</i> parameter is set to a NULL pointer value.</p>
  <p><span>§<span>  
  </span></span>The <i>lpdwDataSize</i> parameter is set to a NULL pointer
  value.</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>