IEnumCERTVIEWCOLUMN::GetDisplayName method (certview.h)
The GetDisplayName method retrieves the localized name of the current column in the column-enumeration sequence.
Syntax
HRESULT GetDisplayName(
[out] BSTR *pstrOut
);
Parameters
[out] pstrOut
A pointer to a variable of BSTR type that contains the localized name of the column.
Return value
C++
If the method succeeds, the method returns S_OK and the pstrOut parameter contains the localized 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 localized name of the column.Remarks
This method is used to retrieve the localized name of the column currently referenced by the column-enumeration sequence.
If the column-enumeration sequence is not referencing a valid column, GetDisplayName will fail. Use one of the following methods to navigate through the enumeration:
- IEnumCERTVIEWCOLUMN::Reset: Moves to the beginning of the enumeration sequence.
- IEnumCERTVIEWCOLUMN::Next: Moves to the next column in the enumeration sequence.
- IEnumCERTVIEWCOLUMN::Skip: Skips a specified number of columns.
Examples
BSTR bstrDisplay = NULL;
HRESULT hr;
// pEnumCol is previously instantiated IEnumCERTVIEWCOLUMN object.
hr = pEnumCol->GetDisplayName(&bstrDisplay);
if (S_OK == hr)
printf("Column name is %ws\n", bstrDisplay);
// Done processing, clear resources.
if (NULL != bstrDisplay)
SysFreeString(bstrDisplay);
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 |