-
June 11th, 2001, 12:10 PM
#1
How can i use the Serial port in vc++?
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++
[url=http://www.maxcode.com/modules.php?name=Topics] Articles [url] | [url=http://www.maxcode.com/modules.php?name=Downloads&d_op=viewdownload&cid=4]
Compilers [url] | [url=http://www.maxcode.com/modules.php?name=Downloads]Code Samples[url]
-
June 11th, 2001, 12:30 PM
#2
Re: How can i use the Serial port in 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 :-)
-
June 11th, 2001, 12:33 PM
#3
Re: How can i use the Serial port in vc++?
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++
[url=http://www.maxcode.com/modules.php?name=Topics] Articles [url] | [url=http://www.maxcode.com/modules.php?name=Downloads&d_op=viewdownload&cid=4]
Compilers [url] | [url=http://www.maxcode.com/modules.php?name=Downloads]Code Samples[url]
-
June 11th, 2001, 12:36 PM
#4
Re: How can i use the Serial port in vc++?
Parallel port (LPT1 etc) works exactly the same way, just use "LPT1" instead of "COM1"
good luck
-
June 11th, 2001, 12:46 PM
#5
Re: How can i use the Serial port in vc++?
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++
[url=http://www.maxcode.com/modules.php?name=Topics] Articles [url] | [url=http://www.maxcode.com/modules.php?name=Downloads&d_op=viewdownload&cid=4]
Compilers [url] | [url=http://www.maxcode.com/modules.php?name=Downloads]Code Samples[url]
-
June 11th, 2001, 03:14 PM
#6
Re: How can i use the Serial port in 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.
-
June 11th, 2001, 09:48 PM
#7
Re: How can i use the Serial port in vc++?
Take a look here:
http://msdn.microsoft.com/library/te...sdn_serial.htm
For parallel port you can use the same method.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|