The easiest way to read from a serial port in a managed code app is to use
the Ports.IO.Serial class. Certainly you can use CreateFile, ReadFile, etc.,
but the Serial class has already done the work including managing the worker
thread.
--
Ginny Caughey
Device Application Development MVP
"Julián Sanz García" <jsanz (AT) gerionte (DOT) com> wrote
Quote:
Hi,
I am developping a demo 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?
Thanks |