/* construct an explicit table */
MIds = talloc_zero(mem_ctx, struct SPropTagArray);
- retval = nspi_GetMatches(nspi_ctx, mem_ctx, NULL, &Filter, &srowset, &MIds);
+ retval = nspi_GetMatches(nspi_ctx, mem_ctx, NULL, &Filter, 5000, &srowset, &MIds);
MAPI_RETVAL_IF(retval, retval, NULL);
/* fetch the contents of the explicit table */
SRowSet = talloc_zero(mem_ctx, struct SRowSet);
MIds = talloc_zero(mem_ctx, struct PropertyTagArray_r);
- retval = nspi_GetMatches(nspi, mem_ctx, SPropTagArray, &Filter, &SRowSet, &MIds);
+ retval = nspi_GetMatches(nspi, mem_ctx, SPropTagArray, &Filter, 5000, &SRowSet, &MIds);
MAPIFreeBuffer(SPropTagArray);
MAPIFreeBuffer(lpProp);
if (retval != MAPI_E_SUCCESS) {
enum MAPISTATUS nspi_UpdateStat(struct nspi_context *, TALLOC_CTX *, uint32_t *);
enum MAPISTATUS nspi_QueryRows(struct nspi_context *, TALLOC_CTX *, struct SPropTagArray *, struct PropertyTagArray_r *MIds, uint32_t, struct SRowSet **);
enum MAPISTATUS nspi_SeekEntries(struct nspi_context *, TALLOC_CTX *, enum TableSortOrders, struct SPropValue *, struct SPropTagArray *, struct PropertyTagArray_r *pMIds, struct SRowSet **);
-enum MAPISTATUS nspi_GetMatches(struct nspi_context *, TALLOC_CTX *, struct SPropTagArray *, struct Restriction_r *, struct SRowSet **, struct PropertyTagArray_r **ppOutMIds);
+enum MAPISTATUS nspi_GetMatches(struct nspi_context *, TALLOC_CTX *, struct SPropTagArray *, struct Restriction_r *, uint32_t ulRequested, struct SRowSet **, struct PropertyTagArray_r **ppOutMIds);
enum MAPISTATUS nspi_ResortRestriction(struct nspi_context *, TALLOC_CTX *, enum TableSortOrders, struct PropertyTagArray_r *pInMIds, struct PropertyTagArray_r **ppMIds);
enum MAPISTATUS nspi_DNToMId(struct nspi_context *, TALLOC_CTX *, struct StringsArray_r *, struct PropertyTagArray_r **ppMIds);
enum MAPISTATUS nspi_GetPropList(struct nspi_context *, TALLOC_CTX *, bool, uint32_t, struct SPropTagArray **);
\param mem_ctx pointer to the memory context
\param pPropTags pointer to an array of property tags of columns
\param Filter pointer to the Restriction to apply to the table
+ \param ulRequested The upper limit for returned rows
\param ppRows pointer to pointer to a SRowSet structure holding the
rows returned by the server
\param ppOutMIds pointer to pointer to a list of MId that comprise
a restricted address book container
- \return MAPI_E_SUCCESS on success, otherwise MAPI error.
+ \return MAPI_E_SUCCESS on success, otherwise MAPI error. If the resulting
+ table rows count will be greater than ulRequested, then an error
+ MAPI_E_TABLE_TOO_BIG is returned. Note, this error can be also returned
+ when server limits for table size are exceeded.
*/
_PUBLIC_ enum MAPISTATUS nspi_GetMatches(struct nspi_context *nspi_ctx,
TALLOC_CTX *mem_ctx,
struct SPropTagArray *pPropTags,
struct Restriction_r *Filter,
+ uint32_t ulRequested,
struct SRowSet **ppRows,
struct PropertyTagArray_r **ppOutMIds)
{
r.in.Reserved2 = 0;
r.in.Filter = Filter;
r.in.lpPropName = NULL;
- r.in.ulRequested = 5000;
+ r.in.ulRequested = ulRequested;
r.in.pPropTags = pPropTags;
pStat = talloc(mem_ctx, struct STAT);
SRowSet = talloc_zero(mem_ctx, struct SRowSet);
MIds = talloc_zero(mem_ctx, struct PropertyTagArray_r);
- retval = nspi_GetMatches(nspi_ctx, mem_ctx, SPropTagArray, &Filter, &SRowSet, &MIds);
+ retval = nspi_GetMatches(nspi_ctx, mem_ctx, SPropTagArray, &Filter, 5000, &SRowSet, &MIds);
MAPIFreeBuffer(lpProp);
MAPIFreeBuffer(SRowSet);
MAPIFreeBuffer(SPropTagArray);
SRowSet = talloc_zero(mem_ctx, struct SRowSet);
MIds = talloc_zero(mem_ctx, struct PropertyTagArray_r);
- retval = nspi_GetMatches(nspi_ctx, mem_ctx, SPropTagArray, &Filter, &SRowSet, &MIds);
+ retval = nspi_GetMatches(nspi_ctx, mem_ctx, SPropTagArray, &Filter, 5000, &SRowSet, &MIds);
MAPIFreeBuffer(lpProp);
MAPIFreeBuffer(SRowSet);
MAPIFreeBuffer(SPropTagArray);
SRowSet = talloc_zero(mem_ctx, struct SRowSet);
MIds = talloc_zero(mem_ctx, struct PropertyTagArray_r);
- retval = nspi_GetMatches(nspi_ctx, mem_ctx, SPropTagArray, &Filter, &SRowSet, &MIds);
+ retval = nspi_GetMatches(nspi_ctx, mem_ctx, SPropTagArray, &Filter, 5000, &SRowSet, &MIds);
MAPIFreeBuffer(lpProp);
MAPIFreeBuffer(SPropTagArray);
MAPIFreeBuffer(SRowSet);
SRowSet = talloc_zero(mem_ctx, struct SRowSet);
MIds = talloc_zero(mem_ctx, struct PropertyTagArray_r);
- retval = nspi_GetMatches(nspi_ctx, mem_ctx, SPropTagArray, &Filter, &SRowSet, &MIds);
+ retval = nspi_GetMatches(nspi_ctx, mem_ctx, SPropTagArray, &Filter, 5000, &SRowSet, &MIds);
MAPIFreeBuffer(SPropTagArray);
MAPIFreeBuffer(lpProp);
MAPIFreeBuffer(SRowSet);
SRowSet = talloc_zero(mem_ctx, struct SRowSet);
MIds = talloc_zero(mem_ctx, struct PropertyTagArray_r);
- retval = nspi_GetMatches(nspi_ctx, mem_ctx, SPropTagArray, &Filter, &SRowSet, &MIds);
+ retval = nspi_GetMatches(nspi_ctx, mem_ctx, SPropTagArray, &Filter, 5000, &SRowSet, &MIds);
MAPIFreeBuffer(lpProp);
MAPIFreeBuffer(SPropTagArray);
MAPIFreeBuffer(SRowSet);
SRowSet = talloc_zero(mem_ctx, struct SRowSet);
MIds = talloc_zero(mem_ctx, struct PropertyTagArray_r);
- retval = nspi_GetMatches(nspi_ctx, mem_ctx, SPropTagArray, &Filter, &SRowSet, &MIds);
+ retval = nspi_GetMatches(nspi_ctx, mem_ctx, SPropTagArray, &Filter, 5000, &SRowSet, &MIds);
MAPIFreeBuffer(lpProp);
MAPIFreeBuffer(SRowSet);
MAPIFreeBuffer(SPropTagArray);