Rs232 access under Netcf

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am migrating a set of Apps from the desktop to Netcf. One uses Rs232
access. It uses the techniques outlined in the Msdn article " Use P/Invoke to
Develop a .NET Base Class Library for Serial Device Communications" which
includes the classes CommBase and CommLine.

Unfortunately the CreateFile() does not work.

Do you have any idea if the approach specified in the article can be made to
work at the Netcf level.

If not is there another alternative.

Thanks.
 
I wrote an analogous article for MSDN for devices. The latest code from
that is in the SDF:

www.opennetcf.org/sdf

CF 2.0 also supports serial comms through the System.IO.Ports classes (which
are also replicated in the SDF for CF 1.0)

-Chris
 
John,

They both will work, but the p/invokes have to be changed to suit CF and a
couple of other things as well. It would probably be faster to move to
VS2005 and use the new serial class.

Graham
 
You can use the SDF from www.opennetcf.org, or download CFSerialIO (with a
VB example) from my homepage. I provide all of the source code (VB .NET for
my class) in my book, and the SDF code may be downloaded. Visual Studio
2005 provides the System.IO.Ports namespace.

Dick

--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 4th
Edition ISBN 1-890422-28-2 (391 pages) published July 2004. See
www.mabry.com/vbpgser4 to order.
 
Back
Top