Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using FaxCom.dll to monitor fax lines

Status
Not open for further replies.

jayy66

Programmer
Aug 21, 2006
56
US
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:
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top