关于传送文件 string filename = (String)listBox1.Text; byte[] cmd = Encoding.Unicode.GetBytes("cmd::DAT");
这是主要代码,执行到第三句的时候就停下了,请高手赐教。
string filename = (String)listBox1.Text;
byte[] cmd = Encoding.Unicode.GetBytes("cmd::DAT");
hwork.Write(cmd, 0, cmd.Length);
FileStream read = new FileStream(filename, FileMode.Open, FileAccess.Read);
byte[] buff = new byte[1024];
int len = 0;
while ((len = read.Read(buff, 0, 1024)) != 0)
{
hwork.Write(buff ,len ,buff .Length);
}
[解决办法]
不懂,up