Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ADSI and the Filter property
Message
 
 
To
14/01/2003 15:41:17
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00741601
Message ID:
00742612
Views:
18
Steve,
AFAIK, you can't do this nativly in VFP. You may be able to create a Safearray using Ed Rauh's FAQ#7979. If you don't want to delve into the depths of the API, you can simply apply the filter within VFP by explicitly checking the class property within the FOR EACH ... ENDFOR loop.

I haven't done any performance testing to see if one way is faster or not.

HTH.

>I am trying to translate a script into Fox, but I haven't figured out how to make the 'Filter' part work. I can assign values to filter, but its not actually filtering anything. I have tried various approaches to setting the filter property, but so far nothing works. In the script, the filter is assigned as
>
>oDomain.Filter = ARRAY("computer")
>
>Thanks
>
>
>DIMENSION laFilter[1]
>laFilter[1] = 'computer'
>oDomain = GetObject('WinNT:\\MyDomain')
>oDomain.Filter = laFilter
>FOR EACH oItem IN oDomain
>   ? oItem.Name, oItem.Class
>ENDFOR
>
>
>The following works, but I would like to figure out how to use the filter
>
>FOR EACH oItem IN oDomain
>   IF oItem.class = 'Computer'
>      ? oItem.Name, oItem.Class
>   ENDIF
>ENDFOR
>
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