Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
microsoft.public.dotnet.framework.sdk
programming serial port with C# ?
Yi Chen
8/26/2002 5:35:00 PM
I am pretty new with C# and just wonder if it's possible to access the
serial port with C#, instead of C++. Any info will be greatly appreciated.
Regards,
Yi
1 Answer
NETMaster
8/26/2002 6:31:00 PM
0
.NET has no support for legacy ports (COM/LPT)
You have to use PInvoke or Interop...
First understand the Win32 API as described here:
http://msdn.microsoft.com/library/en-us/dnfiles/html/msdn_...
PInvoke samples for VB.NET:
http://msdn.microsoft.com/library/en-us/dnvssamp/html/vbcs_usingthecomporti...
http://www.gotdotnet.com/userarea/keywordsrch.aspx?key...
http://www.allapi.net/classlib/class...
or for C#:
http://www.gotdotnet.com/userarea/keywordsrch.aspx?keyword=Se...
or you can use the "Managed Extensions for C++" and write wrappers.
http://msdn.microsoft.com/vstudio/techinfo/articles/upgrade/mana...
http://www.gotdotnet.com/team/...
on your VS.NET path:
...\VC7\managedextensionsspec.doc
...\VC7\migration_guide.doc
MC++ Sample:
http://www.codeproject.com/managedcpp/howtoc...
or reusing the VB6 MSComm ActiveX is easy, BUT it has some 'problems' (license)
http://www.devhood.com/tutorials/tutorial_details.aspx?tutor...
http://ourworld.compuserve.com/homepages/richard_grier/NETC...
commercial:
http://www.saxsoft.com/dotnet/commu...
for Interop, use newsgroup:
microsoft.public.dotnet.framework.interop
--
NETMaster (Thomas Scheidegger)
http://www.cetus-links.org/oo_c...
"Yi Chen" <ychen00@yahoo.com> wrote in message news:unVNRaRTCHA.1648@tkmsftngp09...
> I am pretty new with C# and just wonder if it's possible to access the
> serial port with C#, instead of C++. Any info will be greatly appreciated.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
programming serial port with C# ?
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password