[Mono-dev] FileStream Exception
Pablo Iñigo Blasco
pibgeus at gmail.com
Tue Jan 3 16:53:27 EST 2006
Hi, i was trying implement something for System.IO.Ports on windows, but i
have found a issue. The following code compiles on mcs and works fine in
ms.net runtime:
StreamReader sr;
StreamWriter sw;
Console.WriteLine("1");
MSystem.IO.Ports.SerialPort.WindowsPortManager.Open("COM1",
9600, 8, 0, 1, out sr, out sw);
Console.WriteLine("2");
sw.WriteLine("hiiiii");
Console.WriteLine("3");
sw.Flush();
Console.WriteLine("4");
Console.WriteLine(sr.ReadLine());
Console.WriteLine("5");
Console.ReadLine();
Compiled by MCS:
ms.net runtime:
1
2
3
4
hiiiii
5
but using mono runtime...
1
2
3
Invalid parameter
in <0x0009d> System.IO.FileStream:WriteInternal (System.Byte[] src, Int32
src_offset, Int32 count)
in (wrapper delegate-invoke)
System.MulticastDelegate:invoke_void_byte[]_int_int
(byte[],int,int)
Extra information:
both streamreader and streamwriter has been created with a filestream whose
handle has been got using the system call CreateFile in kernel32.dll
--
No hay viento favorable para el que no sabe donde va.
Pablo Iñigo Blasco - GeuS- www.geus.es.vg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20060103/402ce96c/attachment.html
More information about the Mono-devel-list
mailing list