IEnumCERTVIEWCOLUMN::GetType

[This is preliminary documentation and subject to change.]

The GetType method retrieves the data type of the column.

[VB] Long GetType();
 
[JAVA] int GetType();
 
[C++] HRESULT GetType(
  LONG *pIndexed  // out
);
 

Parameters

[C++] pIndexed
Pointer to LONG type that will denote the data type of the referenced view column. This function will fail if pIndexed is NULL.

Return Values

[VB][JAVA] The return value represents the data type of the column.

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

Remarks

This function is used to determine the data type of the Certificate Server view column currently referenced by the IEnumCERTVIEWCOLUMN object. The valid data types are listed in the following table.

Data type Meaning
PROPTYPE_BINARY Binary data
PROPTYPE_DATE Date+Time
PROPTYPE_LONG Signed long
PROPTYPE_STRING Unicode String

If the IEnumCERTVIEWCOLUMN object is not referencing a valid column, GetType will fail. Use the IEnumCERTVIEWCOLUMN Next method to reference a valid column.

Example

LONG                     nType;
HRESULT                  hr;

// pEnumCol is previously instantiated IEnumCERTVIEWColumn object
hr = pEnumCol->GetType( &nType );
if ( S_OK ==  hr )
{
    switch ( nType )
    {
        case PROPTYPE_BINARY:
            printf("Type is Binary\n");
            break;
        case PROPTYPE_DATE:
            printf("Type is Date+Time\n");
            break;
        case PROPTYPE_LONG:
            printf("Type is Signed long\n");
            break;
        case PROPTYPE_STRING:
            printf("Type is Unicode String\n");
            break;
        default:
            printf("Type is unknown\n");
            break;
    }
}
 

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

IEnumCERTVIEWCOLUMN::GetName, IEnumCERTVIEWCOLUMN::GetValue