3.1.4.1.74 FAX_SetActivityLoggingConfiguration (Opnum 44)

The fax client application calls the FAX_SetActivityLoggingConfiguration (Opnum 44) method to set options for activity logging. This includes setting whether entries for incoming and outgoing faxes SHOULD be logged and the location of the log file.

In response, the server MUST check that the client's fax user account has access to manage server configuration. It MUST validate the logging parameters, including the path that is specified to the log file.

On success, the server MUST apply the specified logging options.

 error_status_t FAX_SetActivityLoggingConfiguration(
   [in] handle_t hFaxHandle,
   [in, ref] const PFAX_ACTIVITY_LOGGING_CONFIGW pActivLogCfg
 );

hFaxHandle: 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.

pActivLogCfg: A pointer to a FAX_ACTIVITY_LOGGING_CONFIGW (section 2.2.25) object. The directory specified by the lpwstrDBPath field of this structure SHOULD be created by the caller if it does not exist.

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 denied. This error code is returned under any of the following conditions:

§ The client's fax user account does not have the required FAX_ACCESS_MANAGE_CONFIG authorization to manage the server configuration.

§ The directory specified by the lpwstrDBPath member of the pActivLogCfg structure is not a valid fax folder (the fax server does not have rights to create files, write to files, enumerate files and/or delete files), the server needs to return FAX_ERR_FILE_ACCESS_DENIED, and the client does not support this error code.

ERROR_INVALID_PARAMETER

0x00000057

This error code is returned under any of the following conditions:

§ The dwSizeOfStruct member of the FAX_ACTIVITY_LOGGING_CONFIGW specified by the pActivLogCfg parameter is set to an incorrect value. The correct size, in bytes, described in the FAX_ACTIVITY_LOGGING_CONFIGW structure.

§ The lpwstrDBPath field of the structure specified by the pActivLogCfg argument contains an empty string or is set to NULL.

§ The lpwstrDBPath member of the structure specified by the pActivLogCfg argument does not indicate a complete path name.

ERROR_BUFFER_OVERFLOW

0x0000006F

The file name is too long. The lpwstrDBPath field of the structure specified by the pActivityLog argument contains a path name longer than 248 characters, not counting the terminating null character.

ERROR_REGISTRY_CORRUPT

0x000003F7

The fax server cannot store the new activity logging configuration in the registry. This error can happen if the registry is corrupted.

FAX_ERR_FILE_ACCESS_DENIED

0x00001B60

This error code is returned under any of the following conditions:

§ The folder specified by the lpwstrDBPath member of the pActivityLog structure is not a valid fax folder where the server has rights to create, enumerate, write to, and delete files.

§ The fax server cannot create a new (if different from the respective existing file) file specified by the lpwstrDBPath member of pActivLogCfg, because the server encountered an access denied (ERROR_ACCESS_DENIED) or sharing violation error (ERROR_SHARING_VIOLATION) when attempting to create the specified file.

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