IEnumCERTVIEWCOLUMN::GetName method (certview.h)

The GetName method retrieves the nonlocalized name of the current column in the column-enumeration sequence.

Syntax

HRESULT GetName(
  [out] BSTR *pstrOut
);

Parameters

[out] pstrOut

A pointer to a variable of BSTR type that contains the name of the column.

Return value

C++

If the method succeeds, the method returns S_OK and the pstrOut parameter contains the name of the column.

To use this method, create a variable of BSTR type, set the variable equal to NULL, and pass the address of this variable as pstrOut. When you have finished using the BSTR, free it by calling the SysFreeString function.

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 is a String that contains the name of the column.

Remarks

This method is used to retrieve the nonlocalized name of the column currently referenced by the column-enumeration sequence.

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

Examples

BSTR       bstrColName = NULL;
HRESULT    hr;

// pEnumCol is previously instantiated IEnumCERTVIEWCOLUMN object
hr = pEnumCol->GetName(&bstrColName);
if (S_OK == hr)
    printf("Column name is %ws\n", bstrColName);

// done processing, clear resources
if (NULL != bstrColName)
    SysFreeString(bstrColName);

Requirements

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

See also

IEnumCERTVIEWCOLUMN

IEnumCERTVIEWCOLUMN::Next

IEnumCERTVIEWCOLUMN::Reset

IEnumCERTVIEWCOLUMN::Skip