Click here to Skip to main content
15,887,454 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I use the following code for sending a FAX:
protected void Page_Load(object sender, EventArgs e) 
{ 
if (!IsPostBack)
{ FaxDocument(@"E:\ss.doc", "04428257363"); 
} 
} public int FaxDocument(String TheFile, string faxnumber)
{
int JobID = 0; FAXCOMEXLib.FaxServer faxsrv = new FAXCOMEXLib.FaxServerClass(); 
try 
{ faxsrv.Connect(Environment.MachineName); FaxDocumentClass faxdoc = new FAXCOMEXLib.FaxDocumentClass();
//*** How can I add 2 or more attachments to my fax Body with the use of one coverpage?
 faxdoc.Body = @"E:\ss.doc"; //****************************************************************************************** 
faxdoc.Priority = FAX_PRIORITY_TYPE_ENUM.fptNORMAL; faxdoc.CoverPageType = FAXCOMEXLib.FAX_COVERPAGE_TYPE_ENUM.fcptLOCAL; 
faxdoc.CoverPage = "TestCoverPage"; 
faxdoc.ScheduleType = FAXCOMEXLib.FAX_SCHEDULE_TYPE_ENUM.fstNOW;
faxdoc.DocumentName = "Fax Transmission"; faxdoc.Recipients.Add(faxnumber, "Lexicon"); 
faxdoc.AttachFaxToReceipt = false; 
faxdoc.Note = "Here is the info you requested"; 
faxdoc.Subject = "Today's fax"; 
faxdoc.ConnectedSubmit(faxsrv); 
} 
catch (Exception ex)
{
Response.Write(ex.Message);
} 
finally 
{
faxsrv.Disconnect();
}
return JobID;
}
}

However, I get the following error:
Retrieving the COM class factory for component with CLSID {CDA8ACB0-8CF5-4F6C-9BA2-5931D40C8CAE} failed due to the following error: 80040154.


Any help into solving this error is greatly appreciated.
Posted
Updated 17-May-11 0:43am
v2

1 solution

This is indicating that the 3rd party lib that you are using to send the fax cannot be started because:

1. It isn't resigered / installed on your system.
2. Some other component the third party lib uses is not installed.

There are a whole raft of app that will help you find what dependencies the lib requires...

Take a look here for some useful utils...

SysInternals

'listdlls' and 'procexp' may be useful...
 
Share this answer
 
Comments
gowthammanju 17-May-11 7:46am    
i tried by linking above com files in to project but it also gives me error
Rhuros 17-May-11 8:16am    
its not a case of linking them in the project, you need to ensure that the component has been registered on the system. Using regsvr32 with the lib will register it.

Do a google search for regsvr32....
gowthammanju 17-May-11 8:58am    
can u provide any sample codings link for sending and receiving fax reg............waiting for ur responce
Rhuros 17-May-11 9:19am    
first off I don't know what the executable name is of your library so you'll have to fill that bit in yourself...

1. Open a cmmand window
2. Go to the directory where the library exe is.
3. Run regsvr32.exe e.g. regsvr32 /i <your library="" exe="" name="">

this will pop up a messagebox indicating whether this has succeeded or not.. If it hasn't succeeded then I suggest you going back to the vendor of the library and get proper installation instructions...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900