IADsPropertyValue2::GetObjectProperty method

The IADsPropertyValue2::GetObjectProperty method retrieves an attribute value.


HRESULT GetObjectProperty(
  long    *lnADsType,
  VARIANT *pvProp



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.


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.


Windows version Windows Vista Windows Server 2008
Target Platform Windows
Header iads.h
DLL Activeds.dll

See Also

ADSI Error Codes