Redirected serial port returns error when accessed using DotNet App


Redirected serial port returns error when accessed through DotNet application. Win32 application(custom app or the standard Hyperterm )  works ok with this same redirected serial port


DotNet application fails on IOCTL_SERIAL_SET_QUEUE_SIZE while communicating to a redirected serial port. This IOCTL sets queue size for communication devices. DotNet(managed application) requests queue size to be set at 4096 bytes. However Windows Embedded CE 6.0 R3 does not support IOCTL_SERIAL_SET_QUEUE_SIZE and returns ERROR_NOT_SUPPORTED, it maintains a fixed queue size (receive buffer) of 2048. Since this IOCTL is unsupported on Windows CE, the application will see an error when initializing the serial port.


Modifying the serial driver’s return value for IOCTL_SERIAL_SET_QUEUE_SIZE in COM_IOControl() will resolve this issue, the change should be similar to the code below.



        RetVal = TRUE;                                       

Thuộc tính

ID Bài viết: 2436129 - Xem lại Lần cuối: 12-10-2010 - Bản sửa đổi: 1

Phản hồi