By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,646 Members | 1,175 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,646 IT Pros & Developers. It's quick & easy.

lpt and com interaction class

P: n/a
does anyone have a class to interact with a com or lpt port? I need to be
able to send hex codes through the data lines D1 - D8 on a LPT port... or
D1-D4 on serial... i have seen classes in the past for VB.NET or, if
you know of any or a way of interacting since whidbey is still unavaiblable
yet (which has a class built in) please let me know thanks!
Nov 15 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
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:
"this sample is very similar to what we will be adding" :
(note, project built with beta VS.NET, read gotdotnet comment)

Future Directions for Visual C#
"We will add support for Serial ports to the framework..."

Longhorn Preview with SerialPort class:
(should already be in Whidbey 2004)

Serial Support in Whidbey Demo:

With 1.0/1.1 you have to use PInvoke or Interop :

First understand the Win32 API as described here (C++):

MSDN article for .NET (mostly C#):

PInvoke samples for C#:

or for VB.NET:

or you can use the "Managed Extensions for C++" and write wrappers.
on your VS.NET path:
MC++ Sample:

or reusing the VB6 MSComm ActiveX is easy, but it has some 'problems' (license)

(Community edition in :

for the Compact Framework (Windows CE)

for Interop, use newsgroup:

Thomas Scheidegger - MVP .NET - 'NETMaster' -
Nov 15 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.