IEnumCERTVIEWROW::Next method

The Next method moves to the next row in the row-enumeration sequence.

Syntax


HRESULT Next(
  [out]  LONG *pIndex
);

Parameters

pIndex [out]

A pointer to a variable that contains the index value of the next row being referenced. If there are no more rows to enumerate, this variable will be set to –1. This method fails if pIndex is NULL.

Return value

C++

If the method succeeds, the method returns S_OK and the next row is now being referenced by the row-enumeration sequence. If there are no more rows to enumerate, S_FALSE is returned, and pIndex is set to a value of –1.

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

VB

The return value is the index value of the row that is now being referenced by the row-enumeration sequence. If there are no more rows to enumerate, the return value is –1.

Remarks

Upon successful completion of this method, the columns, attributes, and extensions associated with the certificate in the row can be enumerated using the methods of the following interfaces:

Looping through all the rows in the enumeration sequence can be resource-intensive to compute, depending of the query involved and the size of the sequence.

Examples


// pEnumRow is previously instantiated pointer to IEnumCERTVIEWROW.
LONG  Index;
LONG  nCount;

// Ensure enumerator is at first row.
if (FAILED(pEnumRow->Reset()))
    printf("Failed to Reset\n");
else
{
    nCount = 0;
    // Count the database records by enumerating the rows.
    while (S_OK == pEnumRow->Next(&Index))
        nCount++;
    // Display number of records.
    printf("Number of records is %d\n", nCount);
}

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

 

 

Community Additions

ADD
Show:
© 2014 Microsoft