/// <summary>
 /// Initializes a new instance of the MsgStore class. 
 /// </summary>
 /// <param name="msgStore">IMsgStore object</param>
 /// <param name="entryID">Entry identification of IMsgStore object</param>
 public MessageStore(MAPISession session, IMsgStore msgStore, EntryID entryID, string name)
 {
     ulConnection_ = 0;
     Session = session;
     mapiObj_ = msgStore;
     Id_ = entryID;
     Name = name;
 }
 /// <summary>
 /// Initializes a new instance of the MsgStore class.
 /// </summary>
 /// <param name="msgStore">IMsgStore object</param>
 /// <param name="entryID">Entry identification of IMsgStore object</param>
 public MessageStore(MAPISession session, IMsgStore msgStore, EntryID entryID, string name)
 {
     ulConnection_ = 0;
     Session       = session;
     mapiObj_      = msgStore;
     Id_           = entryID;
     Name          = name;
 }
Example #3
0
        public bool CompareEntryIDs(EntryID entryid1, EntryID entryid2)
        {
            SBinary sb1 = SBinary.SBinaryCreate(entryid1.AsByteArray);
            SBinary sb2 = SBinary.SBinaryCreate(entryid2.AsByteArray);
            bool    result;

            session_.CompareEntryIDs(sb1.cb, sb1.lpb, sb2.cb, sb2.lpb, 0, out result);
            SBinary.SBinaryRelease(ref sb1);
            SBinary.SBinaryRelease(ref sb2);
            return(result);
        }
 /// <summary>
 /// Initializes a new instance of the MsgStoreNewMailEventArgs class. 
 /// </summary>
 /// <param name="storeID">The entry identification of message store.</param>
 /// <param name="notification">The new mail notification structure.</param>
 public MsgStoreNewMailEventArgs(EntryID storeID, NEWMAIL_NOTIFICATION notification)
 {
     StoreID = storeID;
     SBinary sbEntry = new SBinary() { cb = notification.cbEntryID, lpb = notification.pEntryID };
     SBinary sbParent = new SBinary() { cb = notification.cbParentID, lpb = notification.pParentID };
     EntryID = sbEntry.cb > 0 ? new EntryID(sbEntry.AsBytes) : null;
     ParentID = sbParent.cb > 0 ? new EntryID(sbParent.AsBytes) : null;
     MessageFlags = (int)notification.MessageFlags;
     if ((notification.Flags & (uint)CharacterSet.UNICODE) == (uint)CharacterSet.UNICODE)
         MessageClass = Marshal.PtrToStringUni(notification.MessageClass);
     else
         MessageClass = Marshal.PtrToStringAnsi(notification.MessageClass);
 }
Example #5
0
        /// <summary>
        /// Initializes a new instance of the MsgStoreNewMailEventArgs class.
        /// </summary>
        /// <param name="storeID">The entry identification of message store.</param>
        /// <param name="notification">The new mail notification structure.</param>
        public MsgStoreNewMailEventArgs(EntryID storeID, NEWMAIL_NOTIFICATION notification)
        {
            StoreID = storeID;
            SBinary sbEntry = new SBinary()
            {
                cb = notification.cbEntryID, lpb = notification.pEntryID
            };
            SBinary sbParent = new SBinary()
            {
                cb = notification.cbParentID, lpb = notification.pParentID
            };

            EntryID      = sbEntry.cb > 0 ? new EntryID(sbEntry.AsBytes) : null;
            ParentID     = sbParent.cb > 0 ? new EntryID(sbParent.AsBytes) : null;
            MessageFlags = (int)notification.MessageFlags;
            if ((notification.Flags & (uint)CharacterSet.UNICODE) == (uint)CharacterSet.UNICODE)
            {
                MessageClass = Marshal.PtrToStringUni(notification.MessageClass);
            }
            else
            {
                MessageClass = Marshal.PtrToStringAnsi(notification.MessageClass);
            }
        }
 public bool CompareEntryIDs(EntryID entryid1, EntryID entryid2)
 {
     SBinary sb1 = SBinary.SBinaryCreate(entryid1.AsByteArray);
     SBinary sb2 = SBinary.SBinaryCreate(entryid2.AsByteArray);
     bool result;
     session_.CompareEntryIDs(sb1.cb, sb1.lpb, sb2.cb, sb2.lpb, 0, out result);
     SBinary.SBinaryRelease(ref sb1);
     SBinary.SBinaryRelease(ref sb2);
     return result;
 }
 public StoreInfo(MAPISession session, string name, EntryID storeId)
 {
     session_ = session;
     Name = name;
     EntryId = storeId;
 }
Example #8
0
 public StoreInfo(MAPISession session, string name, EntryID storeId)
 {
     session_ = session;
     Name     = name;
     EntryId  = storeId;
 }