Events
Nov 19, 11 PM - Nov 21, 11 PM
Gain the competitive edge you need with powerful AI and Cloud solutions by attending Microsoft Ignite online.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
The GetType method retrieves the data type of the current column in the column-enumeration sequence.
HRESULT GetType(
[out] LONG *pType
);
[out] pType
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.
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.
The return value represents the data type of the column. For a table of the valid data types, see 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 type | Meaning |
---|---|
PROPTYPE_BINARY | Binary data |
PROPTYPE_DATE | Date/time |
PROPTYPE_LONG | Signed long |
PROPTYPE_STRING | Unicode 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:
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;
}
}
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 |
Events
Nov 19, 11 PM - Nov 21, 11 PM
Gain the competitive edge you need with powerful AI and Cloud solutions by attending Microsoft Ignite online.
Register now