RS232 using CreateFile

RS232 using CreateFile

Post by Klaus R. Muelle » Wed, 22 Sep 1999 04:00:00



Hi,

can anyone supply me with some sample code depicting how to program the
serial line (RS232) under NT4.0 using the CreateFile, WriteFile and
ReadFile functions. I managed to establish the communication, but I'm
having a hard time to control the buffers (looking for a function to
flush,etc).
If applicable I would be interested to use different functions for
performing the serial line handling. I was used to use the port
functions, however I have difficulties integrating the getvect and
setvect functions into my Win32 application. As I mentioned, I'm running
NT 4.0 (alternatively Win98) and I'm developing in MSVC 5.0.


thanks,

Hartwig

--
========================================
   Mueller Systemtechnik GmbH
   Oskar-von-Miller-Ring 29
   80333 Muenchen, Germany

   phone: +49-8928659081
   fax:       +49-8928659082


   www: http://www.muellersystec.de
========================================

 
 
 

RS232 using CreateFile

Post by Thomas Lu » Sat, 02 Oct 1999 04:00:00


There is an excellent C++ source code example of a terminal program
available on the Microsoft Developer Network CD ROM and I believe that
there is also some sample code on the microsoft website in the MSDN
section. http://msdn.microsoft.com/developer
Log in and do a search of their entire site for "SERIAL I/O" or
"Terminal" or "RS232".

For more serial I/O solutions visit http://www.taltech.com

On Tue, 21 Sep 1999 23:48:00 +0100, "Klaus R. Mueller"


>Hi,

>can anyone supply me with some sample code depicting how to program the
>serial line (RS232) under NT4.0 using the CreateFile, WriteFile and
>ReadFile functions. I managed to establish the communication, but I'm
>having a hard time to control the buffers (looking for a function to
>flush,etc).
>If applicable I would be interested to use different functions for
>performing the serial line handling. I was used to use the port
>functions, however I have difficulties integrating the getvect and
>setvect functions into my Win32 application. As I mentioned, I'm running
>NT 4.0 (alternatively Win98) and I'm developing in MSVC 5.0.


>thanks,

>Hartwig


 
 
 

1. VXD: Virtual RS232 Port (Rs232 Filter) for Win9x

Hi there,

I would like to program a device driver which adds a VIRTUAL
RS232C-COMx-Port to
Windows9x. Application programs shouldn't notice that it's not a real
COM-Port.
In addition the driver should be able to filter incoming bytes from the
application, send a
response back to the application AND communicate via a REAL RS232 with
some
external device .

Or in short: It should work like a bidirectional filter having RS232
In-/Outputs at each
side.

Has anyone any good information/links/pieces of source code on how to do
something like
this ?  Any help is appreciated (I know 16/32Bit x86 Assembler quite
well, but not
VXD-Programming)


Thanks.

            Stefan

2. Anyone w/ a 486slc2/66 running OS/2?

3. Req: working RS232 sample using overlapped structure in C++

4. Windows98,Explorer

5. writting real time program to in windows that uses RS232 or Parallel Port.

6. makemap on Solaris 2.5.1

7. Problem with using RS232 Port

8. 2nd Internal Disk in Sparc 5

9. Extended using of RS232 port

10. Data transfer through RS232 using C C++

11. Using MSComm32.ocx for RS232 Connection

12. How to get filename that was used in CreateFile?

13. Using CreateFile in GINA to access COM1