Re: coredll CreateFile on serial port

From: GraemeR (graeme_at_wave_nospam.co.nz)
Date: 02/22/05


Date: Wed, 23 Feb 2005 12:01:32 +1300

Thanks Daniel.

> It sounds like some other application is keeping the port open (probably
> your CEWedge). The port can only be used by one process at a time.
I thought of this. I manually reset the iPAQ (reset button on bottom) before
running my test code. Painful and slow, but must be done.

> If you ever get a valid handle you should call CloseHandle when you are
> done.
I close the port when I'm finished with it; or attempt to reopen it. I'm
using a flag value of -1 to indicate the port is closed (i.e. handle not
initialised)

> Let me advise you again to use one of the opennetcf classes or at least
> look at the code to see how to call the native APIs.
Have been trying but am a little weak with C# (and VB .NET) code.

Before leaving the thread can yopu advise the reference you used to fin
error code 183?
Cheers, Graeme.