Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The ADS_DEREFENUM enumeration specifies the process through which aliases are dereferenced.
Syntax
typedef enum __MIDL___MIDL_itf_ads_0000_0000_0020 {
ADS_DEREF_NEVER = 0,
ADS_DEREF_SEARCHING = 1,
ADS_DEREF_FINDING = 2,
ADS_DEREF_ALWAYS = 3
} ADS_DEREFENUM;
Constants
ADS_DEREF_NEVER Value: 0 Does not dereference aliases when searching or locating the base object of the search. |
ADS_DEREF_SEARCHING Value: 1 Dereferences aliases when searching subordinates of the base object, but not when locating the base itself. |
ADS_DEREF_FINDING Value: 2 Dereferences aliases when locating the base object of the search, but not when searching its subordinates. |
ADS_DEREF_ALWAYS Value: 3 Dereferences aliases when both searching subordinates and locating the base object of the search. |
Remarks
The IDirectorySearch interface uses these constants to set the alias dereferencing behavior. If no option is specified, the server defaults to ADS_DEREF_NEVER.
Examples
The following code example shows 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].dwSearchPref = ADS_SEARCHPREF_DEREF_ALIASES;
prefInfo[0].vValue.dwType = ADSTYPE_INTEGER;
prefInfo[0].vValue.Integer = ADS_DEREF_ALWAYS;
hr = m_pSearch->SetSearchPreference(prefInfo, 1);
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista |
Minimum supported server | Windows Server 2008 |
Header | iads.h |