Fax Service- Technical overview
Introduction
Personal computers can mimic the operation of fax machines. Computer-based facsimile transmission (faxing) enables people to transmit electronic computer files as faxes to another computer or to a conventional fax machine. To send and receive facsimile transmissions, a computer must be equipped with faxing software and a fax modem , and it must be connected to a telephone line . The faxing software prompts the computer user to enter the fax number of the receiving computer or fax machine. The software compresses the file so it can be transmitted more efficiently, and then sends it to the fax modem. Next, the modem converts digital computer files into analog signals so they can travel via telephone lines.
The fax modem of the receiving computer reconverts the analog telephone signal into a digital computer file. The faxing software on the receiving machine decompresses the file, and then notifies the computer user that a fax has been received. The receiver may choose to either view the fax in its electronic format or print it.
FaxService
What is Fax Service?
The Fax Service is a TAPI-compliant system service that allows users on a network to send and receive faxes from their desktop applications .The service is available on computers that are running Microsoft® Windows® 2000 and later.
The Microsoft® Fax Service included with Microsoft BackOffice® Small Business Server allows the setting up of one to four phone lines in a office, specifically dedicated to sending and receiving faxes through a local area network. Users on the network can fax documents directly from their applications in a manner similar to printing a document on a network printer, except that the routed documents are sent to the fax printer and faxed through the server via the shared modem and phone line.
The Service also offers the following features
- Transmitting of faxes
- Flexible routing of inbound faxes
- Archiving of sent faxes
- Server and device configuration management
Fax Service Client API
Using the Fax Client API, we can write fax-aware client applications in C/C++ for the Win32® environment, and in both Microsoft® Visual Basic® and C/C++ for the COM implementation environment. This technology is available on computers that are running Microsoft® Windows® 2000 and later. The API includes both Win32® functions and an implementation of COM dual interfaces.
Issues regarding Fax Service
To send and receive faxes, all we need is Windows 2000 and a fax device such as a fax modem. The fax device must support fax capabilities and not just data standards. While some modems offer both capabilities, the two are not interchangeable. Fax supports classes 1, 2, and 2.0. However, Fax for Windows 2000 does not support shared fax printers. This means we cannot share our fax printer with other users on a network. (Though there are other third-party tools available, we will be dealing mainly with the Microsoft Fax Service.)
When we attach a fax device such as a fax modem, Windows 2000 detects it at startup and installs the fax service and a fax printer. If these components are not detected at startup, the Add/Remove Hardware wizard can search for and install these components.
Although we can send and receive faxes using more than one fax device, all faxes are filtered through only one fax printer (printer port). Fax allows us to create multiple copies of the fax printer. With each copy, we can define individual printing preferences such as the time of sending, paper size, and orientation. We can also define customized printing preferences such as billing codes, which can be tracked in the fax event log. We can use the "Add a Fax Printer" button in Fax in Control Panel to set up multiple fax printers.
To support the functionality of the fax client COM implementation, the following files are required:
- FaxCom.h
- FaxCom.dll
We split up the whole process into three modules .The modules are as follows
- Sending a Fax
- Tracking the status of faxes
- Monitoring Fax Port Status
Sending a Fax
To send a fax, we have to create an instance of fax server object by using the Visual Basic "Create Object" function. After that, we have to establish a connection with the Active fax server. Here 'Active fax server' means the system with which the fax modem is connected.
After establishing the connection with the active fax server, we need to create FaxDoc object. Next, we have to specify the name of the file to be transmitted, as an argument to the CreateDoc method of FaxServer object.
The FaxDoc object is used to transmit fax documents and cover pages and to retrieve and set information about fax transmission. In this FaxDoc object, there is a method called Send that is used to transmit the document specified by FaxDoc object to the FaxNumber specified by the object. This example should give you an idea how to send the fax
Fax Transmissions
An outbound fax transmission includes the following elements:
- A document file: The fax service converts the data to the Tagged image File Format, class F for facsimile (TIFF6.0).
- Transmission Information: The information includes the fax number, sender and recipient data, an optional billing code, and job scheduling information.
Tracking The Status of Faxes
After sending the fax, we need to confirm whether the fax has been sent or not. For this, we need to employ tracking for the status of faxes. In this, if the file gets transmitted in its first attempt of dialing the Faxmodem, the status of the fax Queue will be changed; otherwise it will try two more times (the exact no. of times can be modified programmatically). For this we have to create FaxJob object, which permits a fax client Visual Basic application to access the job status for incoming and outgoing fax transmissions, and to pause, resume, cancel or restart a fax job.
We can also use the object to retrieve information about fax jobs. The information includes, among other items, the fax number to which the fax server will send the transmission, job attributes, and recipient and sender information. There is one FaxJob object for each queued job associated with the server.
Prior to that, we have to call the GetJobs method of the FaxServer object to create a FaxJobs object on the connected fax server. Using the SetStatus method of Fax Status object, we can change the job status of a specified FaxJob object. We can use this method to pause, resume, cancel, or restart a specified fax job.
Monitoring Port Status
The Fax Status allows our application to keep track of each stage of a fax's sending or receiving progress. Using Get Status method of the FaxPort object, we can create Fax Status object. The FaxStatus object permits a fax client Visual Basic application to retrieve status information for a specific port on a connected fax server.
Before that, we have to create FaxPorts object by calling the GetPorts method of the FaxServer object. Using the Receive property of Fax Status object, we can find whether the specified fax port is currently receiving a fax transmission or not. If this property is a nonzero value, the port is currently receiving a fax.
The Send property of FaxStatus object tells us whether the specified fax port is currently sending a fax transmission. If this property is a nonzero value, the port is currently sending a fax.
The sample code for monitoring Fax status as follows:
Conclusion
"Best Available" FAX FORMAT
With Microsoft Fax service, users with modems can exchange faxes and editable files as easily as printing a document or sending an electronic mail message. Microsoft Fax Service is compatible with the millions of traditional Group 3 fax machines worldwide, yet it provides advanced security and binary file transfer (BFT) features that make sharing information by means of a fax, easier and more powerful. We can send only TIFF, BMP, Microsoft Word (Doc), and Microsoft Excel (xls).
Run-time Requirements
The fax service enables development of applications for Microsoft Windows® 2000. Fax client applications can also run on Windows NT® 4.0, Windows 95, or Windows 98 clients in a Win32 environment. Computers running Microsoft® Windows® Millennium Edition may also act as a Small Business Server 4.5 fax client.

