Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

52 lines
1002 B

///////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 1998, Microsoft Corp. All rights reserved.
//
// FILE
//
// rowset.cpp
//
// SYNOPSIS
//
// This file defines the class Rowset.
//
// MODIFICATION HISTORY
//
// 02/20/1998 Original version.
// 04/21/1998 Get rid of unnecessary row assignment in moveNext().
//
///////////////////////////////////////////////////////////////////////////////
#include <ias.h>
#include <rowset.h>
bool Rowset::moveNext()
{
_com_util::CheckError(releaseRow());
DBCOUNTITEM numRows = 0;
HROW* pRow = &row;
HRESULT hr = rowset->GetNextRows(NULL, 0, 1, &numRows, &pRow);
_com_util::CheckError(hr);
return hr == S_OK && numRows == 1;
}
HRESULT Rowset::releaseRow() throw ()
{
if (row != NULL)
{
HRESULT hr = rowset->ReleaseRows(1, &row, NULL, NULL, NULL);
row = NULL;
return hr;
}
return S_OK;
}