Exemplo n.º 1
0
 private void GetSummaryInformation(OleDocument doc)
 {
     using (Stream SummaryInformation = doc.OpenStream("SummaryInformation"))
     {
         if (SummaryInformation != null)
         {
             SummaryInformation.Seek(0, SeekOrigin.Begin);
             OleStream os = new OleStream(SummaryInformation);
             os.GetMetadata(FoundMetaData, FoundUsers, FoundDates, FoundEmails);
         }
     }
     using (Stream DocumentSummaryInformation = doc.OpenStream("DocumentSummaryInformation"))
     {
         if (DocumentSummaryInformation != null)
         {
             DocumentSummaryInformation.Seek(0, SeekOrigin.Begin);
             OleStream os = new OleStream(DocumentSummaryInformation);
             os.GetMetadata(FoundMetaData, FoundUsers, FoundDates, FoundEmails);
         }
     }
 }
Exemplo n.º 2
0
        public void GetOperatingSystemFromStreamHeaders(out byte high, out byte low)
        {
            high = low = 0;
            List <DirEntry> lstStreams = new List <DirEntry>();

            lstStreams.AddRange(SearchStreams("SummaryInformation"));
            lstStreams.AddRange(SearchStreams("DocumentSummaryInformation"));
            foreach (DirEntry de in lstStreams)
            {
                using (Stream SummaryInformation = OpenStream(de))
                {
                    if (SummaryInformation != null)
                    {
                        SummaryInformation.Seek(0, SeekOrigin.Begin);
                        OleStream os = new OleStream(SummaryInformation);
                        os.GetOperatingSystem(out high, out low);
                        if (high != 0 || low != 0)
                        {
                            break;
                        }
                    }
                }
            }
        }