Partager via


IRecipientTable::Restrict (Compact 7)

3/12/2014

The Restrict method retrieves a filtered copy of the recipient table.

Syntax

HRESULT Restrict(
  BSTR bstrRestriction,
  IRecipientTable** ppRestrictedRecipientTable
);

Parameters

  • bstrRestriction
    [in] A BSTR that contains the input restriction string, which defines which items to include in the new collection. See Remarks for more information.
  • ppRestrictedRecipientTable
    [out,retval] A handle to the returned restricted recipient table.

Return Value

The Restrict method returns the following standard HRESULT values.

  • S_OK
    The operation completed successfully.
  • E_FAIL
    The operation failed due to an unspecified error.
  • E_INVALIDARG
    The operation failed because one (or more) of the arguments is not valid.
  • E_OUTOFMEMORY
    The operation failed because it needs more memory resources.
  • E_UNEXPECTED
    The operation failed due to an unexpected failure.

Remarks

New for Windows Embedded Compact 7.

The restriction string must contain a Boolean expression that evaluates to either TRUE or FALSE for any item. Enclose property names between brackets. Comparison operators are the following: <, <=, >, >=, = or <>. For example, the restriction string [CompanyName] = "Microsoft" gets a collection of items with Microsoft as the company.

A BSTR (Basic string or binary string) is a type of string that knows how long it is. It's a composite data type that consists of a length prefix, a data string, and a terminator. The length prefix consists of a four-byte integer that occurs immediately before the first character of the data string, and it contains a count of the number of bytes in the data string that follows (excluding the terminator). The data string consists of a string of Unicode characters (wide or double-byte characters), and it can contain multiple embedded null characters. The terminator consists of two null characters (0x00).

Requirements

Header

pimstore.h

Library

Pimstore.lib

See Also

Reference

IRecipientTable