IEnumCERTVIEWROW::Skip

[This is preliminary documentation and subject to change.]

The Skip method skips a specified number of rows in the IEnumCERTVIEWROW enumeration sequence.

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

Parameters

celt
Number of rows for the IEnumCERTVIEWROW object to skip. A positive value for celt causes the IEnumCERTVIEWROW object to skip forward in the enumeration sequence; a negative value for celt causes the IEnumCERTVIEWROW 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 IEnumCERTVIEWROW object's index to become less than zero.

Remarks

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

The IEnumCERTVIEWROW object maintains an internal value representing the zero-based index of the row to be accessed when the IEnumCERTVIEWROW Next method is called. A call to the IEnumCERTVIEWROW 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 row in the enumeration sequence, a subsequent call to the IEnumCERTVIEWROW Next method will fail.

Example

// pEnumRow is previously instantiated pointer to IEnumCERTVIEWROW
HRESULT     hr;
LONG        Index;
// reposition the row enumerator to the beginning of the rows
hr = pEnumRow->Reset();
if (FAILED( hr ))
{
    printf("Unable to reset pEnumRow\n");
    goto error;
}
// skip some rows
hr = pEnumRow->Skip( 5 );
if ( FAILED( hr ) ) 
{
    printf("Unable to skip rows\n");
    goto error;
}

// get the next row
hr = pEnumRow->Next( &Index );
if ( S_OK == hr )
{
    // do something with this row
    …
}

error:

if ( NULL != pEnumRow )
    pEnumRow->Release();
 

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

IEnumCERTVIEWROW:Next, IEnumCERTVIEWROW::Reset