示例#1
0
        private void ReadEntries(BinaryReader new_reader, int sec_offset, bool direct_string)
        {
            COMStringBinding str = new COMStringBinding(new_reader, direct_string);

            if (direct_string)
            {
                StringBindings.Add(str);
            }
            else
            {
                while (str.TowerId != 0)
                {
                    StringBindings.Add(str);
                    str = new COMStringBinding(new_reader, direct_string);
                }
            }

            new_reader.BaseStream.Position = sec_offset * 2;
            COMSecurityBinding sec = new COMSecurityBinding(new_reader);

            while (sec.AuthnSvc != 0)
            {
                SecurityBindings.Add(sec);
                sec = new COMSecurityBinding(new_reader);
            }
        }
示例#2
0
        internal COMDualStringArray(BinaryReader reader) : this()
        {
            int num_entries = reader.ReadUInt16();
            int sec_offset  = reader.ReadUInt16();

            if (num_entries > 0)
            {
                MemoryStream stm        = new MemoryStream(reader.ReadAll(num_entries * 2));
                BinaryReader new_reader = new BinaryReader(stm);

                COMStringBinding str = new COMStringBinding(new_reader);
                while (str.TowerId != 0)
                {
                    StringBindings.Add(str);
                    str = new COMStringBinding(new_reader);
                }

                new_reader.BaseStream.Position = sec_offset * 2;
                COMSecurityBinding sec = new COMSecurityBinding(new_reader);
                while (sec.AuthnSvc != 0)
                {
                    SecurityBindings.Add(sec);
                    sec = new COMSecurityBinding(new_reader);
                }
            }
        }