Kevin,
Returning 103 users in 5 seconds isn't really that big a deal, IMO. What is happening is:
1. Searching the network for a domain
2. Getting an object reference to that domain
3. Checking every item contained in the domain container to see if it is a user object
4. If it is a user, add that to your array
Domains can contain Users, Computers and Groups. The more items you have, the more VFP has to sift through. The network connection can also speed up/slow down the process. If you have a 100 MBit network or faster, you will get the information faster than a 10 MBit network.
FWIW, I ran a test using the code on our network. It can take awhile.
Number of objects in the domain: 4170
Number of user objects: 3787
Total time: 137.9 seconds
For local machines, it works the same way except you don;t need the Domain designation.
ocomputer = getobject('WinNT://MyComputer,computer')
You still need to filter the contained objects because a computer can hold users, groups, services, fileservices and printqueues.
>Larry,
>
>The more I look at this, it's still not quite right.
>
>The problem is that while this routine does give me a
>list of user's, it's taking almost 5 seconds to run. And
>it's only returning 103 users.
>
>I'm popuplating an app array property on startup, so that
>I can reference it throughout my app.
>
>On startup now there is a 5 second delay, which is a bit much.
>
>Any ideas?
>
>Also, how would this work on a stand alone PC? Or would it?
>
>Thanks
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao