InternetAutodial function not working

I'm a newbie to this topic but I only need to add one thing to some existing code.  I need to programmaticaly start dialup networking from within a Windows application.  I do not need browser or ftp access but simply need to connect to an Oracle database after establishing a dialup connection.  The code already works to do this with a network connection but I need to be able to add the option to connect via dialup networking.

I've tried InternetAutodial since I don't mind just using the default connectoid but nothing happens?   The function is called and returns true but the modem never dials and the dialup window never comes up.  

As best I can tell I included the necessary h file and linked with the appropriate library.

Any help would be greatly appreciated.
CSTALEYAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
jhanceConnect With a Mentor Commented:
If my answer solved your problem then why are you still rejecting my answer?

The behavior is InternetAutoDial is supposed to be the same on NT vs. Win9x and I've never noted any differences.
0
 
CSTALEYAuthor Commented:
Oops, I probably should have added a few things.

The code is in C++
Also, I was using NULL as the second parameter.

0
 
jhanceCommented:
You can initiate a dial-up connection from your program using the RasDial() function in the RASAPI32.DLL module.

Here an example:

http://www.codeguru.com/internet/dialup.shtml
0
Get expert help—faster!

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

 
CSTALEYAuthor Commented:
This really didn't answer my question.  
I didn't ask about RAS, I asked why
 Internet AutoDial did not work.
If there is a very good reason for not
using it and this is explained, I'll
consider accepting the answer.

Also, I've increased the points
because I want to ask whether
there is a solution that will work on
WinNT as well as 95/98.

Also, I need an answer quickly.  
I'm running out of time to solve this.
Please answer the question in full so
time is not wasted in requests for more
information.

Thanks!
0
 
jhanceCommented:
You said:

"I need to programmaticaly start dialup"

RasDial() is how you do it.  

If you want to use InternetAutodial() that's OK too but you must have IE4.0 or later installed on the machine (you do, right?) and a DUN/RAS connection must be created.  Further, the Internet Properties must be setup to "Always dial my default connection" or it won't work (as you have seen).  If you really want to use the WININET dial functions, use InternetDial() instead.  It give you control over the dialing even if the IE properties are not setup right.
0
 
CSTALEYAuthor Commented:
The second part of my question did not get answered..

                      Also, I've increased the points
                       because I want to ask whether
                       there is a solution that will work on
                       WinNT as well as 95/98.

The solution in this case meaning  InternetAutodial.

Thanks
0
 
jhanceCommented:
If this is what you mean by the 2nd part of your question:

I've tried InternetAutodial since I don't mind just using the default connectoid but nothing happens?   The function is called and returns true but the modem never dials and the dialup window never comes up.  

Then I did answer it:


If you want to use InternetAutodial() that's OK too but you must have IE4.0 or later installed on the machine (you do, right?) and a DUN/RAS connection must be created.  Further, the Internet Properties must be setup to "Always dial my default connection" or it won't work (as you have seen).  If you really want to use the WININET dial functions, use InternetDial() instead.  It give you control over the dialing even if the IE properties are not setup right.

0
 
jhanceCommented:
But, I'll go back and reiterate my original point that the RIGHT WAY to do it is with RasDial().  RasDial works on all platforms that use either DUN or RAS (that would be Win9x or NT/W2K) and gives you complete control over the dialing function.
0
 
CSTALEYAuthor Commented:
I should have been more clear.  You did solve my problem!  As soon as I changed the IE4.0 setting (strange as that may be) it worked.  It brought up my dialup window.  

What I am wondering since I tested this on an NT machine and do not have a 95/98 o/s at work, is will the InternetAutoDial function work on 95/98 machine? ...despite the fact that it is a less than optimal solution :-)

Thanks
0
All Courses

From novice to tech pro — start learning today.