469,360 Members | 1,807 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,360 developers. It's quick & easy.

Serial port and C++ .NET

Hello,

Someone can help me about serial port with C++ .NET (Windows forms
application). Like setting port, opening it, transmiting, receiving,
closing, etc.

Thanks very much (for me and my students)
Nov 16 '05 #1
6 13617
> Hello,

Someone can help me about serial port with C++ .NET (Windows forms
application). Like setting port, opening it, transmiting, receiving,
closing, etc.

Thanks very much (for me and my students)


Hi,

you can open a com port with CreateFile (filename "COM1:") and operate with
normal read and write. I think
it's still the same in .NET.

Bye, Holger.
Nov 16 '05 #2

Or just download ACE (Adaptive Communications Environment)
for free and get a lot more power. :-)
-----Original Message-----
Hello,

Someone can help me about serial port with C++ .NET (Windows forms application). Like setting port, opening it, transmiting, receiving, closing, etc.

Thanks very much (for me and my students)
Hi,

you can open a com port with CreateFile

(filename "COM1:") and operate withnormal read and write. I think
it's still the same in .NET.

Bye, Holger.
.

Nov 16 '05 #3
Jeff wrote:
Someone can help me about serial port with C++ .NET (Windows forms
application). Like setting port, opening it, transmiting, receiving,
closing, etc.


For C++ you could use:

CSerialPort v1.03 - Serial Port Wrapper
http://www.codeproject.com/system/cserialport.asp

Serial library for C++
http://www.codeproject.com/system/serial.asp
--
Greetings
Jochen

Do you need a memory-leak finder ?
http://www.codeproject.com/useritems/leakfinder.asp
Nov 16 '05 #4
Has that been ported to .NET now?

Thanks,
Aaron Queenan.

"Thomas J. Clancy" <tc*****@netspoke.com> wrote in message
news:08****************************@phx.gbl...

Or just download ACE (Adaptive Communications Environment)
for free and get a lot more power. :-)
-----Original Message-----
Hello,

Someone can help me about serial port with C++ .NET (Windows forms application). Like setting port, opening it, transmiting, receiving, closing, etc.

Thanks very much (for me and my students)


Hi,

you can open a com port with CreateFile

(filename "COM1:") and operate with
normal read and write. I think
it's still the same in .NET.

Bye, Holger.
.

Nov 16 '05 #5
There is a decent article here:

http://msdn.microsoft.com/msdnmag/is...m/default.aspx

The code is in C#, you can convert easily if you must. This basically
accesses the native API's; you have all the "power" you need.

Cheers,
Sarat Venugopal
Huelix Solutions
www.huelix.com

*Remove '_ng' and 'n0spam' to reply


"Jeff" <pr*******@hotmail.com> wrote in message
news:V6********************@wagner.videotron.net.. .
Hello,

Someone can help me about serial port with C++ .NET (Windows forms
application). Like setting port, opening it, transmiting, receiving,
closing, etc.

Thanks very much (for me and my students)

Nov 16 '05 #6
Unfortunately we do not provide any mechanism in the framework to easily
accomplish serialport communication. This is a highly requested feautre and
we are seriously considering it for the next release.

However there is some documentation that might help you. The following has
a few links under the Accessing COM ports from C#/VB.Net that might be
helpfull:
http://www.gotdotnet.com/team/csharp/code/default.aspx

This has some samples implementations that you could use:
http://www.gotdotnet.com/community/u...x?query=Serial

I have personally used the following sample and it provided all of the
functionality that I needed:

http://www.gotdotnet.com/Community/U...mpleGuid=b06e3
0f9-1301-4cc6-ac14-dfe325097c69

Thanks,

Ryan Byington [MS]

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
--------------------
From: "Jeff" <pr*******@hotmail.com>
Newsgroups: microsoft.public.dotnet.languages.vc
Subject: Serial port and C++ .NET
Lines: 9
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <V6********************@wagner.videotron.net>
Date: Mon, 1 Sep 2003 22:18:31 -0400
NNTP-Posting-Host: 66.131.57.98
X-Complaints-To: ab***@videotron.ca
X-Trace: wagner.videotron.net 1062469173 66.131.57.98 (Mon, 01 Sep 2003 22:19:33 EDT)NNTP-Posting-Date: Mon, 01 Sep 2003 22:19:33 EDT
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed 00.sul.t-online.de!t-onlin
e.de!newsfeed.icl.net!newsfeed.fjserv.net!proxad.n et!proxad.net!newshosting.
com!news-xfer2.atl.newshosting.com!diablo.voicenet.com!wesl ey.videotron.net!
wagner.videotron.net.POSTED!not-for-mailXref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vc:27781
X-Tomcat-NG: microsoft.public.dotnet.languages.vc

Hello,

Someone can help me about serial port with C++ .NET (Windows forms
application). Like setting port, opening it, transmiting, receiving,
closing, etc.

Thanks very much (for me and my students)


Nov 16 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by ^CeFoS^ | last post: by
2 posts views Thread by willie | last post: by
3 posts views Thread by collinm | last post: by
13 posts views Thread by Al the programmer | last post: by
13 posts views Thread by Rob | last post: by
4 posts views Thread by rowan | last post: by
3 posts views Thread by naveen.sabapathy | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.