PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
Grier`s CFSerial Control with wm5 and cf 2 sp1/2
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
Grier`s CFSerial Control with wm5 and cf 2 sp1/2
![]() |
Grier`s CFSerial Control with wm5 and cf 2 sp1/2 |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Hello,
i have following problem: I use Grier´s SerialClass in my application for serial communication. This all works fine with wm 5 cf 2 without any service pack on it. If i update cf 2 to sp1 or sp2 i get an native exception by opening serial port. The exception is: 0xc0000005. Does anybody know how to solve this problem? Thanks. |
|
|
|
#2 |
|
Guest
Posts: n/a
|
Hi,
Yes. The SP1 and SP2 for CF2 introduce a bug (meant to solve a problem for Windows Mobile 6 devices) in the ReadFile API. I have re-written the dll, and it works fairly reliably (contact be by email to get a copy for testing). There still is a possible failure-mode when the port is disposed. I haven't seen it, but I don't doubt that it might occur (I don't have a solution for that potential exception right now). You can help me test this new version on your devices, if you are willing. Dick (dick_grier@msn.com) -- Richard Grier, MVP Hard & Software Author of Visual Basic Programmer's Guide to Serial Communications, Fourth Edition, ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March 2006. See www.hardandsoftware.net for details and contact information. |
|
|
|
#3 |
|
Guest
Posts: n/a
|
Hi Dick,
can you send me link that describes the bug in the ReadfileAPI ? Is this bug solved in the latest QFE of the Platform Builder WInCE 5.0? Regards Javier On Sat, 23 Jun 2007 20:07:08 +0200, Dick Grier <dick_grierNOSPAM@.msn.com> wrote: > Hi, > > Yes. The SP1 and SP2 for CF2 introduce a bug (meant to solve a problem > for > Windows Mobile 6 devices) in the ReadFile API. I have re-written the > dll, > and it works fairly reliably (contact be by email to get a copy for > testing). There still is a possible failure-mode when the port is > disposed. > I haven't seen it, but I don't doubt that it might occur (I don't have a > solution for that potential exception right now). You can help me test > this > new version on your devices, if you are willing. > > Dick (dick_grier@msn.com) > -- Javier Grijalba www.contendosystems.com Embedded Systems J.Grijalba at Contendosystems dot com |
|
|
|
#4 |
|
Guest
Posts: n/a
|
Hi,
AFAIK, there is no link. If you call ReadFile (with a valid handle) AND if there is no data to receive, the exception is generated. This exception is not trappable, and it is a "new feature" with SP1/SP2. I have reported it to Microsoft (and have given them a source code example), but have not seen anything new since then (March). So, the only solution, to date, is to call the SetCommMask and WaitCommState APIs, then to read data via ReadFile only when the WaitCommState callback for receive data is generated. While this works, there are some non-trivial problems that are associated with this technique that I have not yet had time to fully explore. BTW, in prior versions of WinCE (with and without the Compact Framework), you could call ReadFile -- whether or not there was data to receive. Of no data, then ReadFile returned an empty buffer, with a count of zero. That has changed. Dick -- Richard Grier, MVP Hard & Software Author of Visual Basic Programmer's Guide to Serial Communications, Fourth Edition, ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March 2006. See www.hardandsoftware.net for details and contact information. |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

