.... And once you have the Handle, you can pass into one of the constructors
of the FileStream object and then do the usual stream I/O:
FileStream lpt = new
FileStream(hFS,System.IO.FileMode.Append,FileAcces s.Write);
String Temp="test";
Byte[] Buff = new Byte[1024];
Buff = System.Text.Encoding.Unicode.GetBytes(Temp);
lpt.Write(Buff,0,Buff.Length);
lpt.Close();
Sujit D'Mello
"csharpcomputing.com" wrote:
.NET 1.X does not support serial communications. You need to call unmanaged
api (e.g. CreateFile("LPT1",GENERIC_READ | GENERIC_WRITE,0, 0,OPEN_EXISTING,0,
0); ...)
Aleksey Nudelman,
http://csharpcomputing.com
"C#" wrote:
How can I communicate with the parallel port in C#?