Check Internet connection, prompt dial-up dialog. Pls Help!

  • Thread starter Thread starter sleepyant
  • Start date Start date
S

sleepyant

Hi, I've posted this question on several forum but have no response. So I
hope anyone who have any idea what I'm talking about please give your
solution or advice.

My problem is I need to check the internet connection and pop-up a Dial-Up
dialog when there isn't any?

I've tried the following:

Dim myReq As HttpWebRequest
Try
myReq = WebRequest.Create("http://www.yahoo.com/")
myReq.GetResponse()
Catch ex As Exception
----------------> prompt for Dial-Up dialog here
End Try

The checking part is ok so far. But it can't automatically dial up or prompt
for dial up.

I need your advice on the correct way in doing this. Your help is much
appreciated. Thanks.
 
Thanks all. Appreciate your help. If I use "wininet.dll", do I need to
distribute "wininet.dll" together in my application setup? Or it is already
exist in existing windows OS and won't have any 'dll hell' issue? Thanks
again.
 
Paul said:
¤ Hi, I've posted this question on several forum but have no response. So I
¤ hope anyone who have any idea what I'm talking about please give your
¤ solution or advice.
¤
¤ My problem is I need to check the internet connection and pop-up a Dial-Up
¤ dialog when there isn't any?
¤
¤ I've tried the following:
¤
¤ Dim myReq As HttpWebRequest
¤ Try
¤ myReq = WebRequest.Create("http://www.yahoo.com/")
¤ myReq.GetResponse()
¤ Catch ex As Exception
¤ ----------------> prompt for Dial-Up dialog here
¤ End Try
¤
¤ The checking part is ok so far. But it can't automatically dial up or prompt
¤ for dial up.
¤
¤ I need your advice on the correct way in doing this. Your help is much
¤ appreciated. Thanks.
¤

See the following:

http://makeashorterlink.com/?K3F3155B9

Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)

Paul, I copied the code from the link you provided and tried it out. It did
successfully detect if a connection was there or not, but failed on the following
line:
x = Shell("rundll32.exe rnaui.dll,RnaDial",
AppWinStyle.NormalFocus, False)

I did a search for rundll32.exe and rnaui.dll , neither file exists on my XP
machine. Since DUN does work on this machine, I can only assume that these items
are replaced with other files in XP. So the question becomes then, what command
should be substituted for this line to work with XP-SP2?

tia
gm
 
On Sat, 06 Nov 2004 12:38:45 -0600, (e-mail address removed) wrote:

¤ Paul Clement wrote:
¤
¤ >
¤ > ¤ Hi, I've posted this question on several forum but have no response. So I
¤ > ¤ hope anyone who have any idea what I'm talking about please give your
¤ > ¤ solution or advice.
¤ > ¤
¤ > ¤ My problem is I need to check the internet connection and pop-up a Dial-Up
¤ > ¤ dialog when there isn't any?
¤ > ¤
¤ > ¤ I've tried the following:
¤ > ¤
¤ > ¤ Dim myReq As HttpWebRequest
¤ > ¤ Try
¤ > ¤ myReq = WebRequest.Create("http://www.yahoo.com/")
¤ > ¤ myReq.GetResponse()
¤ > ¤ Catch ex As Exception
¤ > ¤ ----------------> prompt for Dial-Up dialog here
¤ > ¤ End Try
¤ > ¤
¤ > ¤ The checking part is ok so far. But it can't automatically dial up or prompt
¤ > ¤ for dial up.
¤ > ¤
¤ > ¤ I need your advice on the correct way in doing this. Your help is much
¤ > ¤ appreciated. Thanks.
¤ > ¤
¤ >
¤ > See the following:
¤ >
¤ > http://makeashorterlink.com/?K3F3155B9
¤ >
¤ > Paul ~~~ (e-mail address removed)
¤ > Microsoft MVP (Visual Basic)
¤
¤ Paul, I copied the code from the link you provided and tried it out. It did
¤ successfully detect if a connection was there or not, but failed on the following
¤ line:
¤ x = Shell("rundll32.exe rnaui.dll,RnaDial",
¤ AppWinStyle.NormalFocus, False)
¤
¤ I did a search for rundll32.exe and rnaui.dll , neither file exists on my XP
¤ machine. Since DUN does work on this machine, I can only assume that these items
¤ are replaced with other files in XP. So the question becomes then, what command
¤ should be substituted for this line to work with XP-SP2?

Try RasDial instead:

http://home.iprimus.com.au/billmcc/PlatformVB/Default.htm


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
Paul said:
On Sat, 06 Nov 2004 12:38:45 -0600, (e-mail address removed) wrote:

¤ Paul Clement wrote:
¤
¤ >
¤ > ¤ Hi, I've posted this question on several forum but have no response. So I
¤ > ¤ hope anyone who have any idea what I'm talking about please give your
¤ > ¤ solution or advice.
¤ > ¤
¤ > ¤ My problem is I need to check the internet connection and pop-up a Dial-Up
¤ > ¤ dialog when there isn't any?
¤ > ¤
¤ > ¤ I've tried the following:
¤ > ¤
¤ > ¤ Dim myReq As HttpWebRequest
¤ > ¤ Try
¤ > ¤ myReq = WebRequest.Create("http://www.yahoo.com/")
¤ > ¤ myReq.GetResponse()
¤ > ¤ Catch ex As Exception
¤ > ¤ ----------------> prompt for Dial-Up dialog here
¤ > ¤ End Try
¤ > ¤
¤ > ¤ The checking part is ok so far. But it can't automatically dial up or prompt
¤ > ¤ for dial up.
¤ > ¤
¤ > ¤ I need your advice on the correct way in doing this. Your help is much
¤ > ¤ appreciated. Thanks.
¤ > ¤
¤ >
¤ > See the following:
¤ >
¤ > http://makeashorterlink.com/?K3F3155B9
¤ >
¤ > Paul ~~~ (e-mail address removed)
¤ > Microsoft MVP (Visual Basic)
¤
¤ Paul, I copied the code from the link you provided and tried it out. It did
¤ successfully detect if a connection was there or not, but failed on the following
¤ line:
¤ x = Shell("rundll32.exe rnaui.dll,RnaDial",
¤ AppWinStyle.NormalFocus, False)
¤
¤ I did a search for rundll32.exe and rnaui.dll , neither file exists on my XP
¤ machine. Since DUN does work on this machine, I can only assume that these items
¤ are replaced with other files in XP. So the question becomes then, what command
¤ should be substituted for this line to work with XP-SP2?

Try RasDial instead:

http://home.iprimus.com.au/billmcc/PlatformVB/Default.htm

Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)

Thanks for the followup, there is a lot at that website to sift through..
gm
 
On Mon, 08 Nov 2004 21:20:55 -0600, (e-mail address removed) wrote:

¤ Paul Clement wrote:
¤
¤ > On Sat, 06 Nov 2004 12:38:45 -0600, (e-mail address removed) wrote:
¤ >
¤ > ¤ Paul Clement wrote:
¤ > ¤
¤ > ¤ >
¤ > ¤ > ¤ Hi, I've posted this question on several forum but have no response. So I
¤ > ¤ > ¤ hope anyone who have any idea what I'm talking about please give your
¤ > ¤ > ¤ solution or advice.
¤ > ¤ > ¤
¤ > ¤ > ¤ My problem is I need to check the internet connection and pop-up a Dial-Up
¤ > ¤ > ¤ dialog when there isn't any?
¤ > ¤ > ¤
¤ > ¤ > ¤ I've tried the following:
¤ > ¤ > ¤
¤ > ¤ > ¤ Dim myReq As HttpWebRequest
¤ > ¤ > ¤ Try
¤ > ¤ > ¤ myReq = WebRequest.Create("http://www.yahoo.com/")
¤ > ¤ > ¤ myReq.GetResponse()
¤ > ¤ > ¤ Catch ex As Exception
¤ > ¤ > ¤ ----------------> prompt for Dial-Up dialog here
¤ > ¤ > ¤ End Try
¤ > ¤ > ¤
¤ > ¤ > ¤ The checking part is ok so far. But it can't automatically dial up or prompt
¤ > ¤ > ¤ for dial up.
¤ > ¤ > ¤
¤ > ¤ > ¤ I need your advice on the correct way in doing this. Your help is much
¤ > ¤ > ¤ appreciated. Thanks.
¤ > ¤ > ¤
¤ > ¤ >
¤ > ¤ > See the following:
¤ > ¤ >
¤ > ¤ > http://makeashorterlink.com/?K3F3155B9
¤ > ¤ >
¤ > ¤ > Paul ~~~ (e-mail address removed)
¤ > ¤ > Microsoft MVP (Visual Basic)
¤ > ¤
¤ > ¤ Paul, I copied the code from the link you provided and tried it out. It did
¤ > ¤ successfully detect if a connection was there or not, but failed on the following
¤ > ¤ line:
¤ > ¤ x = Shell("rundll32.exe rnaui.dll,RnaDial",
¤ > ¤ AppWinStyle.NormalFocus, False)
¤ > ¤
¤ > ¤ I did a search for rundll32.exe and rnaui.dll , neither file exists on my XP
¤ > ¤ machine. Since DUN does work on this machine, I can only assume that these items
¤ > ¤ are replaced with other files in XP. So the question becomes then, what command
¤ > ¤ should be substituted for this line to work with XP-SP2?
¤ >
¤ > Try RasDial instead:
¤ >
¤ > http://home.iprimus.com.au/billmcc/PlatformVB/Default.htm
¤ >
¤ > Paul ~~~ (e-mail address removed)
¤ > Microsoft MVP (Visual Basic)
¤
¤ Thanks for the followup, there is a lot at that website to sift through..
¤ gm

Here is the direct link to RasDial:

http://home.iprimus.com.au/billmcc/PlatformVB/dun/dialother.htm


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
Paul said:
On Mon, 08 Nov 2004 21:20:55 -0600, (e-mail address removed) wrote:

¤ Paul Clement wrote:
¤
¤ > On Sat, 06 Nov 2004 12:38:45 -0600, (e-mail address removed) wrote:
¤ >
¤ > ¤ Paul Clement wrote:
¤ > ¤
¤ > ¤ >
¤ > ¤ > ¤ Hi, I've posted this question on several forum but have no response. So I
¤ > ¤ > ¤ hope anyone who have any idea what I'm talking about please give your
¤ > ¤ > ¤ solution or advice.
¤ > ¤ > ¤
¤ > ¤ > ¤ My problem is I need to check the internet connection and pop-up a Dial-Up
¤ > ¤ > ¤ dialog when there isn't any?
¤ > ¤ > ¤
¤ > ¤ > ¤ I've tried the following:
¤ > ¤ > ¤
¤ > ¤ > ¤ Dim myReq As HttpWebRequest
¤ > ¤ > ¤ Try
¤ > ¤ > ¤ myReq = WebRequest.Create("http://www.yahoo.com/")
¤ > ¤ > ¤ myReq.GetResponse()
¤ > ¤ > ¤ Catch ex As Exception
¤ > ¤ > ¤ ----------------> prompt for Dial-Up dialog here
¤ > ¤ > ¤ End Try
¤ > ¤ > ¤
¤ > ¤ > ¤ The checking part is ok so far. But it can't automatically dial up or prompt
¤ > ¤ > ¤ for dial up.
¤ > ¤ > ¤
¤ > ¤ > ¤ I need your advice on the correct way in doing this. Your help is much
¤ > ¤ > ¤ appreciated. Thanks.
¤ > ¤ > ¤
¤ > ¤ >
¤ > ¤ > See the following:
¤ > ¤ >
¤ > ¤ > http://makeashorterlink.com/?K3F3155B9
¤ > ¤ >
¤ > ¤ > Paul ~~~ (e-mail address removed)
¤ > ¤ > Microsoft MVP (Visual Basic)
¤ > ¤
¤ > ¤ Paul, I copied the code from the link you provided and tried it out. It did
¤ > ¤ successfully detect if a connection was there or not, but failed on the following
¤ > ¤ line:
¤ > ¤ x = Shell("rundll32.exe rnaui.dll,RnaDial",
¤ > ¤ AppWinStyle.NormalFocus, False)
¤ > ¤
¤ > ¤ I did a search for rundll32.exe and rnaui.dll , neither file exists on my XP
¤ > ¤ machine. Since DUN does work on this machine, I can only assume that these items
¤ > ¤ are replaced with other files in XP. So the question becomes then, what command
¤ > ¤ should be substituted for this line to work with XP-SP2?
¤ >
¤ > Try RasDial instead:
¤ >
¤ > http://home.iprimus.com.au/billmcc/PlatformVB/Default.htm
¤ >
¤ > Paul ~~~ (e-mail address removed)
¤ > Microsoft MVP (Visual Basic)
¤
¤ Thanks for the followup, there is a lot at that website to sift through..
¤ gm

Here is the direct link to RasDial:

http://home.iprimus.com.au/billmcc/PlatformVB/dun/dialother.htm

Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)

Thanks, and that did work. I had to use the coding version that included username and
password, otherwise the connection immediately hung up. Step one in replacing DUN GUI
complete!
gm
 
Back
Top