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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with modem access through VB

Status
Not open for further replies.

Mavors

Programmer
Aug 28, 2000
43
US
I am trying to automate a process that dials up a system through the modem to modem connection. It needs to provide a User Login name, then a password. After successful login then I can transfer a file and logout.

I know a script of some sort will do this, but I am unsure where to start.

I am new to this sort of processing so any tips or information anyone can give will be greatly appreciated

Thanx in advance,
Mavors
Cincinnati, Ohio
 
Date: 1/11/2001
Versions: VB5 VB6 Level: Intermediate
Author: The VB2TheMax Team
If TAPI libraries are installed on your machine, you can easily dial a number from a VB application using a single API call. Here's a function that encapsulates the call and that returns True if the dialing was successful:

Private Declare Function tapiRequestMakeCall Lib "TAPI32.DLL" (ByVal Dest As _
String, ByVal AppName As String, ByVal CalledParty As String, _
ByVal Comment As String) As Long

' make a phone call using TAPI
' return True if successfull

Function PhoneCall(ByVal PhoneNumber As String, ByVal DestName As String, _
Optional ByVal Comment As String) As Boolean
If tapiRequestMakeCall(Trim$(PhoneNumber), App.Title, Trim$(DestName), _
Comment) = 0 Then
PhoneCall = True
End If
End Function

This code works on Windows 95, Windows 98, Windows NT 4 SP3 or later, and Windows 2000, and requires TAPI 1.3 libraries or a later version.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top