Win32 Fax Client Programming Tasks

The following steps summarize typical programming tasks required to incorporate the functionality of the Fax Service Client API in a fax client application in the Microsoft Win32 programming environment.

To code a fax client application

  1. Connect to the local fax server using a call to the FaxConnectFaxServer function. For more information, see Connecting to a Fax Server.

  2. Call one or more of the fax service enumeration functions, if necessary. These functions permit viewing fax ports associated with the fax server and the routing information associated with a port. They also permit viewing a list of active fax jobs. The enumeration functions include the FaxEnumGlobalRoutingInfo, FaxEnumJobs, FaxEnumPorts, and FaxEnumRoutingMethods functions.

  3. Obtain the handle to a fax port using a call to the FaxOpenPort function.

  4. Query and modify the routing information for a fax port, if necessary. Use calls to one or more of the following functions: FaxGetRoutingInfo, FaxSetRoutingInfo, and FaxEnableRoutingMethod. For more information, see Managing Fax Routing Data.

  5. Transmit a fax document using calls to the FaxSendDocument function or the FaxSendDocumentForBroadcast function. Note that the application must supply transmission information such as the fax number and recipient data. For more information, see Transmitting Faxes.

  6. Call the FaxFreeBuffer function to free resources allocated previously as the result of a function call by the application. This includes calls to the FaxCompleteJobParams function and functions that begin with FaxEnum or FaxGet. For more information, see Freeing Fax Resources.

  7. Call the FaxClose function twice. The first call disconnects the application from the fax port. The second call disconnects the application from the fax server. For more information, see Disconnecting from a Fax Server.

In addition, the application may need to call other functions to query device or server configuration data, to manage fax jobs, and to print transmissions. For more information, see Fax Server Configuration Management, Fax Device Management, and Managing Fax Jobs.