コード例 #1
0
        private void ParseChildNodes(BinaryReader hive)
        {
            int  count     = BitConverter.ToInt16(hive.ReadBytes(2), 0);
            long topOfList = hive.BaseStream.Position;

            for (int i = 0; i < count; i++)
            {
                hive.BaseStream.Position = topOfList + (i * 8);
                int newoffset = BitConverter.ToInt32(hive.ReadBytes(4), 0);
                hive.BaseStream.Position += 4;
                //byte[] check = hive.ReadBytes(4);
                hive.BaseStream.Position = 4096 + newoffset + 4;
                NodeKey nk = new NodeKey(hive)
                {
                    ParentNodeKey = this
                };
                this.ChildNodes.Add(nk);
            }

            hive.BaseStream.Position = topOfList + (count * 8);
        }
コード例 #2
0
        private void ParseChildNodes(BinaryReader hive)
        {
            int count = BitConverter.ToInt16 (hive.ReadBytes (2), 0);
            long topOfList = hive.BaseStream.Position;

            for (int i = 0; i < count; i++) {
                hive.BaseStream.Position = topOfList + (i * 8);
                int newoffset = BitConverter.ToInt32 (hive.ReadBytes (4), 0);
                hive.BaseStream.Position += 4;
                //byte[] check = hive.ReadBytes(4);
                hive.BaseStream.Position = 4096 + newoffset + 4;
                NodeKey nk = new NodeKey (hive) { ParentNodeKey = this };
                this.ChildNodes.Add (nk);
            }

            hive.BaseStream.Position = topOfList + (count * 8);
        }