[This is preliminary documentation and subject to change.]
The GetValue method retrieves the data value contained in the column.
[VB] Variant GetValue(
Long Flags
);
[JAVA] com.ms.Variant GetValue(
int Flags
);
[C++] HRESULT GetValue(
LONG Flags, // in
VARIANT *pvarValue // out
);
Flag | Meaning |
---|---|
CV_OUT_BASE64HEADER | BASE64 with begin/end |
CV_OUT_BASE64 | BASE64 without begin/end |
CV_OUT_BINARY | binary |
CV_OUT_BASE64REQUESTHEADER | BASE64 with begin/end |
CV_OUT_HEX | hex string |
CV_OUT_HEXASCII | hex string with Ascii+address |
[VB][JAVA] The return value is a Variant representing the data in the column.
[C++] The return value is an HRESULT. A value of S_OK indicates success.
This function is used to retrieve the data in the column currently being referenced by the IEnumCERTVIEWCOLUMN object.
If the IEnumCERTVIEWCOLUMN object is not referencing a valid column, GetValue will fail. Use the IEnumCERTVIEWCOLUMN Next method to reference a valid column.
HRESULT hr;
VARIANT var;
SYSTEMTIME systime;
VariantInit( &var);
// pEnumCol is previously instantiated IEnumCERTVIEWColumn object
hr = pEnumCol->GetValue( CV_OUT_HEX, &var );
if ( FAILED (hr) )
{
printf("Failed GetValue - %x\n", hr );
goto error;
}
switch( var.vt )
{
case VT_EMPTY:
printf( "VT_EMPTY\n" );
break;
case VT_BSTR:
printf("%S\n", var.bstrVal );
break;
case VT_DATE:
VariantTimeToSystemTime( var.date, &systime );
printf("%d.%d.%d %02d:%02d:%02d\n",
systime.wMonth,
systime.wDay,
systime.wYear,
systime.wHour,
systime.wMinute,
systime.wSecond );
break;
case VT_I2:
printf("%d\n", var.iVal );
break;
case VT_I4:
printf("%d\n", var.lVal );
break;
default:
printf("type is:%i\n", var.vt );
break;
}
// done processing, clear resources
VariantClear( &var );
Windows NT: Requires version 5.0 or later.
Windows: Unsupported.
Windows CE: Unsupported.
Header: Declared in certview.h.
Import Library: Use certidl.lib.
IEnumCERTVIEWCOLUMN::GetName, IEnumCERTVIEWCOLUMN::GetType