473,387 Members | 1,394 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,387 software developers and data experts.

lpt and com interaction class

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 C#.net, if
you know of any or a way of interacting since whidbey is still unavaiblable
yet (which has a system.io.port class built in) please let me know thanks!
Nov 20 '05 #1
1 1087
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..."

Longhorn Preview with SerialPort class:
http://longhorn.msdn.microsoft.com/l....io.ports.aspx
(should already be in Whidbey 2004)

Serial Support in Whidbey Demo:
http://www.gotdotnet.com/team/clr/bcl/demos/demos.aspx

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
http://www.gotdotnet.com/Community/U...e-5413384f0c25

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/
(Community edition in : http://msdn.microsoft.com/vbasic/vbrkit/)
http://www.winsoft.sk/ncomport.htm

for the Compact Framework (Windows CE)
http://msdn.microsoft.com/library/en...l/PISAPICF.asp
http://www.microsoft.com/downloads/d...3-2d3b9cef4aa5
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 20 '05 #2

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

Similar topics

7
by: rdh | last post by:
Hi all, I am in process of developing a Server in C++ supporting multiple protocols. The server will be exposing various functionalities, and the clients can communicate over any of the...
2
by: Chakkaradeep | last post by:
hi all, as it was discussed earlier in this forum titled,"Execution of Another Application in Services", i got the answer that Services are not meant for executing another applications, but...
7
by: Paul | last post by:
Hello, I'm coming from a PHP background and am working on a large-scale VB.NET project. One of the cornerstones of this project is a reusable form class, to standardize our web forms. My goal...
1
by: Crutcher | last post by:
I've been playing with dictionary subtypes for custom environments, and I encountered a strange interaction between exec, dictionary subtypes, and global variables. I've attached a test program,...
3
by: sheldonlg | last post by:
I don't think my last attempt posted so here it is again. This is a bit off-topic, but it does relate to php. This is the most active related group that I can find, so even if it is off-topic I...
2
by: Alberto | last post by:
How do you write the interaction diagram's messages in c#? like calling a method in the object class? like an event? Thank you
2
by: =?Utf-8?B?bXIgcGVhbnV0?= | last post by:
I want to activate an application (Excel) in code. If I reference microsoft.visualbasic, I could use: Interaction.AppActivate("Microsoft Excel"); But I wold rather use a native C# approach. I...
3
by: Angus | last post by:
I am designing an FTP server and with FTP commands are dispatched on one port and the actual data transmission on another. So I thought I would have a CFTPControl class for handlng the commands...
0
by: Omar Abid | last post by:
Reason of this project: The Microsoft.VisualBasic.Interaction class exposes many useful commands and methods that were available in Visual Basic like AppActivate, Beep, Callbyname... This...
3
by: mmm | last post by:
I am looking for advice on Python Editors and IDEs I have read other posts and threads on the subject and my two questions at this time are mainly about the IDLE-like F5-run facilities. While I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.