3.1.4.1.86 FAX_SetOutboundRule (Opnum 58)

A fax client application uses the FAX_SetOutboundRule (Opnum 58) method to set the information about an individual fax outbound routing rule.

In response, the server MUST validate that the client's fax user account has access to set an outbound routing rule. On success, the server MUST modify its outbound routing rule as specified by the client.

 error_status_t FAX_SetOutboundRule(
   [in] handle_t hFaxHandle,
   [in, ref] RPC_FAX_OUTBOUND_ROUTING_RULEW* pRule
 );

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.

pRule: A pointer to an RPC_FAX_OUTBOUND_ROUTING_RULEW (section 2.2.41) buffer to set.

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 FAX_ACCESS_MANAGE_CONFIG authorization for this operation.

ERROR_INVALID_PARAMETER

0x00000057

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

§ The lpwstrGroupName member of the Destination member of the pRule parameter is set to a NULL pointer value.

§ The dwDeviceId member of the Destination member of pRule is set to zero.

§ The fax server tried to return FAX_ERR_NOT_SUPPORTED_ON_THIS_SKU but the client fax API version (FAX_API_VERSION_0 (described in section 3.1.4.1.10) does not support this error code.

ERROR_BUFFER_OVERFLOW

0x0000006F

The length (excluding the terminating null character) of the character string pointed at by the lpwstrGroupName member of the Destination member of pRule is greater than 128 characters.

ERROR_REGISTRY_CORRUPT

0x000003F7

The registry is corrupted. The structure of one of the files containing 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.

FAX_ERR_BAD_GROUP_CONFIGURATION

0x00001B5B

This error code is returned if any of the following conditions occur:

§ The fax server encountered an outbound routing group with a bad configuration, or the group device list is empty.

§ The status for the outbound routing rule object indicated by the specified dialing location (the dwCountryCode and dwAreaCode members of pRule) and group name (the lpwstrGroupName member of the Destination member of pRule) is FAX_GROUP_STATUS_ALL_ DEV_NOT_VALID or FAX_RULE_STATUS_EMPTY_GROUP.

FAX_ERR_NOT_SUPPORTED_ON_THIS_SKU

0x00001B63

The fax client module API version (described in section 3.1.4.1.10) is FAX_API_VERSION_1 or above, and the fax server is running on a version of the operating system that does not support the requested operation.<164>

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