Platform SDK: Fax Services

FaxEnableRoutingMethod

The FaxEnableRoutingMethod function enables or disables a fax routing method for a specific fax device. A fax administration application typically calls this function for device management.

BOOL WINAPI FaxEnableRoutingMethod(
  HANDLE FaxPortHandle,  // fax port handle
  LPCTSTR RoutingGuid,   // GUID that identifies the fax routing method
  BOOL Enabled           // fax routing method enable/disable flag
);

Parameters

FaxPortHandle
[in] Specifies a fax port handle returned by a call to the FaxOpenPort function.
RoutingGuid
[in] Pointer to a constant null-terminated character string that specifies the GUID that uniquely identifies the fax routing method of interest.

For information about fax routing methods, see About the Fax Routing Extension API. For information about the relationship between routing methods and GUIDs, see Fax Routing Methods.

Enabled
[in] Specifies a Boolean variable that indicates whether the application is enabling or disabling the fax routing method specified by the RoutingGuid parameter. If this parameter is TRUE, the application is enabling the routing method; if this parameter is FALSE, the application is disabling the routing method.

Return Values

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError. GetLastError can return one of the following errors.

Error code Description
ERROR_INVALID_PARAMETER One or both of the FaxPortHandle or RoutingGuid parameters are NULL.
ERROR_INVALID_DATA The RoutingGuid parameter is invalid.
ERROR_ACCESS_DENIED Access is denied. FAX_PORT_SET access is required.

Remarks

A fax client application can call the FaxEnableRoutingMethod function to enable a fax routing method for a particular fax device. It can also call the function to disable a routing method enabled by a prior call to FaxEnableRoutingMethod or by the fax service administration application. For more information, see Managing Fax Routing Data.

Call the FaxOpenPort function to obtain a valid port handle to specify in the FaxPortHandle parameter.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable with BackOffice Small Business Server.
  Header: Declared in Winfax.h.
  Library: Included as a resource in Winfax.dll.
  Unicode: Implemented as Unicode and ANSI versions on all platforms.

See Also

Fax Service Client Application Programming Interface Overview, Fax Service Client API Functions, FaxOpenPort, FaxRouteMethod, FaxEnumRoutingMethods