<div class="content" name="FAX_SetArchiveConfiguration" uuid="74e92e24-b311-4b74-9a4b-fad99383682d"><p>The fax client application calls the <b>FAX_SetArchiveConfiguration
(Opnum 42)</b> method to set the <a href="46aba9c4-ebb1-4b10-86ac-4bb3025657b9#gt_9394bf31-7db9-433c-8d3d-ee6a37bf0848" data-linktype="relative-path">archive</a> configuration for a
specific fax folder on the fax server.</p><p>In response, the server MUST validate that the client&#39;s fax
user account has access to manage server configuration. On success, the server
MUST set the specified configuration and return success.</p><p>Protocol version FAX_API_VERSION_3 (0x00030000) fax servers
SHOULD fail this call by returning ERROR_NOT_SUPPORTED (0x00000032). The fax
client SHOULD NOT call this method if the protocol version reported by the
server is FAX_API_VERSION_3 (0x00030000). For more information, see <b>FAX_ConnectFaxServer</b> (section
<a href="5cbfd38d-7a14-4560-ad24-9ed78f19a3bb" data-linktype="relative-path">3.1.4.1.10</a>). The fax
client SHOULD call <b>FAX_SetGeneralConfiguration</b> (section <a href="34e02038-9f56-4c51-abfa-e404cf3b2ffd" data-linktype="relative-path">3.1.4.1.80</a>) instead.</p><dl>
<dd>
<div><pre> error_status_t FAX_SetArchiveConfiguration(
   [in] handle_t hFaxHandle,
   [in] FAX_ENUM_MESSAGE_FOLDER Folder,
   [in, ref] const LPBYTE pArchiveCfg
 );
</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> 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>Folder: </b>The archive location. The client MUST
set this parameter to either FAX_MESSAGE_FOLDER_INBOX or
FAX_MESSAGE_FOLDER_SENTITEMS.</p><p><b>pArchiveCfg: </b>A pointer to a buffer containing
an array of <b>FAX_ARCHIVE_CONFIGW</b> (section <a href="942483fa-960c-4463-8ea2-4fb0c99c1749" data-linktype="relative-path">2.2.27</a>) structures. If the
size of the archive exceeds the <b>dwSizeQuotaHighWatermark</b> value and if
the <b>bSizeQuotaWarning</b> member is set to TRUE, an event log warning SHOULD
be issued. If an event log warning was already issued, no more events SHOULD be
issued until the size of the archive drops below the <b>dwSizeQuotaLowWatermark</b>
value. If a fax message stays in the archive longer than the <b>dwAgeLimit</b>
value, it MAY be automatically deleted. If the <b>dwAgeLimit</b> value is zero,
the time limit MUST NOT be used.</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 (section <a href="cbe6c4fb-4dda-4f6c-9701-0d490ba0d105" data-linktype="relative-path">2.2.52</a><span>)</span>, or one of the other standard errors (<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. The client&#39;s fax user account does not have the required FAX_ACCESS_MANAGE_CONFIG authorization for this operation.</td>
 </tr><tr>
  <td>ERROR_NOT_SUPPORTED 0x00000032</td>
  <td>The fax server does not support this operation. This error code SHOULD be returned by the FAX_API_VERSION_3 servers.</td>
 </tr><tr>
  <td>ERROR_INVALID_PARAMETER 0x00000057</td>
  <td>The parameter is incorrect. This error code is returned under any of the following conditions: § The dwSizeOfStruct member of the FAX_ARCHIVE_CONFIGW specified by the pArchiveCfg parameter is set to an incorrect value. § The Folder parameter is set to a value other than FAX_MESSAGE_FOLDER_SENTITEMS and FAX_MESSAGE_FOLDER_INBOX. § The bUseArchive member of the FAX_ARCHIVE_CONFIGW specified by pArchiveCfg is set to TRUE, and any of the three following conditions are also met:   § The value of the dwSizeQuotaHighWatermark member of the same structure is smaller than the value of the dwSizeQuotaLowWatermark member.   § The lpcstrFolder member of the same structure is set to NULL.   § The lpcstrFolder member of the same structure is set to point to an empty character string.</td>
 </tr><tr>
  <td>ERROR_BUFFER_OVERFLOW 0x0000006F</td>
  <td>The file name is too long. The bUseArchive member of the FAX_ARCHIVE_CONFIGW specified by pArchiveCfg is set to a value of TRUE, and the length of the file name specified by the lpcstrFolder of the same structure is set to a character string longer than 180 characters, excluding the length of the null terminator.</td>
 </tr><tr>
  <td>ERROR_REGISTRY_CORRUPT 0x000003F7</td>
  <td>The fax server cannot store the new archive configuration to the registry. The registry could be corrupted.</td>
 </tr><tr>
  <td>FAX_ERR_DIRECTORY_IN_USE 0x00001B5F</td>
  <td>The bUseArchive member of the FAX_ARCHIVE_CONFIGW specified by pArchiveCfg is set to a value of TRUE, and the file specified by the lpcstrFolder member of the same structure is invalid: the directory of the file is the same as the fax queue directory.</td>
 </tr><tr>
  <td>FAX_ERR_FILE_ACCESS_DENIED 0x00001B60</td>
  <td>The bUseArchive member of the FAX_ARCHIVE_CONFIGW specified by pArchiveCfg is set to a value of TRUE, and the file specified by the lpcstrFolder member of the same structure is invalid: the fax server encountered an access denied (ERROR_ACCESS_DENIED) or a sharing violation (ERROR_SHARING_VIOLATION) error when attempting to access the file.</td>
 </tr></tbody></table>
</dd></dl><p><b>Exceptions Thrown:</b> No exceptions are thrown
except those that are thrown by the underlying <a href="46aba9c4-ebb1-4b10-86ac-4bb3025657b9#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a> protocol <a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a>.</p></div>