Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mapi: add page for SCountRestriction #792

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions docs/outlook/mapi/scountrestriction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
title: "SCountRestriction"
manager: lindalu
ms.date: 12/27/2024
ms.audience: Developer
ms.topic: reference
ms.service: office-online-server
ms.localizationpriority: medium
api_name:
- MAPI.SCountRestriction
api_type:
- COM
ms.assetid: d8961786-1686-4a90-b18e-ed56325fdb82
description: "Describes a count restriction, which is used to limit the number of times an (inner) restriction is evaluated."
---

# SCountRestriction

**Applies to**: Outlook 2013 | Outlook 2016

Describes a count restriction, which is used to limit the number of times an (inner) restriction is evaluated.

|Property |Value |
|:-----|:-----|
|Header file: <br/> |Mapidefs.h <br/> |

```cpp
typedef struct _SCountRestriction
{
ULONG ulCount;
LPSRestriction lpRes;
} SCountRestriction;
```

## Members

**ulCount**

> When the restriction is evaluated, it shall match at most this many times.

**lpRes**

> Pointer to an [SRestriction](srestriction.md) structure.

## Remarks

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.

For a general discussion of how restrictions work, see [About Restrictions](about-restrictions.md).

## See also

[SRestriction](srestriction.md)
[MAPI Structures](mapi-structures.md)
23 changes: 12 additions & 11 deletions docs/outlook/mapi/types-of-restrictions.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,18 @@ Each of the specialized restriction structures in the union represents a differe

|**Type of restriction**|**Associated data structure**|**Description**|
|:-----|:-----|:-----|
|Compare property <br/> |[SComparePropsRestriction](scomparepropsrestriction.md) <br/> |Compares two properties of the same type. |
|**AND** <br/> |[SAndRestriction](sandrestriction.md) <br/> |Performs a logical **AND** operation on two or more restrictions. |
|**OR** <br/> |[SOrRestriction](sorrestriction.md) <br/> |Performs a logical **OR** operation on two or more restrictions. |
|**NOT** <br/> |[SNotRestriction](snotrestriction.md) <br/> |Performs a logical **NOT** operation on two or more restrictions. |
|Content <br/> |[SContentRestriction](scontentrestriction.md) <br/> |Locates specified data. |
|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. |
|Bitmask <br/> |[SBitMaskRestriction](sbitmaskrestriction.md) <br/> |Applies a bitmask to a PT_LONG property, typically to determine whether particular flags are set. |
|Size <br/> |[SSizeRestriction](ssizerestriction.md) <br/> |Tests the size of a property using standard relational operators. |
|Exist <br/> |[SExistRestriction](sexistrestriction.md) <br/> |Tests whether an object has a value for a property. |
|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. |
|Comment <br/> |[SCommentRestriction](scommentrestriction.md) <br/> |Associates an object with a set of named properties. |
|Compare property |[SComparePropsRestriction](scomparepropsrestriction.md) |Compares two properties of the same type. |
|**AND** |[SAndRestriction](sandrestriction.md) |Performs a logical **AND** operation on two or more restrictions. |
|**OR** |[SOrRestriction](sorrestriction.md) |Performs a logical **OR** operation on two or more restrictions. |
|**NOT** |[SNotRestriction](snotrestriction.md) |Performs a logical **NOT** operation on two or more restrictions. |
|Content |[SContentRestriction](scontentrestriction.md) |Locates specified data. |
|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. |
|Bitmask |[SBitMaskRestriction](sbitmaskrestriction.md) |Applies a bitmask to a PT_LONG property, typically to determine whether particular flags are set. |
|Size |[SSizeRestriction](ssizerestriction.md) |Tests the size of a property using standard relational operators. |
|Exist |[SExistRestriction](sexistrestriction.md) |Tests whether an object has a value for a property. |
|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. |
|Comment |[SCommentRestriction](scommentrestriction.md) |Associates an object with a set of named properties. |
|Count |[SCountRestriction](scountrestriction.md) |Used for limiting results returned from evaluation of another restriction. |

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

Expand Down