Speed up ADSI 
Author Message
 Speed up ADSI

I'm wrote a function to retrieve the users of my domain using ADSI that
looks like this:
================================================
Private Sub PrintUsers

Dim AllUsers As IADsContainer
Dim NTUser As IADsUser

On Error Resume Next

    Set AllUsers = GetObject("WinNT://My_Domain")

    For Each NTUser In AllUsers
           Print NTUser.Name & vbTab & NTUser.FullName
    Next NTUser

End Sub
================================================

The problem is that the first time I do the GetObject call takes up to 9
seconds to retrieve the data. I tried the same functionallity using API
calls and they do the same work much faster.
Is there any way of speeding up the object creation?
( Otherwise I'll be forced to make my own API encapsulation)

Thanks for all your help until now
--
Dani Ruber
iMDsoft
Israel

(To mail me, remove nospam from my E-Mail address)



Sun, 13 May 2001 03:00:00 GMT  
 Speed up ADSI
What version of ADSI are you working with?



Quote:
> I'm wrote a function to retrieve the users of my domain using ADSI that
> looks like this:
> ================================================
> Private Sub PrintUsers

> Dim AllUsers As IADsContainer
> Dim NTUser As IADsUser

> On Error Resume Next

>     Set AllUsers = GetObject("WinNT://My_Domain")

>     For Each NTUser In AllUsers
>            Print NTUser.Name & vbTab & NTUser.FullName
>     Next NTUser

> End Sub
> ================================================

> The problem is that the first time I do the GetObject call takes up to 9
> seconds to retrieve the data. I tried the same functionallity using API
> calls and they do the same work much faster.
> Is there any way of speeding up the object creation?
> ( Otherwise I'll be forced to make my own API encapsulation)

> Thanks for all your help until now
> --
> Dani Ruber
> iMDsoft
> Israel

> (To mail me, remove nospam from my E-Mail address)



Sat, 19 May 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Speed, Speed, and Speed!

2. Speed Speed Speed - Cutting down on wasted cycles

3. VB6 Speed vs VB.Net Speed

4. VB 3.0 speed vs. VB 4.0 speed

5. Delphi exe speed vs VB exe speed?

6. Delphi speed vs VB speed?

7. Dial Ups

8. Microsoft Press More Than 300 Titles + FREE UPS Ground shipping

9. Outlook Hang ups

10. Pop-ups in MS Office

11. Dial Ups

12. Default Dial Ups

 

 
Powered by phpBB® Forum Software