There is no such a code: S_ADS_NO_MORE_ROWS.
You probably meant S_ADS_NOMORE_ROWS
There are some examples in MSDN section "Platform SDK: Directory Services" showing how to perform a directory search... Did you use some of them?