IMAPITable::GetRowCount
The IMAPITable::GetRowCount
method returns the total number of rows in the table.
Quick Info
See IMAPITable
: IUnknown
HRESULT GetRowCount(
ULONG ulFlags,
|
|
ULONG FAR * lpulCount |
|
) |
|
Parameters
ulFlags
Reserved;
must be zero.
lpulCount
[out] Pointer
to the number of rows in the table.
Return Values
S_OK
The row count
was successfully returned.
MAPI_E_BUSY
Another
operation is in progress that prevents the row count retrieval operation from
starting. Either the operation in progress should be allowed to complete or it
should be stopped.
MAPI_E_NO_SUPPORT
The table
cannot calculate the number of rows.
MAPI_W_APPROX_COUNT
The call
succeeded, but an approximate row count was returned because the exact row
count could not be determined possibly due to memory constraints. To test for
this warning, use the HR_FAILED macro. See Using Macros for Error
Handling
Remarks
The IMAPITable::GetRowCount
method retrieves the total number of rows in a table.
Notes to Implementers
If you cannot
determine the table s exact row count, return MAPI_W_APPROX_COUNT and an
approximate row count in the contents of the lpulCount parameter.
Notes to Callers
Use GetRowCount
to find out how many rows a table holds before making a call to the IMAPITable::QueryRows
Some tables
do not support GetRowCount and return MAPI_E_NO_SUPPORT. If GetRowCount
is not supported, an alternative might be to call IMAPITable::QueryPosition
When GetRowCount
returns MAPI_E_BUSY because it is temporarily unable to retrieve a row count,
call the IMAPITable::WaitForCompletion
See Also