Question Problem with sending Fax from Windows Service


New member
Jul 11, 2011
Programming Experience
I am trying to send the fax from my windows service which is written in I am facing problem with windows 7 and windows 2008 Server. It works fine with Windows XP

Fax is not getting visible in fax console's outbox. I saw three files in "C:\ProgramData\Microsoft\Windows NT\MSFax\Queue" for every sent fax but this is not visible in fax queue.

I also observed that, when i am trying to send the fax from windows application then it works but anyhow it is getting failed when i am trying to send that from windows service.

I have following code :

Dim oFaxSvrType As Type = Type.GetTypeFromProgID("FaxcomEx.FaxServer")
Dim oFaxSvr As Object = Activator.CreateInstance(oFaxSvrType)
Dim oFaxDocType As Type = Type.GetTypeFromProgID("FaxcomEx.FaxDocument")

Dim sFaxServerName As String

sFaxServerName = Environment.MachineName.Trim


Dim oFaxDoc As Object = Activator.CreateInstance(oFaxDocType)
With oFaxDoc
.Sender.FaxNumber = "1112223333"
.Body = asfilename
.Sender.Name = "test recipient"
.Sender.OfficePhone = "123456789"
End With

Dim sFaxJobIds() As String = oFaxDoc.ConnectedSubmit(oFaxSvr)
oFaxDoc = Nothing

Catch ex As Exception
Throw New Exception(ex.Message)
' clean up com components
Catch ex As Exception
End Try
oFaxSvr = Nothing
End Try

I observed that in task manager, rundll32.exe is getting started when i tried to run this code from windows application but this rundll32.exe is not getting started when i am trying to run this code from windows service.

I am not getting any exception after executing this code but not able to see the fax on outbox.

I ensured that allow service to interact with desktop in service console is checked for fax service and my own windows service.

I need this little bit urgent. Any help ?
Top Bottom