using Windows Fax Service in C#
Hi there,
I am trying to send a fax in C# using FaxCom.dll. Below is
the code and it works fine.
FAXCOMLib.FaxServerClass fsc = new FAXCOMLib.FaxServerClass
();
fsc.Connect("MyMachineName");
object obj = fsc.CreateDocument(@"Irfan.txt");
FAXCOMLib.FaxDoc fd = (FAXCOMLib.FaxDoc)obj;
fd.FaxNumber = "027905007";
fd.RecipientName = "Irfan";
int i = fd.Send();
This sends the fax, but I have few problems.
1. I am trying to find out the page count of the fax using
FAXCOMLib.FaxJob fj = new FAXCOMLib.FaxJobClass();
int iVal = fj.PageCount;
but when the control comes to this point, it throws an
error saying "COM object with clsid<> is either not valid
or not registered."
I shall appreciate if someone helped me in sorting out
this error.
2. When I send the faxes, the fax is not sent immediately.
it stays in the faxqueue for a while and windows fax
service retries. Could someone tell me what shall i do so
that upon a new request the fax is sent immediately.
thanks,
irfan