Share via


MAPI Mail Sync Progress Flags (Compact 7)

3/12/2014

The MAPI Mail Sync Progress flags are used to indicate which members of the SYNCPROGRESSITEM structure contain valid data.

These flags are used for the mask value in the SYNCPROGRESSITEM structure. You can us these flag constants either individually, or you can combine them to create a bitmask that represents several constant values simultaneously.

Constant Value Description

SYNCPROGRESSITEM_STATUSTEXT

0x0001

The pwszStatusText member contains valid data.

SYNCPROGRESSITEM_STATUSTYPE

0x0002

The dwStatusType member contains valid data.

SYNCPROGRESSITEM_PROGVALUE

0x0004

The ulProgValue member contains valid data.

SYNCPROGRESSITEM_MAXVALUE

0x0008

The ulMaxValue member contains valid data.

SYNCPROGRESSITEM_DISCONNECTED

0x0010

The call was disconnected.

SYNCPROGRESSITEM_TOTAL_NEW_MAIL

0x0020

The ulTotalNewMail member contains valid data.

SYNCPROGRESSITEM_NEW_MESSAGE

0x0040

The pidNewMsg member contains valid data.

SYNCPROGRESSITEM_DISMISS_STATUSTYPE

0x0080

The dwStatusType member contains invalid data. New for Windows Embedded Compact 7.

Remarks

The SYNCPROGRESSITEM structure contains synchronization progress status information, and it is the output parameter of the IMailSyncCallBack::Progress method. The IMailSyncCallBack::Progress method refreshes the contents of this structure with the current progress details of the synchronization operation.

You create a bitmask that represents several values simultaneously by combining individual flag constants by using the bitwise OR operator. For example, you can create a bitmask that indicates that the pwszStatusText member contains valid data and the dwStatusType member also contains valid data by using the following statement:

(SYNCPROGRESSITEM_STATUSTEXT|SYNCPROGRESSITEM_STATUSTYPE)

Notice that the set of flag constants is a series of values that increases in increments of 2n, and that the sequence begins with n = 0. In binary, each value can be represented as a byte in which all bits are zero except for one. The series begins with a byte with only the least-significant bit set. The next constant is a byte with only the second least-significat bit set, and so on.

The Hexadecimal value of SYNCPROGRESSITEM_STATUSTEXT is 0x0001, which is 0001 in binary, and the Hex value of SYNCPROGRESSITEM_STATUSTYPE is 0x0002, which is 0010 in binary. When you OR the two binary values together, you get a binary value of 0011 (0x003 in Hex), which is a bitmask equal to both the first and second values.

   0001  (expression1)
OR 0010  (expression2)
=======
   0011  (result)

A bit is set in a particular position in the resulting byte if a bit was set in the same position in any of the operand bytes.

Requirements

Header

cemapi.h

Library

cemapi.lib

See Also

Reference

MAPI Flags
SYNCPROGRESSITEM
IMailSyncCallBack::Progress