IEnumCERTVIEWEXTENSION::Next

[This is preliminary documentation and subject to change.]

The Next method positions the IEnumCERTVIEWEXTENSION object to the next extension.

[VB] Long Next();
 
[JAVA] int Next(
);
 
[C++] HRESULT Next(
  LONG *pIndex   // out
);
 

Parameters

[C++] pIndex
Pointer to LONG variable that will contain the index value of the next extension referenced. If there are no more extensions to enumerate, this variable will be set to – 1. This function will fail if pIndex is NULL.

Return Values

[VB][JAVA] The return value is the index value of the next column that will be referenced by the IEnumCERTVIEWEXTENSION object. If there are no more extensions to enumerate, the return value will be – 1.

[C++] The return value is an HRESULT. A value of S_OK indicates success and that the next extension is now being referenced. If there are no more attributes, S_FALSE is returned, and pIndex will point to a value of – 1.

Remarks

Upon successful completion of this function, the IEnumCERTVIEWEXTENSION object will be referencing the next extension. When the extension is referenced, the extension name, flags, and value can be accessed through the IEnumCERTVIEWEXTENSION methods GetName, GetFlags, and GetValue.

Example

LONG         Index;
LONG         nCount;

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

QuickInfo

  Windows NT: Requires version 5.0 or later.
  Windows: Unsupported.
  Windows CE: Unsupported.
  Header: Declared in certview.h.
  Import Library: Use certidl.lib.

See Also

IEnumCERTVIEWEXTENSION::GetName, IEnumCERTVIEWEXTENSION::GetValue, IEnumCERTVIEWEXTENSION::Reset, IEnumCERTVIEWEXTENSION::Skip