Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

IEnumCERTVIEWCOLUMN::GetType method

The GetType method retrieves the data type of the current column in the column-enumeration sequence.

Syntax


HRESULT GetType(
  [out]  LONG *pType
);

Parameters

pType [out]

A pointer to a variable of LONG type that denotes the data type of the column referenced by the column-enumeration sequence. For a table of the valid data types, see Remarks. This method fails if the pType parameter is set to NULL.

Return value

C++

If the method succeeds, the method returns S_OK.

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 represents the data type of the column. For a table of the valid data types, see Remarks.

Remarks

This method is used to determine the data type of the column currently referenced by the column-enumeration sequence. The valid data types are listed in the following table.

Data typeMeaning
PROPTYPE_BINARYBinary data
PROPTYPE_DATEDate/time
PROPTYPE_LONGSigned long
PROPTYPE_STRINGUnicode string

 

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

Examples


LONG     nType;
HRESULT  hr;

// pEnumCol is a 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;
    }
}

Requirements

Minimum supported client

None supported

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Certview.h (include Certsrv.h)

Library

Certidl.lib

DLL

Certadm.dll

IID

IID_IEnumCERTVIEWCOLUMN is defined as 9c735be2-57a5-11d1-9bdb-00c04fb683fa

See also

IEnumCERTVIEWCOLUMN
IEnumCERTVIEWCOLUMN::Next
IEnumCERTVIEWCOLUMN::Reset
IEnumCERTVIEWCOLUMN::Skip

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.