/// <summary>
 /// Clears all buffers for this stream and causes any buffered data to be written
 /// to the underlying device.
 /// </summary>
 public override void Flush()
 {
     if (TheIStream != null)
     {
         TheIStream.Commit(0 /*STGC_DEFAULT*/);
     }
     else
     {
         TheStream.Flush();
     }
 }
 /// <summary>
 /// Ensures that any changes made to an stream object that is open in transacted
 /// mode are reflected in the parent storage.
 /// </summary>
 /// <remarks>
 /// The <paramref name="grfCommitFlags"/> parameter is not used and this method only does Stream.Flush()
 /// </remarks>
 /// <param name="grfCommitFlags">Controls how the changes for the stream object are committed.
 /// See the STGC enumeration for a definition of these values.</param>
 ///<exception cref="IOException">An I/O error occurs.</exception>
 public void Commit(int grfCommitFlags)
 {
     // Clears all buffers for this stream and causes any buffered data to be written
     // to the underlying device.
     if (TheStream != null)
     {
         TheStream.Flush();
     }
     else
     {
         TheIStream.Commit(grfCommitFlags);
     }
 }