Platform SDK: Fax Services

FaxEnumGlobalRoutingInfo

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.

BOOL WINAPI FaxEnumGlobalRoutingInfo(
  HANDLE FaxHandle,       //handle to the fax server
  PFAX_GLOBAL_ROUTING_INFO *RoutingInfo, 
                          //buffer to receive global routing structures
  LPDWORD MethodsReturned //number of global routing structures returned
);

Parameters

FaxHandle
[in] Specifies a fax server handle returned by a call to the FaxConnectFaxServer function.
RoutingInfo
[out] 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.
MethodsReturned
[out] 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 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_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.

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, FaxFreeBuffer, FaxEnumRoutingMethods, FaxSetGlobalRoutingInfo, FaxConnectFaxServer, FAX_GLOBAL_ROUTING_INFO