Microsoft KB Archive/230756

= BUG: Windows CE Emulation Serial Communications Bugs =

Article ID: 230756

Article Last Modified on 10/24/2003

-

APPLIES TO


 * Microsoft Windows CE Embedded Toolkit for Visual C++ 5.0
 * Microsoft Windows CE Toolkit for Visual C++ 6.0

-



This article was previously published under Q230756



SYMPTOMS
When running under the Windows CE emulator, the following are some issues you might encounter with serial communications:


 * Using HPC Pro emulation, attempting to open a comm port with the CreateFile API returns INVALID_HANDLE_VALUE, and GetLastError returns ERROR_ALREADY_EXISTS.
 * Using HPC emulation, attempting to open a comm port with the CreateFile API returns returns ERROR_INVALID_HANDLE, and GetLastError returns 0.
 * When using the serial port in the Windows CE emulator, the serial port works normally for a while, but after a certain number of calls to ReadFile or WriteFile, future calls to ReadFile/WriteFile seems to hang.



RESOLUTION
Regardless of whether you run into any of these issues, it is highly recommended that you test and debug your application running on the actual target hardware. Differences in timing and serial hardware such as the UART can cause enough differences that testing on the actual target hardware is the only way to ensure your application performs as desired.

If your CE device only has one serial port, you can debug using an Ethernet connection so that your serial port can be used by your application. For more information about remotely debugging over an Ethernet connection, please see the documentation included with the Windows CE Toolkit for Visual C++.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

