news.microsoft.com
9/10/2003 8:58:00 PM
Hi,
Thanks for your response. I''m using the API call NetServerEnum. When my
network cable is plugged in, it succeeds, and returns all of my network
computer names. When the cable is disconnected, it still succeeds, returning
just 1 computer name "sv-file". I was hoping it would either fail, or return
zero entries. I didn''t think it would be a good idea to say "if (count > 1)
then connected..."
I''m not sure why "sv-file" still appears in the list. Any thoughts on the
best solution?
Steve
"John Saunders" <john.saunders@surfcontrol.com> wrote in message
news:%234BkXw9dDHA.1944@TK2MSFTNGP12.phx.gbl...
> "Steven Van Dyke" <svandyke@rft.com> wrote in message
> news:uz62Vs9dDHA.576@tk2msftngp13.phx.gbl...
> > This is an app for work. It needs to gain access to other computers on
the
> > network. It does NOT need to get on the Internet. Basically, If I''m
> > connected to a network, I populate a combo box with all of the machine
> names
> > on the network. If I''m not connected, I just put the local machine name
in
> > the combo box. My only issue is, how do I easily determine if I have a
> > connection or not?
>
> I think I''d just try it and find out. If it fails, just put the local
> machine name in the box. If it succeeds, put all of them there. This will
> also take care of the case where you''re connected to the network, but some
> other problem prevents you from getting the list of machine names.
>
> --
> John Saunders
> Internet Engineer
> john.saunders@surfcontrol.com
>
>