IEnumCERTVIEWATTRIBUTE::GetValue method (certview.h)

The GetValue method retrieves the value of the current attribute in the attribute-enumeration sequence.

Syntax

HRESULT GetValue(
  [out] BSTR *pstrOut
);

Parameters

[out] pstrOut

A pointer to a BSTR type that contains the value of the attribute.

Return value

C++

If the method succeeds, the method returns S_OK and the pstrOut is set to the value of the current attribute.

To use this method, create a variable of BSTR type, set the variable equal to NULL, and pass the address of this variable as pstrOut. When you have finished using the BSTR, free it by calling the SysFreeString function.

If the method fails, it returns an HRESULT value that indicates the error. For a list of common error codes, see Common HRESULT Values.

VB

The return value is a String that represents the value of the current attribute.

Remarks

This method is used to retrieve the data in the attribute currently referenced by the attribute-enumeration sequence.

If the attribute-enumeration sequence is not referencing a valid attribute, GetValue will fail. Use one of the following methods to navigate through the enumeration:

Examples

BSTR    bstrAttribValue = NULL;

// pEnumAttr is previously instantiated IEnumCERTVIEWATTRIBUTE object
hr = pEnumAttr->GetValue(&bstrAttribValue);
if (S_OK != hr)
    printf("Failed call to GetValue - %x\n", hr);
else
    printf("Attribute value is %ws\n",bstrAttribValue);

// free memory when done
if (NULL != bstrAttribValue)
    SysFreeString(bstrAttribValue);

Requirements

Requirement Value
Minimum supported client None supported
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header certview.h (include Certsrv.h)
Library Certidl.lib
DLL Certadm.dll

See also

IEnumCERTVIEWATTRIBUTE

IEnumCERTVIEWATTRIBUTE::GetName

IEnumCERTVIEWATTRIBUTE::Next

IEnumCERTVIEWATTRIBUTE::Reset

IEnumCERTVIEWATTRIBUTE::Skip