Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem using Anetresources()
Message
De
21/06/1999 19:07:55
 
 
À
21/06/1999 17:48:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00232233
Message ID:
00232271
Vues:
14
>I'm having a problem using anetresources()
>
>Here is the test code I used:
>
>*!* compname.prg
>DECLARE laNames [4,4]
>lnReturnCode=ANETRESOURCES(laNames,"\\workgroup",1)
>? lnReturnCode
>? laNames[1,1]
>
>
>It keeps setting lnReturnCode to 0 (no network resources found) and the array is empty. The only thing I can think is that the second parameter ("\\workgroup") is incorrect. I used the workgroup name specified in network properties under the identification tab (WIN95) . Has ANYONE used anetresources() successfully? There doesn't seem to be any sample code in the docs.

ANetResources expects to get the name of a machine if a name is specified or the name of a domain if a domain is specified. If you do not have either a domain or a machine named \\WORKGROUP, you'll get nothing back.

You may want to look at my NETRSC class; there's sample code there that hunts down all shares on all nets. It requires my CLSHEAP library as well. Both can be downloaded from here on UT.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform