Hello everyone,
Im trying to view ports on a fax server to determine if they are in free or being used. I tried using FaxCom.dll and faxcomex.dll with no luck.
Here is my code usind faxcom.dll:
the error occurs at fp = faxSvr.GetPorts but there is no confirmation that I am successfully connecting to the server in the line before.
Does anybody know why this error is occuring??
Or better yet, does anybody know of a alternative way of doing this??
Thankx
Im trying to view ports on a fax server to determine if they are in free or being used. I tried using FaxCom.dll and faxcomex.dll with no luck.
Here is my code usind faxcom.dll:
Code:
Dim faxSvr As New FAXCOMLib.FaxServer
Dim fs As FAXCOMLib.FaxStatus
Dim fp As FAXCOMLib.FaxPorts
Dim IsRecieving As Integer
Dim IsSending As Integer
Dim counter As Integer
Dim freePort As Integer = 0
faxSvr.Connect(Server)
fp = faxSvr.GetPorts
For counter = 1 To fp.Count
fs = fp.Item(counter)
IsRecieving = fs.Receive
IsSending = fs.Send
If IsRecieving > 0 And IsSending > 0 Then
'freeport remains unchanged
Else
freePort = freePort + 1
End If
Next
faxSvr.Disconnect()
Return freePort
the error occurs at fp = faxSvr.GetPorts but there is no confirmation that I am successfully connecting to the server in the line before.
Does anybody know why this error is occuring??
Or better yet, does anybody know of a alternative way of doing this??
Thankx