Skip to content

Commit e3475af

Browse files
authored
Merge pull request #792 from jengelh/master
mapi: add page for `SCountRestriction`
2 parents 43f6487 + ae8e059 commit e3475af

2 files changed

Lines changed: 66 additions & 11 deletions

File tree

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
title: "SCountRestriction"
3+
manager: lindalu
4+
ms.date: 12/27/2024
5+
ms.audience: Developer
6+
ms.topic: reference
7+
ms.service: office-online-server
8+
ms.localizationpriority: medium
9+
api_name:
10+
- MAPI.SCountRestriction
11+
api_type:
12+
- COM
13+
ms.assetid: d8961786-1686-4a90-b18e-ed56325fdb82
14+
description: "Describes a count restriction, which is used to limit the number of times an (inner) restriction is evaluated."
15+
---
16+
17+
# SCountRestriction
18+
19+
**Applies to**: Outlook 2013 | Outlook 2016
20+
21+
Describes a count restriction, which is used to limit the number of times an (inner) restriction is evaluated.
22+
23+
|Property |Value |
24+
|:-----|:-----|
25+
|Header file: <br/> |Mapidefs.h <br/> |
26+
27+
```cpp
28+
typedef struct _SCountRestriction
29+
{
30+
ULONG ulCount;
31+
LPSRestriction lpRes;
32+
} SCountRestriction;
33+
```
34+
35+
## Members
36+
37+
**ulCount**
38+
39+
> When the restriction is evaluated, it shall match at most this many times.
40+
41+
**lpRes**
42+
43+
> Pointer to an [SRestriction](srestriction.md) structure.
44+
45+
## Remarks
46+
47+
If an implementation does not support count restrictions, it returns MAPI_E_TOO_COMPLEX from its [IMAPITable::Restrict](imapitable-restrict.md) or [IMAPITable::FindRow](imapitable-findrow.md) methods.
48+
49+
For a general discussion of how restrictions work, see [About Restrictions](about-restrictions.md).
50+
51+
## See also
52+
53+
[SRestriction](srestriction.md)
54+
[MAPI Structures](mapi-structures.md)

docs/outlook/mapi/types-of-restrictions.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,18 @@ Each of the specialized restriction structures in the union represents a differe
2828

2929
|**Type of restriction**|**Associated data structure**|**Description**|
3030
|:-----|:-----|:-----|
31-
|Compare property <br/> |[SComparePropsRestriction](scomparepropsrestriction.md) <br/> |Compares two properties of the same type. |
32-
|**AND** <br/> |[SAndRestriction](sandrestriction.md) <br/> |Performs a logical **AND** operation on two or more restrictions. |
33-
|**OR** <br/> |[SOrRestriction](sorrestriction.md) <br/> |Performs a logical **OR** operation on two or more restrictions. |
34-
|**NOT** <br/> |[SNotRestriction](snotrestriction.md) <br/> |Performs a logical **NOT** operation on two or more restrictions. |
35-
|Content <br/> |[SContentRestriction](scontentrestriction.md) <br/> |Locates specified data. |
36-
|Property <br/> |[SPropertyRestriction](spropertyrestriction.md) <br/> |Specifies a particular property value as criteria for matching. Can be used, for example, to search for a particular type of attachment. |
37-
|Bitmask <br/> |[SBitMaskRestriction](sbitmaskrestriction.md) <br/> |Applies a bitmask to a PT_LONG property, typically to determine whether particular flags are set. |
38-
|Size <br/> |[SSizeRestriction](ssizerestriction.md) <br/> |Tests the size of a property using standard relational operators. |
39-
|Exist <br/> |[SExistRestriction](sexistrestriction.md) <br/> |Tests whether an object has a value for a property. |
40-
|Subobject <br/> |[SSubRestriction](ssubrestriction.md) <br/> |Used for searching through subobjects, or objects that cannot be accessed with an entry identifier, such as recipients and attachments. Can be used, for example, to look for messages for a particular recipient. |
41-
|Comment <br/> |[SCommentRestriction](scommentrestriction.md) <br/> |Associates an object with a set of named properties. |
31+
|Compare property |[SComparePropsRestriction](scomparepropsrestriction.md) |Compares two properties of the same type. |
32+
|**AND** |[SAndRestriction](sandrestriction.md) |Performs a logical **AND** operation on two or more restrictions. |
33+
|**OR** |[SOrRestriction](sorrestriction.md) |Performs a logical **OR** operation on two or more restrictions. |
34+
|**NOT** |[SNotRestriction](snotrestriction.md) |Performs a logical **NOT** operation on two or more restrictions. |
35+
|Content |[SContentRestriction](scontentrestriction.md) |Locates specified data. |
36+
|Property |[SPropertyRestriction](spropertyrestriction.md) |Specifies a particular property value as criteria for matching. Can be used, for example, to search for a particular type of attachment. |
37+
|Bitmask |[SBitMaskRestriction](sbitmaskrestriction.md) |Applies a bitmask to a PT_LONG property, typically to determine whether particular flags are set. |
38+
|Size |[SSizeRestriction](ssizerestriction.md) |Tests the size of a property using standard relational operators. |
39+
|Exist |[SExistRestriction](sexistrestriction.md) |Tests whether an object has a value for a property. |
40+
|Subobject |[SSubRestriction](ssubrestriction.md) |Used for searching through subobjects, or objects that cannot be accessed with an entry identifier, such as recipients and attachments. Can be used, for example, to look for messages for a particular recipient. |
41+
|Comment |[SCommentRestriction](scommentrestriction.md) |Associates an object with a set of named properties. |
42+
|Count |[SCountRestriction](scountrestriction.md) |Used for limiting results returned from evaluation of another restriction. |
4243

4344
Some restrictions use regular expressions, and MAPI supports a limited form of regular expression notation in the style that is used many text applications.
4445

0 commit comments

Comments
 (0)