[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 264
  • Last Modified:

ras

how can i establish a ras or just a simple connection with an isdn ta (v120, v110) and an analog modem to a provider, in visual basic 5?
0
MASSheep
Asked:
MASSheep
  • 4
  • 3
1 Solution
 
mcriderCommented:
Well, you can launch the Dialup connection by running the command "Rundll Rnaui.dll,RnaDial <Dialup name>" in a shell... for example:

id=shell("Rundll Rnaui.dll,RnaDial Erol's Internet")


Cheers!
0
 
MASSheepAuthor Commented:
it's correct what you told me but it's not i want to know.
maybe i was not exact enough.
imagin the following thing:

i want to establish a connection via a modem. to do so i have to open the comport and send at-commands (eg 'atdt 0041 0900 900 941'), handshake, usr, pwd and so on...
and the other side of course has to reply. and the same thing with isdn (icluding protocol).

i hope you can help me.

regars,

mas-sheep
0
 
mcriderCommented:
For that, you need to use the MSCOMM control.  To add it to your project, right-click the Toolbox and select "Components..." then select "Microsoft Comm Control" (MSCOMM32.OCX) from the list.

There is a pretty good help page for the control.

Here is an example of how to use the control:

' Buffer to hold input string
      Dim Instring As String
      ' Use COM1.
      MSComm1.CommPort = 1
      ' 9600 baud, no parity, 8 data, and 1 stop bit.
      MSComm1.Settings = "9600,N,8,1"
      ' Tell the control to read entire buffer when Input
      ' is used.
      MSComm1.InputLen = 0
      ' Open the port.
      MSComm1.PortOpen = True
      ' Send the attention command to the modem.
      MSComm1.Output = "AT" + Chr$(13)
      ' Wait for data to come back to the serial port.

Do
            DoEvents
      Loop Until MSComm1.InBufferCount >= 2
      ' Read the "OK" response data in the serial port.
      Instring = MSComm1.Input
      ' Close the serial port.
      MSComm1.PortOpen = False


To Dial a phone number, once the port is open, you can send something like this:

MSComm1.Output = "ATDT 5551212" & vbCrLf




Hope this helps!


Cheers!
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
mcriderCommented:
Thanks for the points! Glad I could help!


Cheers!
0
 
MASSheepAuthor Commented:
this was my first question... and i don't know how much points are ok for such a question...
0
 
mcriderCommented:
The EE guidelines for assigning points are:

50 - easy question
100 - medium question
200+ -hard question

This was a medium to hard question...


Cheers!
0
 
MASSheepAuthor Commented:
then i should have give you 5 points :-)
thank you for that.
i have got 600 experts points already!!
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now