A class indicates the Logon time.
Inheritance: MAPIInspector.Parsers.BaseStructure
Exemplo n.º 1
0
        /// <summary>
        /// Parse the RopLogonResponse_PrivateMailboxes structure.
        /// </summary>
        /// <param name="s">An stream containing RopLogonResponse_PrivateMailboxes structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId             = (RopIdType)ReadByte();
            this.OutputHandleIndex = ReadByte();
            HelpMethod help = new HelpMethod();

            this.ReturnValue = help.FormatErrorCode(ReadUint());
            if ((ErrorCodes)ReturnValue == ErrorCodes.Success)
            {
                this.LogonFlags = (LogonFlags)ReadByte();
                this.FolderIds  = new FolderID[13];
                for (int i = 0; i < 13; i++)
                {
                    FolderIds[i] = new FolderID();
                    FolderIds[i].Parse(s);
                }
                this.ResponseFlags = (ResponseFlags)ReadByte();
                this.MailboxGuid   = ReadGuid();
                this.ReplId        = ReadUshort();
                this.ReplGuid      = ReadGuid();
                this.LogonTime     = new LogonTime();
                this.LogonTime.Parse(s);
                this.GwartTime  = ReadUlong();
                this.StoreState = ReadUint();
            }
            else if ((AdditionalErrorCodes)ReturnValue == AdditionalErrorCodes.WrongServer)
            {
                this.LogonFlags     = (LogonFlags)ReadByte();
                this.ServerNameSize = ReadByte();
                this.ServerName     = new MAPIString(Encoding.ASCII);
                this.ServerName.Parse(s);
            }
        }
        /// <summary>
        /// Parse the RopLogonResponse_PrivateMailboxes structure.
        /// </summary>
        /// <param name="s">An stream containing RopLogonResponse_PrivateMailboxes structure.</param>
        public override void Parse(Stream s)
        {
            base.Parse(s);

            this.RopId = (RopIdType)ReadByte();
            this.OutputHandleIndex = ReadByte();
            HelpMethod help = new HelpMethod();
            this.ReturnValue = help.FormatErrorCode(ReadUint());
            if ((ErrorCodes)ReturnValue == ErrorCodes.Success)
            {
                this.LogonFlags = (LogonFlags)ReadByte();
                this.FolderIds = new FolderID[13];
                for (int i = 0; i < 13; i++)
                {
                    FolderIds[i] = new FolderID();
                    FolderIds[i].Parse(s);
                }
                this.ResponseFlags = (ResponseFlags)ReadByte();
                this.MailboxGuid = ReadGuid();
                this.ReplId = ReadUshort();
                this.ReplGuid = ReadGuid();
                this.LogonTime = new LogonTime();
                this.LogonTime.Parse(s);
                this.GwartTime = ReadUlong();
                this.StoreState = ReadUint();
            }
            else if ((AdditionalErrorCodes)ReturnValue == AdditionalErrorCodes.WrongServer)
            {
                this.LogonFlags = (LogonFlags)ReadByte();
                this.ServerNameSize = ReadByte();
                this.ServerName = new MAPIString(Encoding.ASCII);
                this.ServerName.Parse(s);
            }
        }