ADS_STATUS

Values from the ADS_STATUS enumeration indicate if a search preference has been set and if not, why not.

typedef enum {
    ADS_STATUS_S_OK     = 0,
    ADS_STATUS_INVALID_SEARCHPREF,
    ADS_STATUS_INVALID_SEARCHPREFVALUE
} ADS_STATUSENUM;
typedef ADS_STATUSENUM ADS_STATUS, *PADS_STATUS;
 

Elements

ADS_STATUS_S_OK
The search preference was set successfully.
ADS_STATUS_INVALID_SEARCHPREF
The search preference specified in the dwSearchPref member of the ADS_SEARCHPREF_INFO structure is invalid. Search preferences must be taken from the ADS_SEARCHPREF enumeration.
ADS_STATUS_INVALID_SEARCHPREFVALUE
The value specified in the vValue member of the ADS_SEARCHPREF_INFO structure is invalid for the corresponding search preference.

Remarks

The IDirectorySearch::SetSearchPreferences method writes values from the ADS_STATUS enumeration to the dwStatus member of an ADS_SEARCHPREF_INFO structure to indicate whether the corresponding search preference was set. Callers can use this status value to decide whether to execute a search.