473,320 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Can Vb.Net do this?

jim
I have a user that uses a built-in wireless ethernet card to connect to our
wireless router and surf the internet from behind our router and uses a
wireless Sprint card to connect to the internet when not in the office.

I need to be able to detect when he is connected from the office and when he
is connected via the Sprint card.

Monitoring the status of the Local Area Connection may not be the best
solution because he may use it to connect at hotspots outside the office and
I need to know specifically if he is connected at the office (AT&T/Bellsouth
DSL) or to another hotspot on the AT&T/Bellsouth DSL network.

Any ideas? Any sample code?

Thanks!
Jun 29 '07 #1
15 1208
jim
Yeah...I know.....this is a CSharp group....but I could use your help too.
I can convert the CSharp code ( I think) if you know of any that can help me
do this.

Thanks for you help!
"jim" <ji*@yourpc.eduwrote in message
news:y_*****************@bignews3.bellsouth.net...
>I have a user that uses a built-in wireless ethernet card to connect to our
wireless router and surf the internet from behind our router and uses a
wireless Sprint card to connect to the internet when not in the office.

I need to be able to detect when he is connected from the office and when
he is connected via the Sprint card.

Monitoring the status of the Local Area Connection may not be the best
solution because he may use it to connect at hotspots outside the office
and I need to know specifically if he is connected at the office
(AT&T/Bellsouth DSL) or to another hotspot on the AT&T/Bellsouth DSL
network.

Any ideas? Any sample code?

Thanks!


Jun 29 '07 #2
if i understand you correctly ,,

You need to know if a person is connected from your office to the internet
or at another place

this is pretty simple , just check if a known location at your intranet is
availlable
( for instance by pinging )
:-) or am i thinking to simple

"jim" wrote:
I have a user that uses a built-in wireless ethernet card to connect to our
wireless router and surf the internet from behind our router and uses a
wireless Sprint card to connect to the internet when not in the office.

I need to be able to detect when he is connected from the office and when he
is connected via the Sprint card.

Monitoring the status of the Local Area Connection may not be the best
solution because he may use it to connect at hotspots outside the office and
I need to know specifically if he is connected at the office (AT&T/Bellsouth
DSL) or to another hotspot on the AT&T/Bellsouth DSL network.

Any ideas? Any sample code?

Thanks!
Jun 29 '07 #3
that wouldn't tell if you are connected to two different types of
connections... that would just tell you if you had an internet connection or
could reach a server ;) but that could work in this instance for him, never
know.. in our office though we have pinging disabled internally.. and
external pings also.. so in our case ping wouldnt work but this isnt us :)

"M. Posseth" <MP******@discussions.microsoft.comwrote in message
news:F2**********************************@microsof t.com...
if i understand you correctly ,,

You need to know if a person is connected from your office to the internet
or at another place

this is pretty simple , just check if a known location at your intranet is
availlable
( for instance by pinging )
:-) or am i thinking to simple

"jim" wrote:
>I have a user that uses a built-in wireless ethernet card to connect to
our
wireless router and surf the internet from behind our router and uses a
wireless Sprint card to connect to the internet when not in the office.

I need to be able to detect when he is connected from the office and when
he
is connected via the Sprint card.

Monitoring the status of the Local Area Connection may not be the best
solution because he may use it to connect at hotspots outside the office
and
I need to know specifically if he is connected at the office
(AT&T/Bellsouth
DSL) or to another hotspot on the AT&T/Bellsouth DSL network.

Any ideas? Any sample code?

Thanks!

Jun 29 '07 #4
jim
That's a good idea. But, to keep from constantly pinging for the server, is
there a way to detect the disconnection and connection events of the Local
Area Network card?
"Smokey Grindle" <no****@nospam.comwrote in message
news:OK**************@TK2MSFTNGP06.phx.gbl...
that wouldn't tell if you are connected to two different types of
connections... that would just tell you if you had an internet connection
or could reach a server ;) but that could work in this instance for him,
never know.. in our office though we have pinging disabled internally..
and external pings also.. so in our case ping wouldnt work but this isnt
us :)

"M. Posseth" <MP******@discussions.microsoft.comwrote in message
news:F2**********************************@microsof t.com...
>if i understand you correctly ,,

You need to know if a person is connected from your office to the
internet
or at another place

this is pretty simple , just check if a known location at your intranet
is
availlable
( for instance by pinging )
:-) or am i thinking to simple

"jim" wrote:
>>I have a user that uses a built-in wireless ethernet card to connect to
our
wireless router and surf the internet from behind our router and uses a
wireless Sprint card to connect to the internet when not in the office.

I need to be able to detect when he is connected from the office and
when he
is connected via the Sprint card.

Monitoring the status of the Local Area Connection may not be the best
solution because he may use it to connect at hotspots outside the office
and
I need to know specifically if he is connected at the office
(AT&T/Bellsouth
DSL) or to another hotspot on the AT&T/Bellsouth DSL network.

Any ideas? Any sample code?

Thanks!


Jun 29 '07 #5
I have to ask, who/what needs to know the manner of connection and why?

If the who is the corporate office and the why is to monitor behavior, there
are a number of ways of determining the connection, mostly they are
infrastructure solutions. If your router or switches support logging, you
can read the logs and determine the connection.

If the who is an applicatoin and the why is to alter behavior or options,
then you can enumerate over the installed NIC's and determine if they are
active. You can accomplish this with unmanaged API calls
(planet-source-code.com, mvps.org/vbnet), with
system.net(NetworkInterface/Adapters), and from managed WMI . You can even
capture events when network configurations change.

Beyond that you can create a mixture of the two solutions. The query
portions (option 2) resides on the client as a service or some such and a
controller will live at the home office (Option 1/alternative - roll your
own monitor service.)
"jim" <ji*@yourpc.eduwrote in message
news:X5******************@bignews2.bellsouth.net.. .
That's a good idea. But, to keep from constantly pinging for the server,
is there a way to detect the disconnection and connection events of the
Local Area Network card?
"Smokey Grindle" <no****@nospam.comwrote in message
news:OK**************@TK2MSFTNGP06.phx.gbl...
>that wouldn't tell if you are connected to two different types of
connections... that would just tell you if you had an internet connection
or could reach a server ;) but that could work in this instance for him,
never know.. in our office though we have pinging disabled internally..
and external pings also.. so in our case ping wouldnt work but this isnt
us :)

"M. Posseth" <MP******@discussions.microsoft.comwrote in message
news:F2**********************************@microso ft.com...
>>if i understand you correctly ,,

You need to know if a person is connected from your office to the
internet
or at another place

this is pretty simple , just check if a known location at your intranet
is
availlable
( for instance by pinging )
:-) or am i thinking to simple

"jim" wrote:

I have a user that uses a built-in wireless ethernet card to connect to
our
wireless router and surf the internet from behind our router and uses a
wireless Sprint card to connect to the internet when not in the office.

I need to be able to detect when he is connected from the office and
when he
is connected via the Sprint card.

Monitoring the status of the Local Area Connection may not be the best
solution because he may use it to connect at hotspots outside the
office and
I need to know specifically if he is connected at the office
(AT&T/Bellsouth
DSL) or to another hotspot on the AT&T/Bellsouth DSL network.

Any ideas? Any sample code?

Thanks!



Jun 29 '07 #6
jim
There are 2 users that have 2 profiles in outlook 2003. They need 2 profiles
because the office DSL only allows emails to be sent via Bellsouth mail
servers and when on the road, their Sprint mobile wireless only allows
emails to be sent via Sprint servers. (Both ISPs say that they have these
restrictions to help stem the flow of spam.)

Since you can't have 2 mail server entries in a single profile, you need 2
profiles.

This can be a pain in the arse...as there is no way (that I have found) to
keep the 2 profiles in sync on a single PC. And, the few Outlook PC-to-PC
profile syncing apps that I have found don't sync everything (folders as
well as contacts, messages, etc.).

I found a way to change the outgoing email server automatically, but I have
to reliably detect where they are and make system changes automatically if
they change where they connect to the internet.

If I can detect that the Local Area Network connection has "connected", I
can then do the simple ping that is suggested here and make changes (or not)
depending on the ping's response. And, if I can detect the "connected"
event, I can avoid constant pinging and reserve system resources. (I just
hate wasting CPU cycles and such...)

If anyone knows of a better solution, I'm all ears.

---
"AMDRIT" <am****@hotmail.comwrote in message
news:ef**************@TK2MSFTNGP05.phx.gbl...
>I have to ask, who/what needs to know the manner of connection and why?

If the who is the corporate office and the why is to monitor behavior,
there are a number of ways of determining the connection, mostly they are
infrastructure solutions. If your router or switches support logging, you
can read the logs and determine the connection.

If the who is an applicatoin and the why is to alter behavior or options,
then you can enumerate over the installed NIC's and determine if they are
active. You can accomplish this with unmanaged API calls
(planet-source-code.com, mvps.org/vbnet), with
system.net(NetworkInterface/Adapters), and from managed WMI . You can
even capture events when network configurations change.

Beyond that you can create a mixture of the two solutions. The query
portions (option 2) resides on the client as a service or some such and a
controller will live at the home office (Option 1/alternative - roll your
own monitor service.)
"jim" <ji*@yourpc.eduwrote in message
news:X5******************@bignews2.bellsouth.net.. .
>That's a good idea. But, to keep from constantly pinging for the server,
is there a way to detect the disconnection and connection events of the
Local Area Network card?
"Smokey Grindle" <no****@nospam.comwrote in message
news:OK**************@TK2MSFTNGP06.phx.gbl...
>>that wouldn't tell if you are connected to two different types of
connections... that would just tell you if you had an internet
connection or could reach a server ;) but that could work in this
instance for him, never know.. in our office though we have pinging
disabled internally.. and external pings also.. so in our case ping
wouldnt work but this isnt us :)

"M. Posseth" <MP******@discussions.microsoft.comwrote in message
news:F2**********************************@micros oft.com...
if i understand you correctly ,,

You need to know if a person is connected from your office to the
internet
or at another place

this is pretty simple , just check if a known location at your intranet
is
availlable
( for instance by pinging )
:-) or am i thinking to simple

"jim" wrote:

I have a user that uses a built-in wireless ethernet card to connect
to our
wireless router and surf the internet from behind our router and uses
a
wireless Sprint card to connect to the internet when not in the
office.
>
I need to be able to detect when he is connected from the office and
when he
is connected via the Sprint card.
>
Monitoring the status of the Local Area Connection may not be the best
solution because he may use it to connect at hotspots outside the
office and
I need to know specifically if he is connected at the office
(AT&T/Bellsouth
DSL) or to another hotspot on the AT&T/Bellsouth DSL network.
>
Any ideas? Any sample code?
>
Thanks!
>
>
>




Jun 29 '07 #7
jim
Cancel requests.....after 6 hours of searching, I got something that will
work (at least temporarily)....

Thanks for the posts though.

jim

"jim" <ji*@yourpc.eduwrote in message
news:K2******************@bignews2.bellsouth.net.. .
There are 2 users that have 2 profiles in outlook 2003. They need 2
profiles because the office DSL only allows emails to be sent via
Bellsouth mail servers and when on the road, their Sprint mobile wireless
only allows emails to be sent via Sprint servers. (Both ISPs say that
they have these restrictions to help stem the flow of spam.)

Since you can't have 2 mail server entries in a single profile, you need 2
profiles.

This can be a pain in the arse...as there is no way (that I have found) to
keep the 2 profiles in sync on a single PC. And, the few Outlook PC-to-PC
profile syncing apps that I have found don't sync everything (folders as
well as contacts, messages, etc.).

I found a way to change the outgoing email server automatically, but I
have to reliably detect where they are and make system changes
automatically if they change where they connect to the internet.

If I can detect that the Local Area Network connection has "connected", I
can then do the simple ping that is suggested here and make changes (or
not) depending on the ping's response. And, if I can detect the
"connected" event, I can avoid constant pinging and reserve system
resources. (I just hate wasting CPU cycles and such...)

If anyone knows of a better solution, I'm all ears.

---
"AMDRIT" <am****@hotmail.comwrote in message
news:ef**************@TK2MSFTNGP05.phx.gbl...
>>I have to ask, who/what needs to know the manner of connection and why?

If the who is the corporate office and the why is to monitor behavior,
there are a number of ways of determining the connection, mostly they are
infrastructure solutions. If your router or switches support logging,
you can read the logs and determine the connection.

If the who is an applicatoin and the why is to alter behavior or options,
then you can enumerate over the installed NIC's and determine if they are
active. You can accomplish this with unmanaged API calls
(planet-source-code.com, mvps.org/vbnet), with
system.net(NetworkInterface/Adapters), and from managed WMI . You can
even capture events when network configurations change.

Beyond that you can create a mixture of the two solutions. The query
portions (option 2) resides on the client as a service or some such and a
controller will live at the home office (Option 1/alternative - roll your
own monitor service.)
"jim" <ji*@yourpc.eduwrote in message
news:X5******************@bignews2.bellsouth.net. ..
>>That's a good idea. But, to keep from constantly pinging for the
server, is there a way to detect the disconnection and connection events
of the Local Area Network card?
"Smokey Grindle" <no****@nospam.comwrote in message
news:OK**************@TK2MSFTNGP06.phx.gbl...
that wouldn't tell if you are connected to two different types of
connections... that would just tell you if you had an internet
connection or could reach a server ;) but that could work in this
instance for him, never know.. in our office though we have pinging
disabled internally.. and external pings also.. so in our case ping
wouldnt work but this isnt us :)

"M. Posseth" <MP******@discussions.microsoft.comwrote in message
news:F2**********************************@micro soft.com...
if i understand you correctly ,,
>
You need to know if a person is connected from your office to the
internet
or at another place
>
this is pretty simple , just check if a known location at your
intranet is
availlable
( for instance by pinging )
>
>
:-) or am i thinking to simple
>
>
>
>
>
"jim" wrote:
>
>I have a user that uses a built-in wireless ethernet card to connect
>to our
>wireless router and surf the internet from behind our router and uses
>a
>wireless Sprint card to connect to the internet when not in the
>office.
>>
>I need to be able to detect when he is connected from the office and
>when he
>is connected via the Sprint card.
>>
>Monitoring the status of the Local Area Connection may not be the
>best
>solution because he may use it to connect at hotspots outside the
>office and
>I need to know specifically if he is connected at the office
>(AT&T/Bellsouth
>DSL) or to another hotspot on the AT&T/Bellsouth DSL network.
>>
>Any ideas? Any sample code?
>>
>Thanks!
>>
>>
>>




Jul 1 '07 #8
You seem miffed that it took you as long as 6 hours to find a solution to
your 'problem'.

I recommend that you learn to be patient because you will encounter
'problems' that will take you days if not weeks to fimd a solution for.
"jim" <ji*@yourpc.eduwrote in message
news:7c*****************@bignews3.bellsouth.net...
Cancel requests.....after 6 hours of searching, I got something that will
work (at least temporarily)....

Thanks for the posts though.

jim

"jim" <ji*@yourpc.eduwrote in message
news:K2******************@bignews2.bellsouth.net.. .
>There are 2 users that have 2 profiles in outlook 2003. They need 2
profiles because the office DSL only allows emails to be sent via
Bellsouth mail servers and when on the road, their Sprint mobile wireless
only allows emails to be sent via Sprint servers. (Both ISPs say that
they have these restrictions to help stem the flow of spam.)

Since you can't have 2 mail server entries in a single profile, you need
2 profiles.

This can be a pain in the arse...as there is no way (that I have found)
to keep the 2 profiles in sync on a single PC. And, the few Outlook
PC-to-PC profile syncing apps that I have found don't sync everything
(folders as well as contacts, messages, etc.).

I found a way to change the outgoing email server automatically, but I
have to reliably detect where they are and make system changes
automatically if they change where they connect to the internet.

If I can detect that the Local Area Network connection has "connected", I
can then do the simple ping that is suggested here and make changes (or
not) depending on the ping's response. And, if I can detect the
"connected" event, I can avoid constant pinging and reserve system
resources. (I just hate wasting CPU cycles and such...)

If anyone knows of a better solution, I'm all ears.

---
"AMDRIT" <am****@hotmail.comwrote in message
news:ef**************@TK2MSFTNGP05.phx.gbl...
>>>I have to ask, who/what needs to know the manner of connection and why?

If the who is the corporate office and the why is to monitor behavior,
there are a number of ways of determining the connection, mostly they
are infrastructure solutions. If your router or switches support
logging, you can read the logs and determine the connection.

If the who is an applicatoin and the why is to alter behavior or
options, then you can enumerate over the installed NIC's and determine
if they are active. You can accomplish this with unmanaged API calls
(planet-source-code.com, mvps.org/vbnet), with
system.net(NetworkInterface/Adapters), and from managed WMI . You can
even capture events when network configurations change.

Beyond that you can create a mixture of the two solutions. The query
portions (option 2) resides on the client as a service or some such and
a controller will live at the home office (Option 1/alternative - roll
your own monitor service.)
"jim" <ji*@yourpc.eduwrote in message
news:X5******************@bignews2.bellsouth.net ...
That's a good idea. But, to keep from constantly pinging for the
server, is there a way to detect the disconnection and connection
events of the Local Area Network card?
"Smokey Grindle" <no****@nospam.comwrote in message
news:OK**************@TK2MSFTNGP06.phx.gbl...
that wouldn't tell if you are connected to two different types of
connections... that would just tell you if you had an internet
connection or could reach a server ;) but that could work in this
instance for him, never know.. in our office though we have pinging
disabled internally.. and external pings also.. so in our case ping
wouldnt work but this isnt us :)
>
"M. Posseth" <MP******@discussions.microsoft.comwrote in message
news:F2**********************************@micr osoft.com...
>if i understand you correctly ,,
>>
>You need to know if a person is connected from your office to the
>internet
>or at another place
>>
>this is pretty simple , just check if a known location at your
>intranet is
>availlable
>( for instance by pinging )
>>
>>
>:-) or am i thinking to simple
>>
>>
>>
>>
>>
>"jim" wrote:
>>
>>I have a user that uses a built-in wireless ethernet card to connect
>>to our
>>wireless router and surf the internet from behind our router and
>>uses a
>>wireless Sprint card to connect to the internet when not in the
>>office.
>>>
>>I need to be able to detect when he is connected from the office and
>>when he
>>is connected via the Sprint card.
>>>
>>Monitoring the status of the Local Area Connection may not be the
>>best
>>solution because he may use it to connect at hotspots outside the
>>office and
>>I need to know specifically if he is connected at the office
>>(AT&T/Bellsouth
>>DSL) or to another hotspot on the AT&T/Bellsouth DSL network.
>>>
>>Any ideas? Any sample code?
>>>
>>Thanks!
>>>
>>>
>>>
>
>



Jul 1 '07 #9
jim wrote:
Cancel requests.....after 6 hours of searching, I got something that will
work (at least temporarily)....

Thanks for the posts though.

jim
Jim, maybe it would be a good idea to let us know what you did to
overcome your problem, afterall, we can all learn from each other and
maybe save someone else spending 6 (or more) hours later!

There's probably lots of ways to overcome your problem, but I for one
would be interested to read, even a brief description, of what you
decided on.
ShaneO

There are 10 kinds of people - Those who understand Binary and those who
don't.
Jul 1 '07 #10
jim

"ShaneO" <sp****@optusnet.com.auwrote in message
news:46***********************@news.optusnet.com.a u...
jim wrote:
>Cancel requests.....after 6 hours of searching, I got something that will
work (at least temporarily)....

Thanks for the posts though.

jim

Jim, maybe it would be a good idea to let us know what you did to overcome
your problem, afterall, we can all learn from each other and maybe save
someone else spending 6 (or more) hours later!

There's probably lots of ways to overcome your problem, but I for one
would be interested to read, even a brief description, of what you decided
on.
ShaneO

I spoke too soon.

I didn't take into account that the Sprint server requires a login to send
mail and the Bellsouth servers don't. That means that to handle the problem
from an Outlook point of view I would have to muck around with VSTO and
God-only-knows what else.

I have another idea that just might work though. I'll let you know.

jim
Jul 1 '07 #11
On Jun 29, 2:22 pm, "jim" <j...@yourpc.eduwrote:
That's a good idea. But, to keep from constantly pinging for the server, is
there a way to detect the disconnection and connection events of the Local
Area Network card?

"Smokey Grindle" <nos...@nospam.comwrote in message

news:OK**************@TK2MSFTNGP06.phx.gbl...
that wouldn't tell if you are connected to two different types of
connections... that would just tell you if you had an internet connection
or could reach a server ;) but that could work in this instance for him,
never know.. in our office though we have pinging disabled internally..
and external pings also.. so in our case ping wouldnt work but this isnt
us :)
"M. Posseth" <MPoss...@discussions.microsoft.comwrote in message
news:F2**********************************@microsof t.com...
if i understand you correctly ,,
You need to know if a person is connected from your office to the
internet
or at another place
this is pretty simple , just check if a known location at your intranet
is
availlable
( for instance by pinging )
:-) or am i thinking to simple
"jim" wrote:
>I have a user that uses a built-in wireless ethernet card to connect to
our
wireless router and surf the internet from behind our router and uses a
wireless Sprint card to connect to the internet when not in the office.
>I need to be able to detect when he is connected from the office and
when he
is connected via the Sprint card.
>Monitoring the status of the Local Area Connection may not be the best
solution because he may use it to connect at hotspots outside the office
and
I need to know specifically if he is connected at the office
(AT&T/Bellsouth
DSL) or to another hotspot on the AT&T/Bellsouth DSL network.
>Any ideas? Any sample code?
>Thanks!

That's a good idea. But, to keep from constantly pinging for the server, is
there a way to detect the disconnection and connection events of the Local
Area Network card?
Well I don't know how to listen to the (dis)connect events, but you
can check whether the network connection is enabled or disabled by
looking at the verb name for the connection. While the article was
written to enabled/disable the network connection you could modify it
to just return whether the connection is enabled or not:

http://www.codeproject.com/useritems...etworkConn.asp

Thanks,

Seth Rowe

Jul 2 '07 #12
jim

"rowe_newsgroups" <ro********@yahoo.comwrote in message
news:11**********************@q69g2000hsb.googlegr oups.com...
On Jun 29, 2:22 pm, "jim" <j...@yourpc.eduwrote:
>That's a good idea. But, to keep from constantly pinging for the server,
is
there a way to detect the disconnection and connection events of the
Local
Area Network card?

"Smokey Grindle" <nos...@nospam.comwrote in message

news:OK**************@TK2MSFTNGP06.phx.gbl...
that wouldn't tell if you are connected to two different types of
connections... that would just tell you if you had an internet
connection
or could reach a server ;) but that could work in this instance for
him,
never know.. in our office though we have pinging disabled internally..
and external pings also.. so in our case ping wouldnt work but this
isnt
us :)
"M. Posseth" <MPoss...@discussions.microsoft.comwrote in message
news:F2**********************************@microso ft.com...
if i understand you correctly ,,
>You need to know if a person is connected from your office to the
internet
or at another place
>this is pretty simple , just check if a known location at your
intranet
is
availlable
( for instance by pinging )
>:-) or am i thinking to simple
>"jim" wrote:
>>I have a user that uses a built-in wireless ethernet card to connect
to
our
wireless router and surf the internet from behind our router and uses
a
wireless Sprint card to connect to the internet when not in the
office.
>>I need to be able to detect when he is connected from the office and
when he
is connected via the Sprint card.
>>Monitoring the status of the Local Area Connection may not be the
best
solution because he may use it to connect at hotspots outside the
office
and
I need to know specifically if he is connected at the office
(AT&T/Bellsouth
DSL) or to another hotspot on the AT&T/Bellsouth DSL network.
>>Any ideas? Any sample code?
>>Thanks!


>That's a good idea. But, to keep from constantly pinging for the server,
is
there a way to detect the disconnection and connection events of the
Local
Area Network card?

Well I don't know how to listen to the (dis)connect events, but you
can check whether the network connection is enabled or disabled by
looking at the verb name for the connection. While the article was
written to enabled/disable the network connection you could modify it
to just return whether the connection is enabled or not:

http://www.codeproject.com/useritems...etworkConn.asp
I used a handler for the NetworkChange.NetworkAddressChanged event, and it
seems to work just fine.

jim
Jul 2 '07 #13
rowe_newsgroups schreef:
Well I don't know how to listen to the (dis)connect events, but you
can check whether the network connection is enabled or disabled by
looking at the verb name for the connection. While the article was
written to enabled/disable the network connection you could modify it
to just return whether the connection is enabled or not:

http://www.codeproject.com/useritems...etworkConn.asp

Thanks,

Seth Rowe
I guess that only works for English versions of Windows. If you want to
use that for a program that's going to be used in other countries just
checking if a certain text appears in the name will fail.
--
Rinze van Huizen
C-Services Holland b.v
Jul 6 '07 #14
On Jul 6, 3:27 am, "C-Services Holland b.v."
<cshNOSPAMPLE...@csh4u.nlwrote:
rowe_newsgroups schreef:
Well I don't know how to listen to the (dis)connect events, but you
can check whether the network connection is enabled or disabled by
looking at the verb name for the connection. While the article was
written to enabled/disable the network connection you could modify it
to just return whether the connection is enabled or not:
http://www.codeproject.com/useritems...etworkConn.asp
Thanks,
Seth Rowe

I guess that only works for English versions of Windows. If you want to
use that for a program that's going to be used in other countries just
checking if a certain text appears in the name will fail.

--
Rinze van Huizen
C-Services Holland b.v
Unfortunately you're correct (it also fails if you rename a
connection) - but I don't know how else you could match a specific
connection.

Thanks,

Seth Rowe

Jul 6 '07 #15
jim

"rowe_newsgroups" <ro********@yahoo.comwrote in message
news:11**********************@57g2000hsv.googlegro ups.com...
On Jul 6, 3:27 am, "C-Services Holland b.v."
<cshNOSPAMPLE...@csh4u.nlwrote:
>rowe_newsgroups schreef:
Well I don't know how to listen to the (dis)connect events, but you
can check whether the network connection is enabled or disabled by
looking at the verb name for the connection. While the article was
written to enabled/disable the network connection you could modify it
to just return whether the connection is enabled or not:
>http://www.codeproject.com/useritems...etworkConn.asp
Thanks,
Seth Rowe

I guess that only works for English versions of Windows. If you want to
use that for a program that's going to be used in other countries just
checking if a certain text appears in the name will fail.

--
Rinze van Huizen
C-Services Holland b.v

Unfortunately you're correct (it also fails if you rename a
connection) - but I don't know how else you could match a specific
connection.

Thanks,

Seth Rowe
I'm not sure about watching a specific connection, but I am using
"AddHandler NetworkChange.NetworkAddressChanged" to run code that checks for
the IP and network and it seems to do just fine.

jim
Jul 6 '07 #16

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: James | last post by:
I have a from with 2 fields: Company & Name Depening which is completed, one of the following queries will be run: if($Company){ $query = "Select C* From tblsample Where ID = $Company...
5
by: Scott D | last post by:
I am trying to check and see if a field is posted or not, if not posted then assign $location which is a session variable to $location_other. If it is posted then just assign it to...
2
by: Nick | last post by:
Can someone please tell me how to access elements from a multiple selection list? From what ive read on other posts, this is correct. I keep getting an "Undefined variable" error though... Form...
2
by: Alexander Ross | last post by:
I have a variable ($x) that can have 50 different (string) values. I want to check for 7 of those values and do something based on it ... as I see it I have 2 options: 1) if (($x=="one") ||...
0
by: Dan Foley | last post by:
This script runs fine, but I'd like to know why it's so slow.. Thanks for any help out there on how i can make it faster (it might take up to 5 min to write these 3 export files whith 15 records...
5
by: Lee Redeem | last post by:
Hi there I've created abd uploaded this basic PHP script: <html> <head> <title>PHP Test</title> </head> <body> <H1 align="center">
5
by: christopher vogt | last post by:
Hi, i'm wondering if there is something like $this-> to call a method inside another method of the same class without using the classname in front. I actually use class TEST { function...
6
by: Phil Powell | last post by:
Ok guys, here we go again! SELECT s.nnet_produkt_storrelse_navn FROM nnet_produkt_storrelse s, nnet_produkt_varegruppe v, nnet_storrelse_varegruppe_assoc sv, nnet_produkt p WHERE...
1
by: Michel | last post by:
a site like this http://www.dvdzone2.com/dvd Can you make it in PHP and MySQL within 6 weeks? If so, send me your price 2 a r a (at) p a n d o r a . b e
11
by: Maciej Nadolski | last post by:
Hi! I can`t understand what php wants from me:( So: Cannot send session cache limiter - headers already sent (output started at /home/krecik/public_html/silnik.php:208) in...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.