IADsPropertyValue2::GetObjectProperty method (iads.h)

The IADsPropertyValue2::GetObjectProperty method retrieves an attribute value.

Syntax

HRESULT GetObjectProperty(
  [in, out] long    *lnADsType,
  [out]     VARIANT *pvProp
);

Parameters

[in, out] lnADsType

Pointer to a variable that, on entry, contains one of the ADSTYPEENUM values that specifies the data format that the value should be returned.

If the data type is not known, set this to ADSTYPE_UNKNOWN. In this case, this method will obtain the attribute value in the default data type and set this variable to the corresponding ADSTYPEENUM value. If any other ADSTYPEENUM value is specified, ADSI will return the attribute value only if the data type matches the format of the value.

[out] pvProp

Pointer to a VARIANT that receives the requested attribute value. The variant type of this data will depend on the value returned in lnADsType. For more information and a list of the lnADsType values and corresponding pvProp variant types, see IADsPropertyValue2.

Return value

Returns S_OK if successful or one of the following 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

ADSTYPEENUM

IADsPropertyValue

IADsPropertyValue2