protected override void Dispose(bool disposing) { if (this.fileHandle != IntPtr.Zero) { WindowsVirtualFileStream.CloseHandle(this.fileHandle); this.fileHandle = IntPtr.Zero; } base.Dispose(disposing); }
public override void Close() { if (this.fileHandle != IntPtr.Zero) { WindowsVirtualFileStream.CloseHandle(this.fileHandle); this.fileHandle = IntPtr.Zero; } base.Close(); }
public override long Seek(long offset, SeekOrigin origin) { if (this.fileHandle == IntPtr.Zero) { throw new ObjectDisposedException(null); } int num; this.an = (int)WindowsVirtualFileStream.A(this.fileHandle, offset, origin, out num); if (this.an == -1) { throw new IOException("Seeking file length failed."); } return((long)this.an); }