3.1.4.1.76 FAX_SetConfiguration (Opnum 20)

The fax client application calls the FAX_SetConfiguration (Opnum 20) method to change the general configuration of the fax server. The FAX_CONFIGURATIONW (section 2.2.28) structure describes the general configuration of the fax server.

In response, the server MUST validate that the client's fax user account has access to manage configuration on the server. On success, the server MUST set the specified configuration parameters.

 error_status_t FAX_SetConfiguration(
   [in] handle_t hBinding,
   [in] const FAX_CONFIGURATIONW* FaxConfig
 );

hBinding: The RPC binding handle for this call. The client SHOULD reuse the RPC binding handle used as an input hBinding argument for the FAX_ConnectFaxServer (section 3.1.4.1.10) or FAX_ConnectionRefCount (section 3.1.4.1.11) method call used to connect to the fax server.

FaxConfig: A pointer to a FAX_CONFIGURATIONW. The SizeOfStruct member of this structure MUST be set to the correct size, in bytes, of the FAX_CONFIGURATIONW described in section 2.2.28. The structure MUST be passed as a byte array buffer. The structure MUST be present at the start of the buffer. The LPCWSTR fields in the structure MUST store the offsets to the actual string data, which MUST be located at the end of the structure. The LPCWSTR strings located at the end of the buffer MUST be in the same order of occurrence in the structure.  If the Branding structure member is TRUE, the fax server SHOULD generate a brand that contains transmission-related information, such as the transmitting subscriber identifier, date, time, and page count. If the UseDeviceTsid structure member is TRUE, the server SHOULD use the device's transmitting subscriber identifier. If the ServerCp structure member is TRUE, the client SHOULD use a common cover page stored on the fax server; if this member is FALSE, the client SHOULD use a personal cover page template. If the PauseServerQueue structure member is TRUE, the server SHOULD pause the outgoing fax queue. If the ArchiveOutgoingFaxes structure member is TRUE, the server SHOULD archive transmissions in the directory specified by the ArchiveDirectory member. The fax server SHOULD ignore the ArchiveDirectory structure member if the ArchiveOutgoingFaxes member is FALSE. If the ArchiveOutgoingFaxes member is TRUE, the fax server SHOULD<155> validate the value of the ArchiveDirectory member, and if this validation succeeds, the fax server SHOULD retain the value of the ArchiveDirectory member and use this value as the name of the directory where the fax server will archive the future fax transmissions. The fax server SHOULD retain the discount time period submitted by the client with the StartCheapTime and the StopCheapTime structure members.<156>

Return Values: 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 2.2.52, or one of the other standard errors defined in [MS-ERREF] section 2.2.

Return value/code

Description

ERROR_ACCESS_DENIED

0x00000005

Access is denied. The client's fax user account does not have the required access rights, in this case FAX_ACCESS_MANAGE_CONFIG.

ERROR_INVALID_PARAMETER

0x00000057

The parameter is incorrect. This error code is returned under any of the following conditions:

§ The pointer specified with the FaxConfig argument is NULL.<157>

§ The dwSizeOfStruct member of the FAX_CONFIGURATIONW specified by the FaxConfig parameter is different from the correct size, in bytes, for the FAX_CONFIGURATIONW, described in section 2.2.28.

§ The ArchiveOutgoingFaxes member of the FAX_CONFIGURATIONW specified by FaxConfig is set to TRUE, and the ArchiveDirectory member of the same data structure is set to a NULL pointer value.<158>

ERROR_REGISTRY_CORRUPT

0x000003F7

The registry is corrupted. The structure of one of the files that contain registry data is corrupted, or the system'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.

Exceptions Thrown: No exceptions are thrown except those that are thrown by the underlying RPC protocol [MS-RPCE].