Click here to Skip to main content
15,886,788 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi ...
I'm trying to write a Fax program using C#.NET.
In SendFax section of codes I succeed in write codes for sending faxes,but I didn't know how to understand about sent fax status.
I searched in Google and I could know something about it,but in my program the codes didn't worked and it has a error:

Retrieving the COM class factory for component with CLSID {55DABFD4-5C9E-11D1-B791-000000000000} failed due to the following error: 80040154.


I have indicated the lines that have error below:
using FAXCOMEXLib;
using FAXCOMLib;
.
.
.   
    FAXCOMLib.FaxServer fs = new FAXCOMLib.FaxServerClass();
// error occurs here
    FAXCOMLib.FaxJobsClass fj = new FAXCOMLib.FaxJobsClass();
    FAXCOMLib.FaxStatusClass fst = new FAXCOMLib.FaxStatusClass();
    FAXCOMLib.FaxPortClass fp = new FAXCOMLib.FaxPortClass();
    int send = 0;
            
    fp = (FaxPortClass) fs.GetPorts();
    fst = (FaxStatusClass)fp.GetStatus();

    fs.Connect("Hedayati-PC"); //specifies the machine name
    FAXCOMLib.FaxDoc faxDoc = (FAXCOMLib.FaxDoc)fs.CreateDocument(txtFileLocation.Text);
    send = faxDoc.Send();           

.
.
.
etc


My OS is Windows Seven 64bits and I set the compile platform to x86.
Please guide me the correct way.
Thanks very much!

====================== Update ===============================
My problem isn't solved yet.
I think my FaxComLib.DLL isn't work correctly.I tried to register it in my Windows 7 but it shows an error: 0x8002801c to me. I test it by Dependency Walker and it has an Error. I search in google several of hours but I could't find any fresh FaxComLib.DLL file.
Please help me in this case.

Thank you.
Posted
Updated 9-Mar-11 20:22pm
v3
Comments
Richard MacCutchan 20-Feb-11 4:10am    
Are you sure your fax library DLL has been properly registered?
BahramHedayati 10-Mar-11 2:12am    
I think my DLL is not work correctly

Take a look at this:
http://social.msdn.microsoft.com/forums/en/vbgeneral/thread/88a6ea68-f476-4231-822f-27fabe59f458[^] - I think it will help you to figure it out :)

Remember that registering the dll's in Windows 7 requires administrative privileges, often requiring you to run the registration process using “Run as administrator” option.

Regards
Espen Harlinn
 
Share this answer
 
v2
Comments
BahramHedayati 1-Mar-11 0:12am    
Thanks for your answer. My problem dosen't solved yet.
Espen Harlinn 1-Mar-11 12:27pm    
The error message is what you usually get when the component is not registered, or if the dll implmenting the component fails to load - this may happen when the system is unable to find dll' used by the dll implmenting the component. You can try using dependency walker (http://www.dependencywalker.com/) to determine if this is the case - just load the dll implmenting the com component.
BahramHedayati 10-Mar-11 0:52am    
Thanks Espen! you guide me very good.
I test my dll by this software and it has error while opening.I test another dll and write the result for you.
Thank you
BahramHedayati 10-Mar-11 2:16am    
My problem isn't solved yet.
I think my FaxComLib.DLL isn't work correctly. I test it by Dependency Walker and it has an Error. I search in google several of hours but I could't find any fresh FaxComLib.DLL file.
Please help me in this case.
Thank you.
Espen Harlinn 10-Mar-11 9:49am    
Try reinstalling the windows fax service
Anyone can't answer my question? really?!!
 
Share this answer
 

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