IEnumCERTVIEWATTRIBUTE::Skip method (certview.h)
The Skip method skips a specified number of attributes in the attribute-enumeration sequence.
Syntax
HRESULT Skip(
[in] LONG celt
);
Parameters
[in] celt
The number of attributes to skip. A positive value for the celt parameter causes the attribute-enumeration sequence to skip forward in the sequence. A negative value for the celt parameter causes the attribute-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 attribute-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 IEnumCERTVIEWATTRIBUTE::Next method to reference the current attribute in the attribute-enumeration sequence. The attribute name and value can be accessed through the following methods:
The attribute-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 attributes 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 IEnumCERTVIEWATTRIBUTE::Next is undefined.
If a positive value of the celt parameter causes the index to exceed the last attribute in the enumeration sequence, a subsequent call to the IEnumCERTVIEWATTRIBUTE::Next method will fail.
Examples
HRESULT hr;
LONG Index;
// pEnumAttr is previously instantiated IEnumCERTVIEWATTRIBUTE object
// skip the next 5 attributes
hr = pEnumAttr->Skip(5);
if (S_OK == hr)
{
// get the next attribute
hr = pEnumAttr->Next(&Index);
if (S_OK == hr)
{
// Use this attribute 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 |