How can i use the serial port in vc++ (sending bits etc). ?
Thanks!
Clemens Timmermans (17-Year old)
Webmaster of: http://www.maxcode.com/
This Website Contains: sourcecodes for all major programming languages with special C/C++/VC++
Printable View
How can i use the serial port in vc++ (sending bits etc). ?
Thanks!
Clemens Timmermans (17-Year old)
Webmaster of: http://www.maxcode.com/
This Website Contains: sourcecodes for all major programming languages with special C/C++/VC++
Use CreateFile with "COM1", "com2", etc. Then just read/write using the file handle.
Any one who knows he/she is not smart is smart.
Any one who knows he/she is smart is not smart.
You ask me if I am smart or not? Well...
I don't know - you tell me :-)
but when i say serial i mean the lpt1 port
Clemens Timmermans (17-Year old)
Webmaster of: http://www.maxcode.com/
This Website Contains: sourcecodes for all major programming languages with special C/C++/VC++
Parallel port (LPT1 etc) works exactly the same way, just use "LPT1" instead of "COM1"
good luck
hmmm.. i'll try
thanks for the link both!!
Clemens Timmermans (17-Year old)
Webmaster of: http://www.maxcode.com/
This Website Contains: sourcecodes for all major programming languages with special C/C++/VC++
accessing serial port or lpt port in windows is same as accessing a file. u can use CreateFile function in it insteady of file name use com1 or com2 whatever. see msdn help for more. also go through DCB structure and COMMTIMEOUTS structure.
Take a look here:
http://msdn.microsoft.com/library/te...sdn_serial.htm
For parallel port you can use the same method.