|
-
Nov 16th, 2001, 06:01 AM
#1
Thread Starter
Junior Member
Check to see if phone is busy.
Hi There,
I want to check if a phone (modem, ISDN) connected to my computer is available or not, so I can see if I can make a call or not.
It doesn't have to be connected to the internet, but it could also be that I am calling to another person with this device (now why would I do that? ).
Greetz,
Bart
PS: I tried it this way, but I heard this doesn't work with ISDN:
Code:
Public Function ModemBusy(iComPortNo As Integer) As Boolean
Dim iFreeFile As Integer
On Error GoTo ErrorHandling
iFreeFile = FreeFile()
' Open the communications port.
Open "COM" & iComPortNo & ":" For Output As #iFreeFile
' Send attention (AT).
Print #iFreeFile, "AT"
ModemBusy = False
ExitGracefully:
On Error Resume Next
' Close the port.
Close #iFreeFile
Exit Function
ErrorHandling:
ModemBusy = True
Resume ExitGracefully
End Function
Last edited by UrinatinventuM; Nov 16th, 2001 at 06:07 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|