IEnumCERTVIEWROW::Skip method

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

Syntax


HRESULT Skip(
  [in] LONG celt
);

Parameters

celt [in]

The number of rows to skip. A positive value for the celt parameter causes the row-enumeration sequence to skip forward in the enumeration sequence. A negative value for the celt parameter causes the row enumeration sequence to skip backward in the enumeration sequence.

Return value

VB

If the method succeeds, the method returns S_OK.

A return value of E_INVALIDARG indicates that the celt parameter was set to a negative number which caused the row-enumeration sequence index to become less than zero.

If the method fails, it returns an HRESULT value that indicates the error. For a list of common error codes, see Common HRESULT Values.

Remarks

Upon successful completion of this method, call the IEnumCERTVIEWROW::Skip method to reference the current row in the row-enumeration sequence. After this second call is made, the columns, attributes, and extensions associated with the certificate in the row can be enumerated using the methods of the following interfaces:

The row-enumeration sequence maintains an internal zero-based index. The call to the Skip method causes this index to increase or decrease based on the setting of the celt parameter.

If a negative value of the celt parameter causes the index to be less than zero, the behavior of subsequent calls to Next is undefined.

If a positive value of the celt parameter causes the index to exceed the last row in the enumeration sequence, a subsequent call to the Next method will fail.

Examples


// 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)
{
    // Use this row as needed.
}

error:

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

Requirements

Minimum supported client

None supported

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Certview.h (include Certsrv.h)

Library

Certidl.lib

DLL

Certadm.dll

IID

IID_IEnumCERTVIEWROW is defined as d1157f4c-5af2-11d1-9bdc-00c04fb683fa

See also

IEnumCERTVIEWATTRIBUTE
IEnumCERTVIEWCOLUMN
IEnumCERTVIEWEXTENSION
IEnumCERTVIEWROW
IEnumCERTVIEWROW::Next
IEnumCERTVIEWROW::Reset

 

 

Show: