473,768 Members | 7,424 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to use the Serial port in C# without using win32api or mscomm.ocx

Is there a c# solution for this ?
It may work like the MSCOMM control.
Applications that use the MSCOMM ocx should distribute this component too,
so i want to avoid this.
How can serial port access with overlapped io be done in c# ?
Or should i fall back to the win32 api (createfile) with overlapped io ,and
create a wrapper in managed code ?

Any suggestions ?


Nov 15 '05 #1
3 5040

"Fergus Cooney" <wo****@tesco.n et> wrote in message
news:O6******** ******@TK2MSFTN GP12.phx.gbl...
Hi Sagaert,

I've just started a book ".NET Framework Solutions - In Search of the
Lost Win32 Api" which has a whole section about Serial Port access - because it's missing from .NET.

Good luck,
Fergus


Who's publishing it, and when will it be available?
Nov 15 '05 #2
Hi Michael,

SYBEX: 2002
Author: John Paul Mueller
ISBN: 0-7821-4134-X

Regards,
Fergus


Nov 15 '05 #3
Take a look at:

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

It shows a complete serial port implementation in C# usin P/Invoke.

Boaz Ben.Porat
DataPharm a/s
Nov 15 '05 #4

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

Similar topics

0
2285
by: Helge Jensen | last post by:
Having posted in microsoft.public.dotnet.framework.sdk and microsoft.public.dotnet.framework.wmi without receiving any response, I posthere on the off-chance that someone who isn't following those groups knows a solution. I'm using code (roughly like): using System; using System.Management; public class Foo {
7
3062
by: Kevin | last post by:
Hi all I am having a problem reading from a serial port, first of all I have now resorted to using the MSComm ActiveX control on my Windows Forms to provide me with the interface to my serial port. is there no other way to do this - it has to be simple or well explained because I'm still new to the .NET world and c#. I did stumble across an article on the MSDN site where I downloaded a file NetSerialComm.exe - I think it was from one of the...
3
3027
by: dalewz | last post by:
Hi, I am thinking to use C# and MSCOMM in MS VS.net to support GUI and serial port communication. Is this possible? I know that VB and C++ can. Thanks. -Dale
3
2245
by: Swatcat | last post by:
I have a device that send to my computer information by serial com port. The comunication parameters are: PORT: COM 1 Bits per second: 9600 Data bits: 8 Parity: None (0) Stop bits:1 How can I receive or transfer DATA by COM 1 serial port ???
16
7537
by: halukg | last post by:
I am trying to send a 6 byte char array from the serial port in new C# 2005 Express: com.Write(new string(new char { (char)34, (char)14, (char)192, (char)51, (char)0, (char)0 }, 0, 6)); I am receiving 34,14,63,51,0,0 from the port as I connected Tx and Rx pins to each other by using the following code: private void com_DataReceived(object sender, SerialDataReceivedEventArgs e) {
3
4789
by: Amjad | last post by:
Hi, I'm working on an application that sends and receives data over the serial port using the MSComm control. How do I empty the buffer of the received data and how do I set its size? Are there any limits? Amjad
9
9066
by: Carl Gilbert | last post by:
Hi I'm trying to open a vb6 project in vb.net which uses the mscomm component. When running the vb upgrade wizard in vb.net, an error is raised: Upgrade failed, unable to load reerenced component mscomm32.ocx (1.1.0) You need to install this component before you upgrade the project. Does anyone know how to install the mscomm component.
0
9815
by: pandi | last post by:
Hi, I am using a check scanner.It has functions which gives output like image ,checknumber. i am using serial port to get this output in my coding. My problem is i am not able to read the display image ( which i scanned using scanner ). I used serail port as well as MSCOMM control.but i couldn't get the output. Can anybody knows this and help me to sort out my problem -- it is very urgent here i am using windows 2000 professional OS and i...
2
3792
by: evle | last post by:
haw to read data from an Infrared Infrared Remote Control
0
9576
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
9961
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8840
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6656
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5283
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5425
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3932
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3534
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2808
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.