David M.
March 10th, 2003, 11:29 AM
Hi All,
I am a .Net newbie needing a little help here. I am trying to send fax from a client machine on local network. Our fax server is functioning properly. The Client machine is XP Pro with fax components installed.
Heres the code:
Dim CheckFax As FAXCONTROLLib.FaxControlClass = New FAXCONTROLLib.FaxControlClass()
If CheckFax.IsFaxServiceInstalled Then
Dim FaxServer As FAXCOMLib.FaxServerClass = New FAXCOMLib.FaxServerClass()
Dim FaxMachine As String = "myserver"
Dim FaxDoc As FAXCOMLib.FaxDoc
Dim FileName As String = "C:\test.txt"
Dim FaxNumber As String = "11111111111"
FaxServer.Connect("\\" & FaxMachine)
FaxDoc = FaxServer.CreateDocument(FileName)
FaxDoc.FaxNumber = FaxNumber
FaxDoc.Send()
The fax server and number are not substituted for showing. I recieve this error on FaxDoc.Send() method:
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in BGB Inc Purchase Orders.exe
Additional information: The handle is invalid.
Please help!
I am a .Net newbie needing a little help here. I am trying to send fax from a client machine on local network. Our fax server is functioning properly. The Client machine is XP Pro with fax components installed.
Heres the code:
Dim CheckFax As FAXCONTROLLib.FaxControlClass = New FAXCONTROLLib.FaxControlClass()
If CheckFax.IsFaxServiceInstalled Then
Dim FaxServer As FAXCOMLib.FaxServerClass = New FAXCOMLib.FaxServerClass()
Dim FaxMachine As String = "myserver"
Dim FaxDoc As FAXCOMLib.FaxDoc
Dim FileName As String = "C:\test.txt"
Dim FaxNumber As String = "11111111111"
FaxServer.Connect("\\" & FaxMachine)
FaxDoc = FaxServer.CreateDocument(FileName)
FaxDoc.FaxNumber = FaxNumber
FaxDoc.Send()
The fax server and number are not substituted for showing. I recieve this error on FaxDoc.Send() method:
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in BGB Inc Purchase Orders.exe
Additional information: The handle is invalid.
Please help!