Solved

Automating Dial-up Networking in WinNT

Posted on 1998-05-28
16
221 Views
Last Modified: 2013-12-03
Does anyone know how to automate dial-up networking from a C/C++/Visual Basic/Visual Foxpro program?
0
Comment
Question by:mgonyea
  • 8
  • 5
  • 3
16 Comments
 
LVL 11

Accepted Solution

by:
alexo earned 50 total points
Comment Utility
Check RasDial() and friends.
0
 
LVL 11

Expert Comment

by:alexo
Comment Utility
0
 
LVL 1

Author Comment

by:mgonyea
Comment Utility
I have performed a "Quick View" on the RASAPI32.DLL file and I've noticed the RasDialA, RasDialW, etc exports; however, it doesn't give me the parameter list and types.  What I would ideally like is to use an existing Dial up profile from a program, and allow the program to dial in without any user intervention.  I will try the ftp site you recommended, but I'm looking for the actual DLL call I would have to make in order for the program to dial.
If the EXE file shows me how to do this, I will reward you with the points. :)
0
 
LVL 23

Expert Comment

by:chensu
Comment Utility
In addition to this, you may use RasDialDlg on Windows NT.

If IE4 is installed, you can also use

Automatic Dialing Functions

The functions described in this section handle dial-up access to the Internet.

InternetAutodial  
InternetAutodialHangup  
InternetDial  
InternetGetConnectedState  
InternetGoOnline  
InternetHangUp  
InternetSetDialState  

0
 
LVL 1

Author Comment

by:mgonyea
Comment Utility
I haven't had time to look at all the C files from the self-extract file.  I will let everyone know who gets the points and what percentage.  Sorry to keep you all waiting
0
 
LVL 11

Expert Comment

by:alexo
Comment Utility
>> If the EXE file shows me how to do this, I will reward you with the points. :)
The EXE file is a self-extracting archive containing source files.  Therefore, yes, it will show you how to do that.
0
 
LVL 1

Author Comment

by:mgonyea
Comment Utility
For chensu:
You mentioned the Internet Dialing functions of IE4.  I have installed an up-to-date (SP1) of IE4 and I can't find the DLL that holds those functions.  Can you tell me where they are?  Thanks
0
 
LVL 23

Expert Comment

by:chensu
Comment Utility
They reside in the Wininet.dll. You can find the header file (Wininet.h) and import library (Wininet.lib) in the lastest Platform SDK or Internet Client SDK (http://www.microsoft.com/msdn/sdk).
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 11

Expert Comment

by:alexo
Comment Utility
Did you look at the example?
0
 
LVL 1

Author Comment

by:mgonyea
Comment Utility
I looked at the example, and lo and behold, it was missing a header file.  The RAS.H file was missing.  I will be using Visual FoxPro to try this auto-dialing, so I have to convert from C/C++ to FoxPro.  The example doesn't tell me the parameter types for this function call, and since the RAS.ZH file is missing, I can't find out the structure format of RASDIALPARAMS.  I will check the SDK site for info on this.  
0
 
LVL 11

Expert Comment

by:alexo
Comment Utility
The RAS.H is not missing (at least not more than WINDOWS.H is).
You can lo and behold RAS.H in the SDK distribution or in the include directory of any Win32 compatible C/C++ compiler.
Since the example was meant to be compiled with a C compiler, it seems logical.
0
 
LVL 1

Author Comment

by:mgonyea
Comment Utility
Question for alexo:  Does RasDial use an existing profile from setting up an Internet connection, or does it just dial the modem?  (If this works, I will award you both with points. :) )

For chensu:
You mentioned some DLL calls in the WININET.DLL file.  There are some connection functions in the WinNT distribution version of Wininet.dll, but I don't know what parameters that these calls need. Quick view just doesn't cut it :)  Anyhow,  if you could let me know where I could find this information (or information on ANY/ALL API calls) I will award you with come points as well.
0
 
LVL 1

Author Comment

by:mgonyea
Comment Utility
Question for alexo:  Does RasDial use an existing profile from setting up an Internet connection, or does it just dial the modem?  (If this works, I will award you both with points. :) )

For chensu:
You mentioned some DLL calls in the WININET.DLL file.  There are some connection functions in the WinNT distribution version of Wininet.dll, but I don't know what parameters that these calls need. Quick view just doesn't cut it :)  Anyhow,  if you could let me know where I could find this information,I will award you with some points as well.  If you can find info on MOST/ALL DLL paramater lists, I will award you with more.
0
 
LVL 1

Author Comment

by:mgonyea
Comment Utility
please ignore the double post
0
 
LVL 23

Expert Comment

by:chensu
Comment Utility
RasDial uses the information you pass to establish a RAS connection.

You can find the documentation from the following sources:

1. The documentation of Windows Platform SDK on MSDN CDs.
2. The documentation of Internet Client SDK on MSDN CDs.
3. The documentation of Internet Client SDK downloadable at http://www.microsoft.com/msdn/sdk.
4. Go to http://www.microsoft.com/msdn to register and then you can access the MSDN Library on line which contains the documentation of Windows Platform SDK.

It is under SDK documentation\Platform SDK\Internet Networking and Distributed Services\Internet Explorer Reference\Internet Tools & Technologies\WinInet API.
0
 
LVL 1

Author Comment

by:mgonyea
Comment Utility
Thanks to you all who participated.  Thanks for your patience as I cannot regularly check up on this site.  
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

This article describes how to programmatically preset the "Pages per Sheet" option that's available with most printer drivers.   This setting lets you do "n-Up" printing, where two, four, or more pages are printed on each sheet of paper. If your …
This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now