Click to See Complete Forum and Search --> : serial port access


Alicat
May 31st, 2006, 02:35 AM
Hi
I'm new to Visual C++ express. Actually I'm new to windows programming in general. I'm trying to find some tutorials or pointers on being able to write code in Visual C++ Express to be able to send and receive information through a USB to Serial adaptor. My Serial adaptor shows up as COM7. What it he best way to access it? I'm using a form dialogue box since Express version is not MFC enabled.

I would be sending 5 - 10 characters at most but receiving 5 - 100 characters as feedback.

My operating systems are Windows XP home edition and Windows 2000. not sure whether code would be different for each of them

juresmith
June 5th, 2006, 03:23 AM
You can access COM ports using the Microsoft Communications ActiveX Control (MSComm control, Mscomm32.ocx ActiveX control). It is a very flexible way of accessing it.

Alicat
June 26th, 2006, 06:02 PM
I've searched all over for information to access serial ports using Visual C++ 2005 Express edition but nothing I've tried seem to work. Either the code is too old for the 2005 edition or it written in C# or VB. I'm obviously missing some important pieces that may seem logical and easy to seasoned programmer.

Can someone please provide baby steps for setting up a forms application to open a serial port and send and receive a few bytes to a com port by clicking a button?