enumeration specifies the scope of a directory search.
typedef enum __MIDL___MIDL_itf_ads_0000_0000_0021 ADS_SCOPE_BASE , ADS_SCOPE_ONELEVEL , ADS_SCOPE_SUBTREE ADS_SCOPEENUM;
Limits the search to the base object. The result contains, at most, one object.
Searches one level of the immediate children, excluding the base object.
Searches the whole subtree, including all the children and the base object itself.
If you do not explicitly set the search scope, the default isADS_SCOPE_SUBTREE.
Because VBScript cannot read data from a type library, VBScript applications do not recognize the symbolic constants as defined above. Use the numerical constants, instead, to set the appropriate flags in your VBScript applications. To use the symbolic constants as a good programming practice, create explicit declarations of such constants, as done here, in your VBScript applications.
Search scope is one of the search preferences clients can specify. The following code example shows how to accomplish this using theADS_SEARCHPREF_INFOstructure, together with the elements defined in theADS_SEARCHPREF_ENUMand this enumeration.
ADS_SEARCHPREF_INFO prefInfo; prefInfo.dwSearchPref = ADS_SEARCHPREF_SEARCH_SCOPE; prefInfo.vValue.dwType = ADSTYPE_INTEGER; teger = ADS_SCOPE_SUBTREE;
The feedback system for this content will be changing soon. Old comments will not be carried over. If content within a comment thread is important to you, please save a copy. For more information on the upcoming change,we invite you to read our blog post.