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 Win32 programming environment.
To code a fax client application
- Connect to a fax server using a call to the FaxConnectFaxServer function. Note that the application must supply the name of the server, unless the server is on the local computer. For more information, see Connecting to a Fax Server.
- 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.
- Obtain the handle to a fax port using a call to the FaxOpenPort function.
- 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.
- 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.
- 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.
- 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.