Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
COMARRAY, ADSI and Filters - Can't Get VFP Code to Operate
Message
From
27/01/2000 09:29:05
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
COMARRAY, ADSI and Filters - Can't Get VFP Code to Operate
Miscellaneous
Thread ID:
00323516
Message ID:
00323516
Views:
64
I'm trying to adapt some VB code to work from VFP using ADSI. Basically, I'm trying to use the Filter property of the interface object. Here's an example in VB where you filter a Domain object so that, when enumerated, it only lists Computer objects (other classes I want filtered out are User, Group, and Schema):
Set DomainObj = GETOBJECT( "WinNT://MyDomain")
strFilter = ARRAY( "Computer")
DomainObj.Filter = strFilter
I've tried this in VFP:

LOCAL loDom, laFilter[1]
loDom = GETOBJECT( "WinNT://MyDomain")
laFilter[1] = "Computer"
= COMARRAY( loDom, 0) && also tried 10

* Now, I've tried each of the following, with the noted error:
loDom.Filter( @laFilter) && Does not support a collection.
loDom.Filter = laFilter && No error, but no filtering either.
loDom.Put( "Filter", @laFilter) && COM Error 80005, unknown status code
loDom.PutEx( "Filter", @laFilter) && COM Error 80020005, type mismatch


Any ideas greatly appreciated!

-- Randy
Reply
Map
View

Click here to load this message in the networking platform