Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Anetresources
Message
 
 
To
11/12/2003 10:49:09
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00858130
Message ID:
00858234
Views:
16
Mark,
Check out the NetResource (File#9502) and ClsHeap (File#9482) files in the Download section. Both were written by the late, great Ed Rauh and there are code samples available.

HTH.

>I have an application that needs to gather a list of all Windows machines available on the local network. The app will then display part of the list and let the user select from it. Most of the machines are the default workgroup called "WORKGROUP" and I can see them by running this test code:
>
>a = ANETRESOURCES(b, "workgroup", 0)
>FOR c = 1 TO a
> ? b(c)
>ENDFOR
>
>However, some machines that the app needs to see may be in another workgroup and I don't want to have to hard-code any workgroups in the app. I've tried running the same code replacing "workgroup" with "", and I get 2 results:
>
>NetWare Services
>Microsoft Windows Network
>
>Manually navigating through My Network Places gives me these 2 options at the "Entire Network" level. Drilling down into Microsoft Windows Network gives me a list of 3 workgroups. Drilling down into workgroup "workgroup" gives me a list of the machines (from the first time I ran the code above). How can I get ANETRESOURCES (or another function) to return a list of the workgroups available? Replacing "workgroup" with "Microsoft Windows Network" in the above code doesn't work.
>
>Mark
Larry Miller
MCSD
LWMiller3@verizon.net

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

Click here to load this message in the networking platform