IADsObjectOptions::SetOption method (iads.h)

The IADsOptions.SetOption method sets a provider-specific option for manipulating a directory object.

Syntax

HRESULT SetOption(
  long    lnOption,
  VARIANT vValue
);

Parameters

lnOption

Indicates the provider-specific option to set. This parameter can be any value in the ADS_OPTION_ENUM enumeration except ADS_OPTION_SERVERNAME or ADS_OPTION_MUTUAL_AUTH_STATUS.

vValue

Specifies the value to set for the option specified in the lnOption parameter.

Return value

The method supports the standard return values, including S_OK for a successful operation and E_ADS_BAD_PARAMETER when the user has supplied an invalid pValue parameter. For more information, see ADSI Error Codes.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header iads.h
DLL Activeds.dll

See also

ADSI Error Codes

IADsObjectOptions