Prestwood Knowledge Base: www.prestwood.com/ASPSuite/kb/

www.americanitworkforce.com
1-916-726-5675

  From the May 2010 Issue of Prestwood eMag
 
Coder General .Net Concepts:
A Better .NET Serial Port Control
By Adam Lum
9/19/2008
 
Coder Link:

Resource Link:



The SerialPort class introduced in .NET 2.0 is definitely better than writing unmanaged Win32 API calls to access the serial port, but this is much better.

Without going into too much detail, a recent project of mine required that my application interface with an obscure device via RS232 and the serial port.

To do what I needed the device to do required me to manipulate the signal (high/low) on the RTS pin; the .NET framework's SerialPort class didn't really give me a mechanism for doing so.  Wanting to leave writing Win32 API p/invoke calls a last resort, the first result in a Google search for "better .NET serial port" led me to this article on CodeProject which described CommStudio's CommStudio Express which includes a much better serial port (SerialConnection) class which quickly enabled me to get past my little setback an on with the application. Best of all it's free!

I hope this referral link helps you.

Link Contributed By Prestwood staff member Adam Lum:
adamlum

Adam Lum is a part time developer for Prestwood Software and participates in this online community when time allows. His day-to-day work is C# coding but his current intrests (right now) are Python with the Django framework and Ruby on Rails.  He has also coded several projects in Java, C++, ASP Classic, and PHP.  His personal blog can be found at adamlum.com.

 PrestwoodBoardsKBRole-Based Tech TalkCoding & OOGeneral .Net Concepts 

Printed from Printed Tuesday, September 07, 2010 at 06:52
Copyright (C) Prestwood IT Solutions. All Rights Reserved.
Prestwood IT Solutions
8421 Auburn Blvd, Suite 256
Citrus Heights, CA 95610
Office 1-916-726-5675
Fax 1-916-726-5676