IEnumCERTVIEWEXTENSION::Next method (certview.h)

The Next method moves to the next extension in the extension-enumeration sequence.

Syntax

HRESULT Next(
  [out] LONG *pIndex
);

Parameters

[out] pIndex

A pointer to a variable that contains the index value of the next extension being referenced. If there are no more extensions to enumerate, this variable will be set to –1. This method fails if pIndex is NULL.

Return value

C++

If the method succeeds, the method returns S_OK and the next extension is now being referenced. If there are no more extensions, S_FALSE is returned, and the pIndex parameter is set to a value of –1.

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 the index value of the extension that is now referenced by the extension-enumeration sequence. If there are no more extensions to enumerate, the return value is –1.

Remarks

Upon successful completion of this method, the extension name, flags, and value can be accessed through the following methods:

Examples

LONG  Index;
LONG  nCount;

// determine the number of extensions
nCount = 0;
// pEnumExt is previously instantiated IEnumCERTVIEWEXTENSION object
while (S_OK == pEnumExt->Next(&Index))
{
    nCount++;
}
printf("Number of extensions is %d\n", nCount);

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

IEnumCERTVIEWEXTENSION::GetFlags

IEnumCERTVIEWEXTENSION::GetName

IEnumCERTVIEWEXTENSION::GetValue