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(this.foundMetadata); } } using (Stream DocumentSummaryInformation = doc.OpenStream("DocumentSummaryInformation")) { if (DocumentSummaryInformation != null) { DocumentSummaryInformation.Seek(0, SeekOrigin.Begin); OleStream os = new OleStream(DocumentSummaryInformation); os.GetMetadata(this.foundMetadata); } } }
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; } } } } }