The HrQueryAllRows function retrieves all rows of a table.
Header file: | MAPIUTIL.H |
Implemented by: | MAPI |
Called by: | Client applications and service providers |
HRESULT HrQueryAllRows(
LPMAPITABLE ptable,
LPSPropTagArray ptaga,
LPSRestriction pres,
LPSSortOrderSet psos,
LONG crowsMax,
LPSRowSet FAR * pprows
);
A client application or service provider has no control over the number of rows HrQueryAllRows attempts to retrieve, other than by imposing a restriction pointed to by the pres parameter. The crowsMax parameter does not limit the retrieval to a certain number of table rows, but rather defines a maximum amount of memory available to hold all retrieved rows. The only protection against massive memory overflow is the stopgap feature provided by setting crowsMax. The error return MAPI_E_TABLE_TOO_BIG means the table contains too many rows to be held all at once in memory.
Tables that are typically small, such as a message store table or a provider table, usually can be safely retrieved with HrQueryAllRows. Tables at risk of being very large, such as a contents table or even a recipients table, should be traversed in subsections using the IMAPITable::QueryRows method.
If any table properties are undefined when HrQueryAllRows is called, they are returned with property type PT_NULL and property identifier PROP_ID_NULL