473,320 Members | 2,027 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Serial Communication DLL

Hi,

I'm trying to find out if a serial communication dll exists that would allow
me to communicate to devices connected on the com port through .net. My
implementation language will be C#. I was able to find MSCOMM.OCX but that
is an ActiveX control which requires a gui (i believe?). Eventually, the
application I will be running will be a Windows Service so I think I need a
regular dll (I'm not sure though).

Any suggestions?

Thanks in advance,

Chris
Nov 15 '05 #1
1 9605
My Serial Port FAQ:

..NET 1.0/1.1 has no support for legacy ports (COM/LPT).

There are plans to add support for serial ports in a future version:
http://groups.google.com/groups?&sel...%40tkmsftngp09
"this sample is very similar to what we will be adding" :
http://www.gotdotnet.com/community/u...ery=SerialPort
(note, project built with beta VS.NET, read gotdotnet comment)

Future Directions for Visual C#
http://msdn.microsoft.com/chats/vstu...dio_032103.asp
"We will add support for Serial ports to the framework..."
With 1.0/1.1 you have to use PInvoke or Interop :

First understand the Win32 API as described here (C++):
http://msdn.microsoft.com/library/en...sdn_serial.asp

MSDN article for .NET (mostly C#):
http://msdn.microsoft.com/msdnmag/is...NETSerialComm/

PInvoke samples for C#:
http://www.gotdotnet.com/community/u...ery=SerialPort
http://msdn.microsoft.com/msdnmag/is...NETSerialComm/
http://www.gotdotnet.com/community/u...y=SerialStream

or for VB.NET:
http://support.microsoft.com/?kbid=823179
http://msdn.microsoft.com/library/en...ortinvbnet.asp
http://www.gotdotnet.com/community/u...px?query=rs232
http://www.mentalis.org/classlib/class.php?id=15
http://www.corradocavalli.cjb.net/

or you can use the "Managed Extensions for C++" and write wrappers.
http://msdn.microsoft.com/library/en...MCOverview.asp
http://www.gotdotnet.com/team/cplusplus/
http://msdn.microsoft.com/library/en...rp12192002.asp
on your VS.NET path:
...\VC7\managedextensionsspec.doc
...\VC7\migration_guide.doc
MC++ Sample:
http://www.codeproject.com/managedcpp/howtocomport.asp

or reusing the VB6 MSComm ActiveX is easy, but it has some 'problems' (license)
http://support.microsoft.com/?kbid=318597
http://www.devhood.com/tutorials/tut...utorial_id=320
http://ourworld.compuserve.com/homep...NETCommOCX.htm

commercial:
http://www.sax.net/dotnet/communications/
http://www.winsoft.sk/ncomport.htm

for Compact Framework (Windows CE)
http://ourworld.compuserve.com/homep...r/CFSerial.htm

for Interop, use newsgroup:
microsoft.public.dotnet.framework.interop


--
Thomas Scheidegger - MVP .NET - 'NETMaster'
http://www.cetus-links.org/oo_dotnet.html - http://dnetmaster.net/
Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Andreas Horneff | last post by:
Hi @ all, I've got a problem with serial communication in Borland C++ Builder. I've already found a lot of stuff about serial communication in the internet, but it dosen't work. What I want...
11
by: sarah | last post by:
hI, I have a project. I need to realise serial communication between PC and Altera FPGA in c or c++. The function of FPGA is working well. it can send data to uart. Does anybody know how to...
3
by: carmen | last post by:
I'm working in an aplication for a Smart Device that need to "talk" with a printer continuosly through the serial port. I'm trying to use the John Hint's sample code "Use P/Invoke to develop a .NET...
4
by: Vidya Bhagwath | last post by:
Hello Experts, I am porting the C++ code into the Visual C#.NET. My C++ code is mainly based on the serial communication. So I am using the windows structure such as DCB.. etc and the windows...
6
by: Leandro Berti via DotNetMonster.com | last post by:
Hi All, I wrote a code to do serial communication with an equipament. When i use the code outside of threaded class it seens work properly, but when i put inside a class and execute a thread in...
4
by: joe bloggs | last post by:
I am writing a mobile application to interface with a legacy system and I am planning to use web services to communicate with this system. The legacy system receives data through a serial port. ...
2
by: Marco Trapanese | last post by:
Hi, every 250 ms (timer event) I must send several commands via serial port. The serial unit will answer to each command sent. I must wait the answer before send the next command. How can I...
4
by: max_mont | last post by:
Hi all, I'm a newbie in .NET technology. I've already developed Serial communication applications in C++ (WIN32). And I wanted to migrate to .NET technology. There is a serial component in...
2
by: Adrian Chen | last post by:
please help me! I come across a problem. Now I develop a finger print management system which is based on B/S.When users click a button in the web pages, a device connected to the COM1 serial port...
0
by: Dhananjay | last post by:
Hi, I am working on an VB.Net application which I want to communicate to external device using comm port (Serial Port) . So for that first I am trying to simulate the communication on serial...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.