473,387 Members | 1,760 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.

Access Com Port

Hi all,
Can anyone tell me whether visual studio .net supports serial port
accessibility. I am now doing a project, an unspecified machine is pluged
into computer's serial port. GUI is necessary. After i searched the MSDN, I
cannot found any solution about how VS .net handles com port reading. I
wouldn't like to spend a lot of time on GUI design, so C language is not
preferred. So, somebody said that i should use VB or C# to develop a program
which can read data from serial port. Thank you for your attention.

Some information:
- the machine returns 8 numbers to computer periodically (< 1 second)
- Number includes hex. and binary value, e.g. hhbbbbbb
h = hex, b = binary value

cheers,
Stanley
Nov 15 '05 #1
2 1561
Yes, it does. There's a lot to it in some regards and you need to get into
the WinAPI.

To determine the Status of a port:

[DllImport("Kernel32.DLL")]
public static extern bool GetCommState(IntPtr hFile, ref DCB dcb);

This API should get you there...there's a lot of code for me to post here.
...but you can find the documentation on the Structs on Google.

If you are going to do much with this, let me REcommend .Net Framework
Solutions, In Search of the Lost Win32 API by John Paul Mueller, he's got a
ton of stuff in there. I don't have the book in front of me, but I can
probably zing you much of the code in the morning.

Cheers,

Bill
"Stanley" <st**********@sinatown.com> wrote in message
news:uB**************@tk2msftngp13.phx.gbl...
Hi all,
Can anyone tell me whether visual studio .net supports serial port
accessibility. I am now doing a project, an unspecified machine is pluged
into computer's serial port. GUI is necessary. After i searched the MSDN, I cannot found any solution about how VS .net handles com port reading. I
wouldn't like to spend a lot of time on GUI design, so C language is not
preferred. So, somebody said that i should use VB or C# to develop a program which can read data from serial port. Thank you for your attention.

Some information:
- the machine returns 8 numbers to computer periodically (< 1 second)
- Number includes hex. and binary value, e.g. hhbbbbbb
h = hex, b = binary value

cheers,
Stanley

Nov 15 '05 #2
Thank you very much, Bill.
Nov 15 '05 #3

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

Similar topics

7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
16
by: cyranoVR | last post by:
This is the approach I used to automate printing of Microsoft Access reports to PDF format i.e. unattended and without annoying "Save As..." dialogs, and - more importantly - without having to use...
13
by: Al the programmer | last post by:
I need to access the serial ports on my webserver from an asp.net page. I have no problem accessing the serial ports from a windows form application, but the code doesn't work in asp.net. I have...
15
by: Cheryl Langdon | last post by:
Hello everyone, This is my first attempt at getting help in this manner. Please forgive me if this is an inappropriate request. I suddenly find myself in urgent need of instruction on how to...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.