I am writing a smart client application that needs to monitor the users
dial-up connection status. If the user disconnects, I need to prompt them to
reconnect, or quit the application. I tried using the following WMI query

wmiDialupDisconnect = New ManagementEventWatcher("SELECT * FROM
MSNDIS_NotifyAdapterRemoval")

but it does not work. Does anyone have any ideas how I can monitor a users
dial-up connection status?

Re: Monitor Dial-up Connection by Chris

Chris
Mon Nov 29 13:50:24 CST 2004

Hi,

I do not know about achieving this from WMI, I am sure it can be done. From
the windows API you should take a look at RasDial, RasEnumConnections and
RasConnectionNotification, these should provide the functionality you are
looking for,

Hope this helps

--
Chris Taylor
http://dotnetjunkies.com/weblog/chris.taylor


"Brad" <bradleyj68@newsgroup.nospam> wrote in message
news:D7C5EBB1-E103-4C85-85C5-EC9409153640@microsoft.com...
> I am writing a smart client application that needs to monitor the users
> dial-up connection status. If the user disconnects, I need to prompt them
to
> reconnect, or quit the application. I tried using the following WMI query
>
> wmiDialupDisconnect = New ManagementEventWatcher("SELECT * FROM
> MSNDIS_NotifyAdapterRemoval")
>
> but it does not work. Does anyone have any ideas how I can monitor a
users
> dial-up connection status?
>



Re: Monitor Dial-up Connection by v-schang

v-schang
Mon Nov 29 21:21:40 CST 2004

Hi Brad,

Thank's for your posting. Regarding on the issue, I am
finding proper resource to assist you and we will update as soon as
posible. Also, you can consider Chris's suggestion on use the RAS (Remote
Access Service). If you have any new finding or questions meanwhile, please
also feel free to post here.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security(This posting is provided "AS IS",
with no warranties, and confers no rights.)


RE: Monitor Dial-up Connection by v-jetan

v-jetan
Tue Nov 30 20:43:38 CST 2004

Hi bradley,

Based on my understanding, you want to monitor the internet connection
status of certain system.

We may use InternetGetConnectedState WIN32 API to get the internet
connection status, for more information, please refer to:
"How To Detecting If You Have a Connection to the Internet"
http://support.microsoft.com/default.aspx?scid=kb;EN-US;242558

For C# version, please refer to:
"HOW TO: determine whether or not there is a connection to the Internet
present on the local machine"
http://www.aspemporium.com/howto.aspx?hid=27
==================================================
Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.


RE: Monitor Dial-up Connection by jwinn

jwinn
Sun Feb 06 21:55:06 CST 2005

I know it's a bit late, but I'm doing this for anyone else that might need
RAS support from a .NET application. I just finished building a RAS wrapper
that does raise events for connection states closing or opening for
connections...

You can find it at
http://www.gotdotnet.com/Workspaces/Workspace.aspx?id=dd3ebd3e-684a-4dde-a843-e5fdb0895b8e if you still need it.

"Brad" wrote:

> I am writing a smart client application that needs to monitor the users
> dial-up connection status. If the user disconnects, I need to prompt them to
> reconnect, or quit the application. I tried using the following WMI query
>
> wmiDialupDisconnect = New ManagementEventWatcher("SELECT * FROM
> MSNDIS_NotifyAdapterRemoval")
>
> but it does not work. Does anyone have any ideas how I can monitor a users
> dial-up connection status?
>