IEnumCERTVIEWEXTENSION::Skip method (certview.h)

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

Syntax

HRESULT Skip(
  [in] LONG celt
);

Parameters

[in] celt

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

Return value

VB

If the method succeeds, the method returns S_OK.

A return value of E_INVALIDARG indicates that a negative value for the celt parameter caused the extension-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 IEnumCERTVIEWEXTENSION::Next method to reference the current extension in the extension-enumeration sequence. The extension name, flags, and value can be accessed through the following methods:

The extension-enumeration sequence maintains an internal zero-based index. The call to the Skip method causes this index to increase or decrease by the number of extensions specified in 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 IEnumCERTVIEWEXTENSION::Next is undefined.

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

Examples

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

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

IEnumCERTVIEWEXTENSION::Next