Пример #1
0
        private List <DestListEntry> ParseDestList(byte[] data)
        {
            List <DestListEntry> entries = new List <DestListEntry>();

            try
            {
                using (MemoryStream memoryStream = new MemoryStream(data))
                {
                    memoryStream.Seek(32, SeekOrigin.Begin);
                    do
                    {
                        DestListEntry destListEntry = new DestListEntry();
                        memoryStream.Seek(8, SeekOrigin.Current);
                        destListEntry.Droid       = new Guid[] { new Guid(StreamReaderHelper.ReadByteArray(memoryStream, 16)), new Guid(StreamReaderHelper.ReadByteArray(memoryStream, 16)) };
                        destListEntry.Uuid        = new Uuid(destListEntry.Droid[1].ToString());
                        destListEntry.DroidBirth  = new Guid[] { new Guid(StreamReaderHelper.ReadByteArray(memoryStream, 16)), new Guid(StreamReaderHelper.ReadByteArray(memoryStream, 16)) };
                        destListEntry.UuidBirth   = new Uuid(destListEntry.DroidBirth[1].ToString());
                        destListEntry.NetBiosName = woanware.Text.ReplaceNulls(StreamReaderHelper.ReadString(memoryStream, 16));
                        destListEntry.StreamNo    = StreamReaderHelper.ReadInt64(memoryStream).ToString("X");
                        memoryStream.Seek(4, SeekOrigin.Current);
                        destListEntry.FileTime = StreamReaderHelper.ReadDateTime(memoryStream);
                        memoryStream.Seek(4, SeekOrigin.Current);
                        int stringLength = StreamReaderHelper.ReadInt16(memoryStream);
                        if (stringLength != -1)
                        {
                            destListEntry.Data = StreamReaderHelper.ReadStringUnicode(memoryStream, stringLength * 2);
                        }
                        else
                        {
                            memoryStream.Seek(4, SeekOrigin.Current);
                        }
                        destListEntry.Data = woanware.Text.ReplaceNulls(destListEntry.Data);
                        entries.Add(destListEntry);
                    }while (memoryStream.Position < memoryStream.Length);
                }
            }
            catch (Exception ex)
            {
            }
            return(entries);
        }
Пример #2
0
 public JumpList()
 {
     Data          = new List <NameValue>();
     DestListEntry = new DestListEntry();
 }