Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Network PC Name
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00619784
Message ID:
00620301
Vues:
20
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform