Porting from DOS to W32 - COM port

M

Martins

I need to port an application from DOS to W32.

The application wrote and read the hardware directly.

I know I need to use W32 SDK to access COM ports (USB Devices),
obviously the Windows way.

Several questions:

What should I download (of course I have the compiler - C++ Builder 6)?
I suppose I don't have to download the comllete SDK.

What is the relation of these matters with Net Framework?

Thanks
H. Martins
 
J

Jim Langston

Martins said:
I need to port an application from DOS to W32.

The application wrote and read the hardware directly.

I know I need to use W32 SDK to access COM ports (USB Devices),
obviously the Windows way.

Several questions:

What should I download (of course I have the compiler - C++ Builder 6)?
I suppose I don't have to download the comllete SDK.

What is the relation of these matters with Net Framework?

Thanks
H. Martins

Definately a windows question. Try in one of the microsoft groups. I
normally suggest microsoft.public.vc.language
 
E

Eric Jensen

What should I download (of course I have the compiler - C++ Builder 6)?
I suppose I don't have to download the comllete SDK.

If you have Borland C++ Builder 6, you do also have the platform SDK.
Of course not a updated SDK but it dont matter when its only COM port
communications.

HANDLE ComPort = CreateFile("COM4", GENERIC_READ | GENERIC_WRITE, 0, 0,
OPEN_EXISTING, 0, 0); // Open COM port 4

You can then use ReadFile() and WriteFile() to send data on the port.
There are also GetCommState(), SetCommState(), GetCommTimeouts(),
SetCommTimeouts(), possible more cant remember them all. You can look them
up at msdn, and msdn has sample code as well.
What is the relation of these matters with Net Framework?

Borland C++ Builder has absolutely nothing to do with .NET framework.
However, you can use .NET from unmanaged C++, or from VB6 for that matter.
If you're working in .NET im sure there is a wrapper/class that makes it
very easy to use a serial port/usb/whatever.

You can get more help in comp.os.ms-windows.programmer.win32 and i guess you
can finde some groups that are more related to .NET programming as well.

//eric
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,173
Messages
2,570,937
Members
47,481
Latest member
ElviraDoug

Latest Threads

Top