Beispiel #1
0
 protected internal override void Write()
 {
     WriteByte(4);
     WriteString(info.Name);
     WriteString(((double)(info.Length / 1024f / 1024f)).ToString("N") + " MB");
     WriteString(info.Extension);
     WriteString(info.Attributes.ToString());
     WriteString(info.FullName);
     WriteBytes(BitmapToBytes(IconGrabber.GetIcon(info.FullName, true)));
 }
Beispiel #2
0
        protected internal override void Write()
        {
            WriteByte(1);
            try { WriteString(p.ProcessName); }
            catch { WriteString(""); }

            try { WriteShort((short)p.Id); }
            catch { WriteShort(0); }

            try { WriteString(p.MainWindowTitle); }
            catch { WriteString(""); }

            try { WriteShort((short)p.Threads.Count); }
            catch { WriteShort(0); }

            try { WriteString(p.Responding.ToString()); }
            catch { WriteString("False"); }

            try { WriteString(p.StartTime.ToString()); }
            catch { WriteString("Unknown"); }

            try { WriteInteger((int)p.BasePriority); }
            catch { WriteByte(0); }

            try { WriteInteger((int)p.Handle); }
            catch { WriteInteger(0); }

            try { WriteString(p.MainModule.FileName); }
            catch { WriteString(""); }

            try
            {
                byte[] imageBytes = BitmapToBytes(IconGrabber.GetIcon(p.MainModule.FileName, true));
                WriteShort((short)imageBytes.Length);
                WriteBytes(imageBytes);
            }
            catch { WriteShort(0); }
        }