Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Network PC Name
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00619784
Message ID:
00620301
Views:
18
>Larry,
>
>I ran the code in the KB article, and it list all the mapped
>net drives.
>
>I'm looking to determine the PC name of other PC's on the network.
>
>Know what I mean?

That's right. I said it's a start. < s >

You need to change RESOURCE_CONNECTED to RESOURCE_GLOBALNET to start at the top. You also need to check the type of NETRESOURCE object using dwDisplayType. If it isn't a PC, pass it to the same function recursively to drill into it too. When you get to one that is RESOURCEDISPLAYTYPE_SERVER, it's a PC and you can do what you want.

Be forewarned, if you do this on a large local network or on a WAN, you will be waiting for a long time for it to finish. I once did it connected to a WAN that spanned the coutry, I let the process run for 20 minutes before I killed it. It still wasn't completed.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform