ReadFile on WM6.1

  • Thread starter Thread starter Amirallia
  • Start date Start date
A

Amirallia

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
 
Since this is the Compact Framework newsgroup, I have to ask why you aren't
using System.IO.Ports.SerialPort instead.
 
Ginny said:
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
 
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.
 
Hi Amirallia,

Amirallia said:
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
 
Back
Top