FaxEnumRoutingMethodsA function (winfax.h)

The FaxEnumRoutingMethods function enumerates all fax routing methods for a specific fax device. The function returns information about each routing method to a fax client application.

Syntax

WINFAXAPI BOOL FaxEnumRoutingMethodsA(
  [in]  HANDLE               FaxPortHandle,
  [out] PFAX_ROUTING_METHODA *RoutingMethod,
  [out] LPDWORD              MethodsReturned
);

Parameters

[in] FaxPortHandle

Type: HANDLE

Specifies a fax port handle returned by a call to the FaxOpenPort function.

[out] RoutingMethod

Type: PFAX_ROUTING_METHOD*

Pointer to the address of a buffer to receive an array of FAX_ROUTING_METHOD structures. Each structure contains information about one fax routing method. The data includes, among other items, the name of the DLL that exports the routing method, the GUID and function name that identify the routing method, and the method's user-friendly name.

For information about memory allocation, see the following Remarks section. For information about fax routing methods, see About the Fax Routing Extension API.

[out] MethodsReturned

Type: LPDWORD

Pointer to a DWORD variable to receive the number of FAX_ROUTING_METHOD structures the FaxEnumRoutingMethods function returns in the RoutingMethod parameter.

Return value

Type: BOOL

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.

Return code Description
ERROR_ACCESS_DENIED
Access is denied. FAX_PORT_QUERY access is required.
ERROR_INVALID_PARAMETER
One or all of the MethodsReturned, RoutingMethod, or FaxPortHandle parameters are NULL.
ERROR_NOT_ENOUGH_MEMORY
An error occurred during memory allocation.

Remarks

A fax administration application typically calls the FaxEnumRoutingMethods function to query the fax routing methods associated with a particular device. A call to the FaxSetRoutingInfo function changes the routing information for a particular fax routing method.

The FaxEnumGlobalRoutingInfo function retrieves routing information that applies globally to the fax server, such as routing priority. An application can modify global data with a call to the FaxSetGlobalRoutingInfo function.

The FaxEnumRoutingMethods function allocates the memory required for the FAX_ROUTING_METHOD buffer array pointed to by the RoutingMethod parameter. An application must call the FaxFreeBuffer function to deallocate the resources associated with this parameter.

For more information, see Fax Server Configuration Management and Freeing Fax Resources.

Note

The winfax.h header defines FaxEnumRoutingMethods as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header winfax.h
Library WinFax.lib

See also

FAX_GLOBAL_ROUTING_INFO

FAX_ROUTING_METHOD

Fax Service Client API Functions

Fax Service Client API for Windows 2000

FaxEnableRoutingMethod

FaxEnumGlobalRoutingInfo

FaxFreeBuffer

FaxGetRoutingInfo

FaxOpenPort

FaxSetGlobalRoutingInfo

FaxSetRoutingInfo