>>Anybody know a reliable way to determine if a workstation is connected to a network?
>>
>
>Lots of ways; but it depends on what exactly you're trying to determine - for example, are you trying to see if the station is currently logged into any network, or a particular network, or if a particular network resource has been (or can be) attached, or if the station -can- log into a network (IOW if the necessary client software is present to operate on a network, even if not logged in presently), or something else?
What I'm doing is creating a utility that shows files in use on a workstation or server. If the user is connected to a network, I want to show available servers, just like network neighborhood does. If not, I want to show the computer name.
I'm thinking that I can use WNetEnumResource and if it returns an error code, assume that I'm not connected and show the computer name. If it doesn't, show the servers.
Sound reasonable?
Greg
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only