GetRowsAtRatio

HRESULT GetRowsAtRatio(
ULONG ulNumerator, 
ULONG ulDenominator, 
long cRowsRequested, 
HROW*& phRows, 
ULONG& cRows);

Parameters

ulNumerator

The numerator portion of the ratio.

ulDenominator

The denominator portion of the ratio.

cRowsRequested

The number of rows to fetch. The number of rows actually fetched may be less than this value.

phRows

Reference to buffer to receive HROWs. If this argument is NULL then the callee will allocate an array large enough to hold the number of HROWs returned. Use CRowset::FreeRows, or a combination of CRowset::ReleaseRows and CoTaskMemFree to release the HROWS and free the callee-allocated buffer. If this argument is not NULL, then the caller must have allocated enough space to hold the requested number of HROWs.

cRows

Reference to buffer to receive the numbers of rows actually fetched. This value may be less than or equal to the number of rows requested.

Return Code

S_OK

Method succeeded.

E_NOINTERFACE

IRowsetScroll is not available.

E_FAIL

Returned if the object is not attached.

Comments

Uses IRowsetScroll::GetRowsAtRatio to fetch the number of requested rows at the position calculated by the given ratio.