Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ReadFile on WM6.1

0 views
Skip to first unread message

Amirallia

unread,
Nov 2, 2009, 9:41:02 AM11/2/09
to
Hi,

I am developping a test application that only open a port with
CreateFile
method and read port data with ReadFile method.
When i open the com port, a read thread start. This thread has a while
loop
which has the ReadFile call. My application fails when this loop try to
make
the 5 iteration to ReadFile method call.
I think the exception throws is an access violation exception
(0xc0000005)

Can anybody help me? It's urgent!

I use VS 2005 with WM6.1 device

Thanks


Ginny Caughey

unread,
Nov 2, 2009, 11:28:25 AM11/2/09
to
Since this is the Compact Framework newsgroup, I have to ask why you aren't
using System.IO.Ports.SerialPort instead.

--

Ginny Caughey
Device Application Development MVP

"Amirallia" <bn...@bluewin.ch> wrote in message
news:mn.13ad7d9b9...@bluewin.ch...

Markus Humm

unread,
Nov 2, 2009, 12:34:38 PM11/2/09
to
Ginny Caughey schrieb:

> Since this is the Compact Framework newsgroup, I have to ask why you
> aren't using System.IO.Ports.SerialPort instead.
>

Because that's available only since CF 2.0 and his old devices already
running this app don't have this installed per default/in ROM so
installing it there only to get the serial class would be overkill?

Greetings

Markus

Ginny Caughey

unread,
Nov 2, 2009, 2:53:18 PM11/2/09
to
Marcus,

I thought he was trying to install CF 1 on devices that had CF 2 in ROM
already. But in any case, CF 2 is a big improvement over CF 1 in terms of
speed as well as features. I'd certainly go with CF 2 at least even if I had
to install it myself.

--

Ginny Caughey
Device Application Development MVP

"Markus Humm" <marku...@freenet.de> wrote in message
news:hcn57e$1c7$02$2...@news.t-online.com...

Christopher Fairbairn [MVP]

unread,
Nov 15, 2009, 3:58:12 PM11/15/09
to
Hi Amirallia,

"Amirallia" <bn...@bluewin.ch> wrote in message
news:mn.13ad7d9b9...@bluewin.ch...

> My application fails when this loop try to make
> the 5 iteration to ReadFile method call. I think
> the exception throws is an access violation exception (0xc0000005)

Are you able to share any of the source code for your test application?

Asking for a solution to a problem like this is like asking "how long is a
piece of string".

There are numerious reasons why you may be seeing an access violation, and
it's hard to predicate what scenario you may be seeing without knowing how
you are using the API.

Haev you verified the parameters you are passing in are correct?

Hope this helps,
Christopher Fairbairn


0 new messages