COM port programming and .Net
I am doing some work at the moment that requires me to talk to a GPS device over an rs232 connection. Unfortunatly there are currently no classes in the .Net Framework 1.1 to do this ... which means having to either use MSComm ActiveX control (yuk) or doing a world of Platform Invoke commands to call the Win32 APIs.
While stumbling around on the net to find some sample of what is required i found this article in the MSDN magazine (plus code) that gives a multithreaded base class in C#. It nicely wraps a whole BUNCH of the stuff you dont want to figure out the hard way.
https://msdn.microsoft.com/msdnmag/issues/02/10/NETSerialComm/default.aspx
Great starting place if you want to do some simple COM port work.
Comments
- Anonymous
October 27, 2003
I can't remember where I came across this on MSDN, but here is a VB.NET class that does a similar thing. It works great for communicating over the serial port, and I am using it in production code with great success. - Anonymous
October 27, 2003
URL: http://www.boneville.net/programming/rs232.zip - Anonymous
October 31, 2003
Also, just wanted to point out that I've provided the source to a .NET clone of the MSComm ActiveX control. It's located at http://www.gotdotnet.com/Community/Workspaces/Workspace.aspx?id=0a680784-1d84-4e0a-8a62-9dcbcf79e1fb - Anonymous
May 25, 2004
How to use MSComm control in ASP and ASP.NET, I tried a lot but cannot find a solution. I would even like to ask is it feasible to use MSComm control in ASP like. - Anonymous
May 29, 2009
PingBack from http://paidsurveyshub.info/story.php?title=chris-johnson-com-port-programming-and-net