Updated release to 1.2.2

New GUI
Fixed bugs with localization
New feature "Unmount drives after write operation"
Properly added registry support
This commit is contained in:
Roman Belkov 2015-01-21 15:41:26 +03:00
parent 4057669f87
commit 55734b3079
13 changed files with 734 additions and 649 deletions

View file

@ -81,8 +81,9 @@ namespace DynamicDevices.DiskWriter
/// <param name="driveLetter"></param>
/// <param name="fileName"></param>
/// <param name="eCompType"></param>
/// <param name="removeAfter"></param>
/// <returns></returns>
public bool WriteDrive(string driveLetter, string fileName, EnumCompressionType eCompType)
public bool WriteDrive(string driveLetter, string fileName, EnumCompressionType eCompType, bool removeAfter)
{
IsCancelling = false;
@ -285,6 +286,9 @@ namespace DynamicDevices.DiskWriter
}
errored = false;
if (removeAfter)
_diskAccess.UnmountDrive();
readfail1:
_diskAccess.Close();
readfail2:
@ -537,7 +541,7 @@ namespace DynamicDevices.DiskWriter
if (IsCancelling)
LogMsg(Resources.Disk_WriteDrive_Cancelled);
else
LogMsg("All Done - Read " + offset + Resources.Disk_WriteDrive__bytes__Elapsed_time_ + tstotalTime.ToString(@"dd\.hh\:mm\:ss"));
LogMsg(Resources.Disk_ReadDrive_All_Done___Read_ + offset + Resources.Disk_WriteDrive__bytes__Elapsed_time_ + tstotalTime.ToString(@"dd\.hh\:mm\:ss"));
Progress(0);
return true;
}

View file

@ -23,6 +23,8 @@ namespace DynamicDevices.DiskWriter
void UnlockDrive();
bool UnmountDrive();
int Read(byte[] buffer, int readMaxLength, out int readBytes);
int Write(byte[] buffer, int bytesToWrite, out int wroteBytes);

View file

@ -32,7 +32,6 @@
this.textBoxFileName = new System.Windows.Forms.TextBox();
this.buttonRead = new System.Windows.Forms.Button();
this.buttonWrite = new System.Windows.Forms.Button();
this.buttonExit = new System.Windows.Forms.Button();
this.buttonChooseFile = new System.Windows.Forms.Button();
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
@ -52,10 +51,12 @@
this.englishToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.russianToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.groupBoxTruncation = new System.Windows.Forms.GroupBox();
this.checkBoxUnmount = new System.Windows.Forms.CheckBox();
this.checkBoxUseMBR = new System.Windows.Forms.CheckBox();
this.checkedListBoxDrives = new System.Windows.Forms.CheckedListBox();
this.flowLayoutPanelProgressBars = new System.Windows.Forms.FlowLayoutPanel();
this.flowLayoutPanelProgressLabels = new System.Windows.Forms.FlowLayoutPanel();
this.label1 = new System.Windows.Forms.Label();
this.statusStrip1.SuspendLayout();
this.groupBoxCompression.SuspendLayout();
this.menuStripMain.SuspendLayout();
@ -82,13 +83,6 @@
this.buttonWrite.UseVisualStyleBackColor = true;
this.buttonWrite.Click += new System.EventHandler(this.ButtonWriteClick);
//
// buttonExit
//
resources.ApplyResources(this.buttonExit, "buttonExit");
this.buttonExit.Name = "buttonExit";
this.buttonExit.UseVisualStyleBackColor = true;
this.buttonExit.Click += new System.EventHandler(this.ButtonExitClick);
//
// buttonChooseFile
//
resources.ApplyResources(this.buttonChooseFile, "buttonChooseFile");
@ -216,10 +210,17 @@
// groupBoxTruncation
//
resources.ApplyResources(this.groupBoxTruncation, "groupBoxTruncation");
this.groupBoxTruncation.Controls.Add(this.checkBoxUnmount);
this.groupBoxTruncation.Controls.Add(this.checkBoxUseMBR);
this.groupBoxTruncation.Name = "groupBoxTruncation";
this.groupBoxTruncation.TabStop = false;
//
// checkBoxUnmount
//
resources.ApplyResources(this.checkBoxUnmount, "checkBoxUnmount");
this.checkBoxUnmount.Name = "checkBoxUnmount";
this.checkBoxUnmount.UseVisualStyleBackColor = true;
//
// checkBoxUseMBR
//
resources.ApplyResources(this.checkBoxUseMBR, "checkBoxUseMBR");
@ -245,10 +246,16 @@
this.flowLayoutPanelProgressLabels.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.flowLayoutPanelProgressLabels.Name = "flowLayoutPanelProgressLabels";
//
// label1
//
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// MainForm
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.label1);
this.Controls.Add(this.flowLayoutPanelProgressLabels);
this.Controls.Add(this.flowLayoutPanelProgressBars);
this.Controls.Add(this.checkedListBoxDrives);
@ -260,7 +267,6 @@
this.Controls.Add(this.statusStrip1);
this.Controls.Add(this.menuStripMain);
this.Controls.Add(this.buttonChooseFile);
this.Controls.Add(this.buttonExit);
this.Controls.Add(this.buttonWrite);
this.Controls.Add(this.buttonRead);
this.Controls.Add(this.textBoxFileName);
@ -288,7 +294,6 @@
private System.Windows.Forms.TextBox textBoxFileName;
private System.Windows.Forms.Button buttonRead;
private System.Windows.Forms.Button buttonWrite;
private System.Windows.Forms.Button buttonExit;
private System.Windows.Forms.Button buttonChooseFile;
private System.Windows.Forms.StatusStrip statusStrip1;
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;
@ -312,6 +317,8 @@
private System.Windows.Forms.ToolStripMenuItem languageToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem englishToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem russianToolStripMenuItem;
private System.Windows.Forms.CheckBox checkBoxUnmount;
private System.Windows.Forms.Label label1;
}
}

View file

@ -48,7 +48,10 @@ namespace DynamicDevices.DiskWriter
{
InitializeComponent();
checkBoxUseMBR.Checked = true;
ChangeLanguage("en-US");
checkBoxUseMBR.Checked = true;
checkBoxUnmount.Checked = true;
MessageBoxEx.Owner = Handle;
@ -71,21 +74,8 @@ namespace DynamicDevices.DiskWriter
else
DisableButtons(false);
// Read registry values
var key = Registry.LocalMachine.CreateSubKey("SOFTWARE\\Dynamic Devices Ltd\\DiskImager");
if (key != null)
{
var file = (string)key.GetValue("FileName", "");
if (File.Exists(file))
textBoxFileName.Text = file;
ReadRegistry();
Globals.CompressionLevel = (int)key.GetValue("CompressionLevel", Globals.CompressionLevel);
Globals.MaxBufferSize = (int)key.GetValue("MaxBufferSize", Globals.MaxBufferSize);
key.Close();
}
// Detect insertions / removals
_watcher.DeviceArrived += OnDriveArrived;
_watcher.DeviceRemoved += OnDriveRemoved;
StartListenForChanges();
@ -101,18 +91,6 @@ namespace DynamicDevices.DiskWriter
#region Disk access event handlers
/// <summary>
/// Close the application
/// </summary>
/// <param name="sender">
/// </param>
/// <param name="e"></param>
private void ButtonExitClick(object sender, EventArgs e)
{
Close();
}
/// <summary>
/// Select a file for read/write from/to removable media
/// </summary>
@ -153,6 +131,7 @@ namespace DynamicDevices.DiskWriter
var diskAccess = NewDiskAccess();
var disk = new Disk(diskAccess);
Thread.CurrentThread.CurrentUICulture = CurrentLocale;
SendProgressToUI(disk);
var res = false;
@ -170,7 +149,7 @@ namespace DynamicDevices.DiskWriter
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
EnableButtons();
Invoke((MethodInvoker) EnableButtons);
});
}
@ -208,9 +187,10 @@ namespace DynamicDevices.DiskWriter
var tasks = drives.Select(drive => Task.Factory.StartNew(() =>
{
var diskAccess = new Win32DiskAccess();
var diskAccess = NewDiskAccess();
var disk = new Disk(diskAccess);
Thread.CurrentThread.CurrentUICulture = CurrentLocale;
SendProgressToUI(disk);
DiskAccesses.Add(diskAccess);
@ -219,7 +199,7 @@ namespace DynamicDevices.DiskWriter
var res = false;
try
{
res = disk.WriteDrive(drive, textBoxFileName.Text, _eCompType);
res = disk.WriteDrive(drive, textBoxFileName.Text, _eCompType, checkBoxUnmount.Checked);
}
catch (Exception ex)
{
@ -247,12 +227,10 @@ namespace DynamicDevices.DiskWriter
/// <param name="e"></param>
private void MainFormFormClosing(object sender, FormClosingEventArgs e)
{
var key = Registry.LocalMachine.CreateSubKey("SOFTWARE\\Dynamic Devices Ltd\\DiskImager");
if (key != null)
{
key.SetValue("FileName", textBoxFileName.Text);
key.Close();
}
const string registryPath = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Dynamic Devices Ltd\\DiskImager";
Registry.SetValue(registryPath, "FileName", textBoxFileName.Text);
Registry.SetValue(registryPath, "Language", CurrentLocale.Name);
_watcher.DeviceArrived -= OnDriveArrived;
_watcher.DeviceRemoved -= OnDriveRemoved;
@ -298,9 +276,7 @@ namespace DynamicDevices.DiskWriter
private void UpdateFileNameText()
{
var text = textBoxFileName.Text;
text = text.Replace(".tar.gz", "");
text = text.Replace(".tgz", "");
@ -347,16 +323,16 @@ namespace DynamicDevices.DiskWriter
/// </summary>
private void SendProgressToUI(Disk disk)
{
var pb = new ProgressBar { Size = new Size(flowLayoutPanelProgressBars.Width - 10, 10) };
var lab = new Label { Size = new Size(flowLayoutPanelProgressLabels.Width - 10, 17) };
Invoke((MethodInvoker)delegate
{
flowLayoutPanelProgressBars.Controls.Add(pb);
flowLayoutPanelProgressLabels.Controls.Add(lab);
disk.OnLogMsg += (o, message) => Invoke((MethodInvoker) delegate { lab.Text = message; });
var progressBar = new ProgressBar { Size = new Size(flowLayoutPanelProgressBars.Width - 10, 10) };
var label = new Label { Size = new Size(flowLayoutPanelProgressLabels.Width - 10, 17) };
flowLayoutPanelProgressBars.Controls.Add(progressBar);
flowLayoutPanelProgressLabels.Controls.Add(label);
disk.OnLogMsg += (o, message) => Invoke((MethodInvoker) delegate { label.Text = message; });
disk.OnProgress +=
(o, progressPercentage) => Invoke((MethodInvoker) delegate { pb.Value = progressPercentage; });
(o, progressPercentage) => Invoke((MethodInvoker) delegate { progressBar.Value = progressPercentage; });
});
}
@ -483,13 +459,13 @@ namespace DynamicDevices.DiskWriter
{
buttonRead.Enabled = false;
buttonWrite.Enabled = false;
buttonExit.Enabled = !running;
buttonCancel.Enabled = running;
checkedListBoxDrives.Enabled = false;
textBoxFileName.Enabled = false;
buttonChooseFile.Enabled = false;
groupBoxCompression.Enabled = false;
groupBoxTruncation.Enabled = false;
menuStripMain.Enabled = !running;
}
/// <summary>
@ -499,13 +475,13 @@ namespace DynamicDevices.DiskWriter
{
buttonRead.Enabled = true;
buttonWrite.Enabled = true;
buttonExit.Enabled = true;
buttonCancel.Enabled = false;
checkedListBoxDrives.Enabled = true;
textBoxFileName.Enabled = true;
buttonChooseFile.Enabled = true;
groupBoxCompression.Enabled = true;
groupBoxTruncation.Enabled = true;
menuStripMain.Enabled = true;
}
#endregion
@ -542,13 +518,11 @@ namespace DynamicDevices.DiskWriter
private void englishToolStripMenuItem_Click(object sender, EventArgs e)
{
Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");
ChangeLanguage("en-US");
}
private void russianToolStripMenuItem_Click(object sender, EventArgs e)
{
Thread.CurrentThread.CurrentUICulture = new CultureInfo("ru-RU");
ChangeLanguage("ru-RU");
}
@ -556,6 +530,8 @@ namespace DynamicDevices.DiskWriter
private void ChangeLanguage(string lang)
{
CurrentLocale = new CultureInfo(lang);
Thread.CurrentThread.CurrentUICulture = CurrentLocale;
var resources = new ComponentResourceManager(typeof (MainForm));
foreach (Control c in Controls)
{
@ -590,5 +566,19 @@ namespace DynamicDevices.DiskWriter
ctrl.ResumeLayout(false);
}
private void ReadRegistry()
{
const string registryPath = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Dynamic Devices Ltd\\DiskImager";
var file = (string)Registry.GetValue(registryPath, "FileName", "");
if (File.Exists(file))
textBoxFileName.Text = file;
var lang = (string)Registry.GetValue(registryPath, "Language", "en-US");
if (lang != "en-US")
{
ChangeLanguage(lang);
}
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
@ -116,16 +117,25 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="buttonRead.Location" type="System.Drawing.Point, System.Drawing">
<value>429, 190</value>
</data>
<data name="buttonRead.Text" xml:space="preserve">
<value>Чтение</value>
</data>
<data name="buttonWrite.Location" type="System.Drawing.Point, System.Drawing">
<value>527, 190</value>
</data>
<data name="buttonWrite.Text" xml:space="preserve">
<value>Запись</value>
</data>
<data name="buttonExit.Text" xml:space="preserve">
<value>Выход</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="saveFileDialog1.Filter" xml:space="preserve">
<value>Образы файлов (*.img,*.bin,*.sdcard)|*.img;*.bin;*.sdcard|Сжатые файлы (*.zip,*.gz,*tgz)|*.zip;*.gz;*.tgz|Все файлы (*.*)|*.*</value>
</data>
<data name="labelFileName.Size" type="System.Drawing.Size, System.Drawing">
<value>64, 13</value>
</data>
@ -138,21 +148,36 @@
<data name="labelDriveTitle.Text" xml:space="preserve">
<value>Диски</value>
</data>
<data name="buttonCancel.Location" type="System.Drawing.Point, System.Drawing">
<value>621, 190</value>
</data>
<data name="buttonCancel.Text" xml:space="preserve">
<value>Отмена</value>
</data>
<data name="groupBoxCompression.Location" type="System.Drawing.Point, System.Drawing">
<value>10, 132</value>
<value>429, 118</value>
</data>
<data name="groupBoxCompression.Text" xml:space="preserve">
<value>Сжатие</value>
</data>
<data name="optionsToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>56, 20</value>
</data>
<data name="optionsToolStripMenuItem.Text" xml:space="preserve">
<value>Опции</value>
</data>
<data name="displayAllDrivesToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>265, 22</value>
</data>
<data name="displayAllDrivesToolStripMenuItem.Text" xml:space="preserve">
<value>Показать все диски ***ОПАСНО***</value>
</data>
<data name="languageToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>265, 22</value>
</data>
<data name="languageToolStripMenuItem.Text" xml:space="preserve">
<value>Язык</value>
</data>
<data name="englishToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>141, 22</value>
</data>
@ -165,61 +190,28 @@
<data name="russianToolStripMenuItem.Text" xml:space="preserve">
<value>Русский</value>
</data>
<data name="languageToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>265, 22</value>
</data>
<data name="languageToolStripMenuItem.Text" xml:space="preserve">
<value>Язык</value>
</data>
<data name="optionsToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>56, 20</value>
</data>
<data name="optionsToolStripMenuItem.Text" xml:space="preserve">
<value>Опции</value>
</data>
<data name="checkBoxUseMBR.Size" type="System.Drawing.Size, System.Drawing">
<value>126, 17</value>
</data>
<data name="checkBoxUseMBR.Text" xml:space="preserve">
<value>Использовать MBR</value>
</data>
<data name="groupBoxTruncation.Location" type="System.Drawing.Point, System.Drawing">
<value>275, 132</value>
</data>
<data name="groupBoxTruncation.Size" type="System.Drawing.Size, System.Drawing">
<value>188, 50</value>
<value>267, 78</value>
</data>
<data name="groupBoxTruncation.Text" xml:space="preserve">
<value>Образ логических разделов</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Disk Imager</value>
<data name="checkBoxUnmount.Size" type="System.Drawing.Size, System.Drawing">
<value>216, 17</value>
</data>
<data name="buttonChooseFile.Text" xml:space="preserve">
<value>...</value>
<data name="checkBoxUnmount.Text" xml:space="preserve">
<value>Размонтировать диски после записи</value>
</data>
<data name="menuStripMain.Text" xml:space="preserve">
<value>menuStrip1</value>
<data name="checkBoxUseMBR.Size" type="System.Drawing.Size, System.Drawing">
<value>208, 17</value>
</data>
<data name="radioButtonCompGz.Text" xml:space="preserve">
<value>GZ</value>
<data name="checkBoxUseMBR.Text" xml:space="preserve">
<value>Использовать MBR образа (чтение)</value>
</data>
<data name="radioButtonCompNone.Text" xml:space="preserve">
<value>NONE</value>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>56, 13</value>
</data>
<data name="radioButtonCompTgz.Text" xml:space="preserve">
<value>TGZ</value>
</data>
<data name="radioButtonCompZip.Text" xml:space="preserve">
<value>ZIP</value>
</data>
<data name="saveFileDialog1.Filter" xml:space="preserve">
<value>Образы файлов (*.img,*.bin,*.sdcard)|*.img;*.bin;*.sdcard|Сжатые файлы (*.zip,*.gz,*tgz)|*.zip;*.gz;*.tgz|Все файлы (*.*)|*.*</value>
</data>
<data name="statusStrip1.Text" xml:space="preserve">
<value>statusStrip1</value>
</data>
<data name="toolStripStatusLabel1.Text" xml:space="preserve">
<value>toolStripStatusLabel1</value>
<data name="label1.Text" xml:space="preserve">
<value>Прогресс</value>
</data>
</root>

View file

@ -37,6 +37,7 @@ namespace DynamicDevices.DiskWriter
internal const uint IOCTL_DISK_GET_DRIVE_GEOMETRY_EX = 0x700a0;
internal const uint IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS = 0x00560000;
internal const uint IOCTL_STORAGE_GET_DEVICE_NUMBER = 0x2D1080;
internal const uint IOCTL_STORAGE_EJECT_MEDIA = 0x2D4808;
internal const uint BCM_SETSHIELD = 0x160C;
internal const int INVALID_SET_FILE_POINTER = -1;

View file

@ -20,12 +20,12 @@ using System.Runtime.InteropServices;
#if DEBUG
[assembly: AssemblyDescription("Windows Disk Imager - reads/writes images to removable storage (DEBUG BUILD)")]
#else
[assembly: AssemblyDescription("Windows Disk Writer - reads/writes images to removable storage")]
[assembly: AssemblyDescription("Windows Disk Imager - reads/writes images to removable storage")]
#endif
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Dynamic Devices Ltd")]
[assembly: AssemblyCompany("Dynamic Devices Ltd & Roman Belkov")]
[assembly: AssemblyProduct("DiskImager")]
[assembly: AssemblyCopyright("Copyright © Dynamic Devices 2013")]
[assembly: AssemblyCopyright("Copyright © Dynamic Devices 2013-2015 & Roman Belkov 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@ -47,5 +47,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2.1.*")]
[assembly: AssemblyFileVersion("1.2.1.0")]
[assembly: AssemblyVersion("1.2.2.*")]
[assembly: AssemblyFileVersion("1.2.2.0")]

View file

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.34014
// Runtime Version:4.0.30319.34209
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@ -69,6 +69,15 @@ namespace DynamicDevices.DiskWriter.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to All Done - Read .
/// </summary>
internal static string Disk_ReadDrive_All_Done___Read_ {
get {
return ResourceManager.GetString("Disk_ReadDrive_All_Done___Read_", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Elapsed time: .
/// </summary>

View file

@ -200,4 +200,7 @@
<data name="Disk_ReadDrive_Elapsed_time__" xml:space="preserve">
<value>Elapsed time: </value>
</data>
<data name="Disk_ReadDrive_All_Done___Read_" xml:space="preserve">
<value>All Done - Read </value>
</data>
</root>

View file

@ -203,4 +203,7 @@
<data name="Disk_WriteDrive_Wrote_" xml:space="preserve">
<value>Записано </value>
</data>
<data name="Disk_ReadDrive_All_Done___Read_" xml:space="preserve">
<value>Прочитано</value>
</data>
</root>

View file

@ -37,6 +37,11 @@ namespace DynamicDevices.DiskWriter.Win32
throw new NotImplementedException();
}
public bool UnmountDrive()
{
throw new NotImplementedException();
}
public int Read(byte[] buffer, int readMaxLength, out int readBytes)
{
throw new NotImplementedException();

View file

@ -118,6 +118,21 @@ namespace DynamicDevices.DiskWriter.Win32
}
}
public bool UnmountDrive()
{
int intOut;
var success = NativeMethods.DeviceIoControl(_partitionHandle, NativeMethods.IOCTL_STORAGE_EJECT_MEDIA, null, 0, null, 0, out intOut, IntPtr.Zero);
if (!success)
{
LogMsg(@"Error dismounting volume: " + Marshal.GetHRForLastWin32Error());
NativeMethods.DeviceIoControl(_partitionHandle, NativeMethods.FSCTL_UNLOCK_VOLUME, null, 0, null, 0, out intOut, IntPtr.Zero);
_partitionHandle.Dispose();
return false;
}
return true;
}
public int Read(byte[] buffer, int readMaxLength, out int readBytes)
{
readBytes = 0;