Главная страница | назад

Article #17844: Reading/Writing from RS232 with Builder

 Question and Answer Database

FAQ2844C.txt   Reading/Writing from RS232 with Builder
Category   :C/C++ Language Issues
Platform    :Win95/NT
Product    :   C++Builder1.0   C++Builder3.x

How can I communicate to peripherals in Borland C++ Builder like using
"inportb" ."inp", "outp" in C.....?

You can't use inport / outport any more.  Win32 is more "protected" 
than that, so it isn't allowed. 

However, you do have a few different options.

Discussion of Port I/O under NT:

> Harold Howe has contributed something that you might be able to use
> under win95 only:
> http://www.bcbdev.com/components.htm

Also, if you are just doing work via the serial port, there are a couple
of other options:

1) Get a component to do the work.  Check out commercial products listed
on the Borland web site:


2) Roll your own by using the Win32 CreateFile API.  Check out the win32.hlp
file, as well as the following links:


8/18/98 8:50:03 AM

Last Modified: 01-SEP-99