Programmatically Controlling Windows Fax Services Using VB.net
(Page 1 of 4 )
Windows fax services began to be available in Windows 2003 Server. The service was an advance over the alternatives of the time. As you probably guessed from the title, it can be controlled with a Visual Basic.NET application, which we will begin writing in this article.
Background
Prior to Windows 2003 Server, if you wanted a software-based faxing solution, you had to purchase a commercial offering (such as Genifax) or use an open source product such as Hylfax.
The problems with using these other products is the obvious one of cost, and with the open source products there is always the problem of getting support. As most of them run on the Linux platform the support staff need some knowledge of Unix for troubleshooting and set up purposes.
Then, when Windows 2003 Server was released it came with its own built-in fax services. It has all the features of the commercial products, such as being able to support multiple modems, send email confirmation when the job is sent, receive faxes and route to a mailbox/printer/Folder based on the number it came in on and many more. The difference is that these features are built directly into the operating system.
Another advantage it has is that we can programmatically control it using the FAXCOMEX.dll library. In this article we are going to write an application in Visual Basic.NET that will control the fax service.
Installing the Fax Service on the Server
Before installing the fax services on the machine, it's a good idea to install all the modems you are going to use, so the setup will be able to use them when the service installs. I'm not sure of the maximum number of modems it will support; I think it's six but this might not be accurate.
The first step is installing and setting up the fax service on the server (remember it must be running 2003). This is done in the normal way; go into the control panel, Add/Remove programs, Add/Remove Windows components, then click on the Fax Services option and it will be installed onto your server.
If the set up runs through without any problems, you should have a new folder in the start menu under communications, and if you answered yes during set up to create a shared fax device, you will be able to connect to the server from client machines to send a fax.
Before you go any further, send out a test fax using the Send Fax Wizard in the start menu. This will confirm that it is going to work and there's not any problems with the modems or elsewhere in the system. Send it to a local fax machine so you can see the output.
Next: Setting Up the Fax Server >>
More Visual Basic.NET Articles
More By Luke Niland