IEnumCERTVIEWEXTENSION::Skip

[This is preliminary documentation and subject to change.]

The Skip method skips a specified number of extensions in the IEnumCERTVIEWEXTENSION enumeration sequence.

[VB] Skip(
  Long celt
);
 
[JAVA] Skip(
  int celt
);
 
[C++] HRESULT Skip(
  LONG celt  // in
);
 

Parameters

celt
Number of extensions for the IEnumCERTVIEWEXTENSION object to skip. A positive value for celt causes the IEnumCERTVIEWEXTENSION object to skip forward in the enumeration sequence; a negative value for celt causes the IEnumCERTVIEWEXTENSION object to skip backward in the enumeration sequence.

Return Values

[C++] The return value is an HRESULT. A value of S_OK indicates success. A return value of E_INVALIDARG indicates that a negative value for celt caused the IEnumCERTVIEWEXTENSION object's index to become less than zero.

Remarks

Upon successful completion of this function, the IEnumCERTVIEWEXTENSION object will have skipped celt extensions in the enumeration sequence. To access the extension contents after a call to the IEnumCERTVIEWEXTENSION Skip method, call the IEnumCERTVIEWEXTENSION Next method.

The IEnumCERTVIEWEXTENSION object maintains an internal value representing the zero-based index of the extension to be accessed when the IEnumCERTVIEWEXTENSION Next method is called. A call to the IEnumCERTVIEWEXTENSION Skip method causes this index to increase by celt if celt is positive, or to decrease by celt if celt is negative.

Negative values for celt are validated, and this function will fail if celt causes the index to be less than zero.

Positive values for celt are not validated, but if a positive value for celt causes the internal value to exceed the index for the last column in the enumeration sequence, a subsequent call to the IEnumCERTVIEWEXTENSION Next method will fail.

Example

HRESULT    hr;
LONG       Index;

// pEnumExt is previously instantiated IEnumCERTVIEWEXTENSION object
// skip the next 5 extensions
hr = pEnumExt->Skip( 5 );
if ( S_OK == hr ) 
{
    // get the next extension
    hr = pEnumExt->Next( &Index );
    if ( S_OK == hr )
    {
        // do something with this extension
        //…
    }
}
 

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::Next, IEnumCERTVIEWEXTENSION::Reset