IEnumCERTVIEWEXTENSION::GetName method

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

The returned extension name is an object identifier (OID) string, as in L"2.5.29.31".

Syntax


HRESULT GetName(
  [out] BSTR *pstrOut
);

Parameters

pstrOut [out]

A pointer to a value of BSTR type that contains the name of the extension.

Return value

C++

If the method succeeds, the method returns S_OK and tat the pstrOut parameter is set to the name of the extension.

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 extension.

Remarks

This function is used to retrieve the name of the extension currently referenced by the extension-enumeration sequence.

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

Examples


BSTR  bstrExtName = NULL;

// pEnumExt is previously instantiated IEnumCERTVIEWEXTENSION object
hr = pEnumExt->GetName(&bstrExtName);
if (S_OK == hr)
    printf("Extension name is: %ws\n", bstrExtName);
else
    printf("GetName failed: %x\n", hr);

// free memory when done
if (NULL != bstrExtName)
    SysFreeString(bstrExtName);

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_IEnumCERTVIEWEXTENSION is defined as e7dd1466-7653-11d1-9bde-00c04fb683fa

See also

IEnumCERTVIEWEXTENSION
IEnumCERTVIEWEXTENSION::GetFlags
IEnumCERTVIEWEXTENSION::GetValue
IEnumCERTVIEWEXTENSION::Next
IEnumCERTVIEWEXTENSION::Reset
IEnumCERTVIEWEXTENSION::Skip

 

 

Show: