IEnumCERTVIEWROW::EnumCertViewExtension method (certview.h)

The EnumCertViewExtension method obtains an instance of an extension-enumeration sequence for the current row of the row-enumeration sequence.

Syntax

HRESULT EnumCertViewExtension(
  [in]          LONG                   Flags,
  [out, retval] IEnumCERTVIEWEXTENSION **ppenum
);

Parameters

[in] Flags

C++ A LONG value. Must be zero.
VB A Long value. Must be zero.

[out, retval] ppenum

A pointer to a pointer of IEnumCERTVIEWEXTENSION type.

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 is an extension-enumeration sequence object.

Remarks

The extension-enumeration sequence obtained by this call can be used to enumerate the extensions associated with the certificate in the current row. This enumeration can be accessed through the methods of the IEnumCERTVIEWEXTENSION interface.

To reference a different row, call one of the following methods to navigate through the row-enumeration sequence:

Examples

// pEnumRow is previously instantiated pointer to IEnumCERTVIEWROW.
LONG       Index;
HRESULT    hr;
IEnumCERTVIEWEXTENSION * pEnumExt = NULL;
// Obtain enumerator for extensions.
hr = pEnumRow->EnumCertViewExtension(0, &pEnumExt);
if (FAILED(hr))
{
    printf("Failed EnumCertViewExtension - %x\n", hr);
    goto error;
}
// Enumerate each extension.
while (S_OK == pEnumExt->Next(&Index))
{
    // Use this extension as needed.
}
error:

// Free resources.
if (NULL != pEnumExt)
    pEnumExt->Release();

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

IEnumCERTVIEWEXTENSION

IEnumCERTVIEWROW

IEnumCERTVIEWROW::Next

IEnumCERTVIEWROW::Reset

IEnumCERTVIEWROW::Skip