Free Web Hosting | free host | Free Web Space | BlueHost Review

WST 20 - Fax Service
Home Up Interests Downloads (New) My Resume Links Feedback

 

Interests
Downloads (New)
My Resume
Links
WST
Feedback

Hi all,

Let's have a look at faxing services in Windows today. Windows NT and above had inbuilt support for faxing, but only 2K and above provide generic API's for this. On NT etc, you need to use the Fax printer. We will see both of these techniques today.

First, the basic requirement of faxing from Windows, is that you should have a modem and of course, it should be connected to a telephone line. The first approach and a better one is to use the provided Fax API's for faxing. All the fax api's begin with Fax, such as FaxSendDocument() etc. The first task is to connect to the local (or remote) fax service. This can be done through FaxConnectFaxServer() API. Look at MSDN for details of this API. You will get a fax handle from this API. Now you can take two approaches for faxing, one is to use the FaxSendDocument() API, which will require the fax number and a document to fax, apart from the fax server handle. Note that only those documents which are registered in your computer can be sent by this API's. This is because the fax server requires to render the documents, and this it can do with the application with which the document or file is registered. So for example, if you have a jpg file to fax, and you don't have any application installed which can read this file, you can't fax this file.

The second approach as I said is to use the fax printers for faxing. You can install a fax printer similar to the way you install a normal printer. Once you have the printer installed, you can use the FaxStartPrintJob() api to fax the document to this printer. Look at MSDN for details about the parameters this API take.

Note that you cannot use any of these API's on Windows 9x/ME and NT. These are not available there. However, on Windows NT, you can install a fax printer and use normal printing functions (StartDoc() etc) to fax documents.

Note also, that these are Fax Service Client API's that we have seen today. Now you can explore about Fax service provider API's, routing extension (fax routing) API's, Fax COM interfaces etc. There are also API's for managing fax jobs etc. So don't forget to explore all these and experiment with them.

Exercises:

1. Read about the Fax service, client API's and explore other sets of API's

2. Since we have covered MAPI already, write an application which combines these two parts, to receive emails, and send them as faxes (similar to email-to-fax services).

3. Read about fax printers, managing fax jobs, listening for incoming faxes etc.

4. Find out how you can send fax directly without fax service through a modem using Serial communication API's and modem commands (note that this is a very complex task, so be prepared for failing a few times).

This is a big area to explore, so give it it's own worth of time and try to understand the underlying concepts about sending faxes , fax modems, fax formats, cover pages and other peripheral things related to faxes.

Thanks for your time,

-Farooque

 

 

HyperCounter
Bpath Counter