FaxEnumGlobalRoutingInfoA function (winfax.h)

The FaxEnumGlobalRoutingInfo function enumerates all fax routing methods associated with a specific fax server. The function returns to the fax client application fax routing method information that applies globally to the server, such as routing priority.

Syntax

WINFAXAPI BOOL FaxEnumGlobalRoutingInfoA(
  [in]  HANDLE                    FaxHandle,
  [out] PFAX_GLOBAL_ROUTING_INFOA *RoutingInfo,
  [out] LPDWORD                   MethodsReturned
);

Parameters

[in] FaxHandle

Type: HANDLE

Specifies a fax server handle returned by a call to the FaxConnectFaxServer function.

[out] RoutingInfo

Type: PFAX_GLOBAL_ROUTING_INFO*

Pointer to the address of a buffer to receive an array of FAX_GLOBAL_ROUTING_INFO structures. Each structure contains information about one fax routing method, as it pertains to the entire fax service. The data includes, among other items, the priority for the fax routing method, and the name of the DLL that exports the routing method. It also includes 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.

[out] MethodsReturned

Type: LPDWORD

Pointer to a DWORD variable to receive the number of FAX_GLOBAL_ROUTING_INFO structures the function returns in the RoutingInfo parameter. This number equals the total number of fax routing methods installed on the target server.

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_CONFIG_QUERY access is required.
ERROR_INVALID_PARAMETER
One or all of the MethodsReturned, RoutingInfo or FaxHandle parameters are NULL.
ERROR_NOT_ENOUGH_MEMORY
An error occurred during memory allocation.

Remarks

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

An application can call the FaxEnumRoutingMethods function to enumerate the fax routing methods associated with a particular device.

The FaxEnumGlobalRoutingInfo function allocates the memory required for the FAX_GLOBAL_ROUTING_INFO buffer array pointed to by the RoutingInfo parameter. An application must call the FaxFreeBuffer function to deallocate the resources associated with this parameter. For more information, see Freeing Fax Resources and Managing Fax Routing Data.

Note

The winfax.h header defines FaxEnumGlobalRoutingInfo as an alias which 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 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 Service Client API Functions

Fax Service Client API for Windows 2000

FaxConnectFaxServer

FaxEnumRoutingMethods

FaxFreeBuffer

FaxSetGlobalRoutingInfo