Each time GetNextDoc() is called, DocId will contain the doc id of the previous document.
DataSource Class | dtSearch.Engine Namespace