Platform SDK: Active Directory, ADSI, and Directory Services |
The ADS_CHASE_REFERRALS_ENUM enumeration specifies if and how referral chasing is pursued. When a server determines that other servers hold relevant information, in part or as a whole, it may refer the client to another server to obtain the result. Referral chasing is the action taken by a client to contact the referred-to server to continue the directory search.
typedef enum { ADS_CHASE_REFERRALS_NEVER = 0x00, ADS_CHASE_REFERRALS_SUBORDINATE = 0x20, ADS_CHASE_REFERRALS_EXTERNAL = 0x40, ADS_CHASE_REFERRALS_ALWAYS = 0x20 | 0x40 } ADS_CHASE_REFERRALS_ENUM
Use the constants of this enumeration to set up search preferences for referral chasing. The action amounts to assigning the appropriate fields of the ADS_SEARCHPREF_INFO structure with elements of the ADS_CHASE_REFERRALS_ENUM and ADS_SEARCHPREF_ENUM enumerations.
The ADSI LDAP provider supports external referrals for paged searches, but does not support subordinate referrals during paging.
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 code snippet illustrates how to set up search preference for chasing referrals, in a C/C++ application.
/////////// int idx; ADS_SEARCHPREF_INFO prefInfo; idx = m_cChaseReferrals.GetCurSel(); if ( idx != CB_ERR ) { prefInfo.dwSearchPref = ADS_SEARCHPREF_CHASE_REFERRALS; prefInfo.vValue.dwType = ADSTYPE_INTEGER; switch( idx ) { case 0: prefInfo.vValue.Integer = ADS_CHASE_REFERRALS_NEVER; break; case 1: prefInfo.vValue.Integer = ADS_CHASE_REFERRALS_SUBORDINATE; break; case 2: prefInfo.vValue.Integer = ADS_CHASE_REFERRALS_EXTERNAL; break; default: prefInfo.vValue.Integer = ADS_CHASE_REFERRALS_EXTERNAL; } }
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.