Platform SDK: Active Directory, ADSI, and Directory Services |
The ADS_DEREFENUM enumeration specifies the behavior in which aliases are dereferenced.
typedef enum { ADS_DEREF_NEVER = 0, ADS_DEREF_SEARCHING = 1, ADS_DEREF_FINDING = 2, ADS_DEREF_ALWAYS = 3 } ADS_DEREFENUM;
The IDirectorySearch interface uses these constants to set the alias dereferencing behavior. If no option is specified, the server determines the default behavior.
Note Because VBScript cannot read information from a type library, VBScript applications do not understand the symbolic constants as defined above. You should use the numerical constants instead to set the appropriate flags in your VBScript applications. If you want to use the symbolic constants as a good programming practice, you should make explicit declarations of such constants, as done here, in your VBScript applications.
The following C++ code snippet illustrates how to set the search preference for alias dereferencing. m_pSearch refers to a pointer to an object implementing the IDirectorySearch interface.
ADS_SEARCHPREF_INFO prefInfo[1]; HRESULT hr; prefInfo[0] = ADS_SEARCHPREF_DEREF_ALIASES; prefInfo[0].vValue.dwType = ADSTYPE_INTEGER; prefInfo[0].vValue.Integer = ADS_DEREF_ALWAYS; hr = m_pSearch->SetSearchPreference(prefInfo, 1);
Windows NT/2000: Requires Windows 2000 (or Windows NT 4.0 with DSClient).
Windows 95/98: Requires Windows 95 or later (with DSClient).
Header: Declared in Iads.h.