IEnumCERTVIEWATTRIBUTE::GetValue

[This is preliminary documentation and subject to change.]

The GetValue method retrieves the attribute value.

[VB] String GetValue();
 
[JAVA] java.lang.String GetValue();
 
[C++] HRESULT GetValue(
  BSTR *pstrOutValue  // out
);
 

Parameters

[C++] pstrOutValue
Pointer to a BSTR type that will contain the value of the attribute. This function will fail if pstrOutValue is NULL. It is the caller's responsibility to call SysFreeString when done with pstrOutValue.

Return Values

[VB][JAVA] The return value is a String representing the value of the attribute.

[C++] The return value is an HRESULT. A value of S_OK indicates success.

Remarks

This function is used to retrieve the data in the attribute currently being referenced by the IEnumCERTVIEWATTRIBUTE object.

If the IEnumCERTVIEWATTRIBUTE object is not referencing a valid attribute, GetValue will fail. Use IEnumCERTVIEWATTRIBUTE::Next to reference a valid attribute.

Example

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 %S\n",bstrAttribValue );

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

QuickInfo

  Windows NT: Requires version 5.0 or later.
  Windows: Unsupported.
  Windows CE: Unsupported.
  Header: Declared in certview.h.
  Import Library: Use certidl.lib.

See Also

IEnumCERTVIEWATTRIBUTE::GetName