3.1.4.1.72 FAX_RemoveOutboundRule (Opnum 57)

The FAX_RemoveOutboundRule (Opnum 57) method removes an existing outbound routing rule from the rules map. The default outbound rule cannot be removed.

In response, the server MUST validate that the client's fax user account has access to manage configuration. The country/region code MUST NOT be 0, because the country/region code indicates that the access corresponds to any country/region.

On success, the server MUST remove the specified outbound routing rule from the rules map.

 error_status_t FAX_RemoveOutboundRule(
   [in] handle_t hFaxHandle,
   [in] DWORD dwAreaCode,
   [in] DWORD dwCountryCode
 );

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.

dwAreaCode: The area code of the rule. The combination of the dwAreaCode and dwCountryCode parameters are a unique key.

dwCountryCode: The country code of the rule. The combination of dwAreaCode and dwCountryCode are a unique key.

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 access rights to perform this operation.

ERROR_INVALID_PARAMETER

0x00000057

The parameter is incorrect. The country code specified by the dwCountryCode argument is ROUTING_RULE_COUNTRY_CODE_ANY.

Also returned if 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_REGISTRY_CORRUPT

0x000003F7

The fax server encountered a registry error when attempting to remove the specified outbound rule registration. The registry could be corrupt.

FAX_ERR_RULE_NOT_FOUND

0x00001B5D

The fax server failed to locate an outbound routing rule by country/region code and area code.

FAX_ERR_NOT_SUPPORTED_ON_THIS_SKU

0x00001B63

The fax server is running on a version of the operating system that does not support the requested operation.<151>

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