How to get and add FAXCOMLIB to my project? [C#]

Shaitan00

Well-known member
Joined
Aug 11, 2003
Messages
343
Location
Hell
This is a real beginer question and sadly I have to ask it because I have been going around in circles for the part two hours...
So, I want to be able to use the FAXCOMLib to play with sending faxes in C# (alternative to using Office Automation for faxing).

I tried the following directly
Code:
using FAXCOMLib;
using FAXCOMEXLib;
However in both cases I get the following error:
frmMain.cs(8): The type or namespace name FAXCOMLib could not be found (are you missing a using directive or an assembly reference?)
frmMain.cs(9): The type or namespace name FAXCOMEXLib could not be found (are you missing a using directive or an assembly reference?)

So I assume I am missing something - I checked in References (NET and COM) and the only thing I could find that looked slightly relevant was "COM->FaxControl 1.0 Type Library" which allows me to use the FaxControl but not FaxServer.
I did some reading and I think the FAXCOMLIb is part of the "Platform SDK" so I went to the Microsoft Downloads (http://www.microsoft.com/downloads/results.aspx?productid=&freetext=sdk&displaylang=en) and found a bunch of possible choices...
- Platform SDK Redistributable: GDI+
- Microsoft Windows SDK for the February 2006 CTP
...etc...

Is there anyway to confirm that FAXCOMLib is part of "Platform SDK" and not part of another SDK? And which SDK do I need to download and install?
(after that I assume it is just as simple as loading the COM Reference that will have appeared after installing the SDK)
Any help would be greatly appreciated, thanks
 
Im going to re-edit this whole answer,

You need to install your fax services, in windows printers and faxes.

Windows Fax Service must be running to use faxcom.dll (FaxComLib)

In the CS IDE reference the FaxControl 1.0 Type Library, that is where FaxComLib comes from, and it will show up in the references.

progload
 
Last edited by a moderator:
Just another note on this,

I setup a small program to test it:

Code:
using FAXCOMLib;
using FAXCOMEXLib;
 
FaxServerClass fs = new FaxServerClass();
fs.Connect("<your_computer_name>"); //specifies the machinename
object obj = fs.CreateDocument("<your_filename>");
FaxDoc fd = (FaxDoc)obj;
fd.FaxNumber = "<your_fax_number_to_send_to";
fd.RecipientName = "<your_recipients_name";
int i = fd.Send();
MessageBox.Show(i.ToString());
fs.Disconnect();

And came across another problem.

Windows fax service will install without a fax modem installed in the computer.

But the above code will Fail with a "Unknown Interop Error" if you have no modem installed. The only way I could get it to work is by installing a modem.

I thought I would add this, Just in case anyone comes across this problem too.

progload
 

Similar threads

J
Replies
0
Views
133
Jackson_1990
J
J
Replies
0
Views
107
Jackson_1990
J
J
Replies
0
Views
141
Jackson_1990
J
Back
Top