VC++ .net and serial communication
-
First of all I must say I´m quite new to C++ and advanced programming. I need to write an application that communicates with the serial port programming in Visual C++ .Net. I have downloaded a number of source files from codeproject, however I cannot compile it, (guess its something wrong with my settings etc) and I´m a little confused about the number of files that come with the projects and what they do... I was wondering if anybody had a sample program that communicates with the serial port (like only a .cpp file or two)....hm maybe it´s not even possible, but I´ll be happy for some comments on this as this serial comm is getting on my nerves :-) best regards doneirik
-
First of all I must say I´m quite new to C++ and advanced programming. I need to write an application that communicates with the serial port programming in Visual C++ .Net. I have downloaded a number of source files from codeproject, however I cannot compile it, (guess its something wrong with my settings etc) and I´m a little confused about the number of files that come with the projects and what they do... I was wondering if anybody had a sample program that communicates with the serial port (like only a .cpp file or two)....hm maybe it´s not even possible, but I´ll be happy for some comments on this as this serial comm is getting on my nerves :-) best regards doneirik
Hi, What error message r u getting. I had done serial comm in VC++. Have a look at the following link http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp[^] it will surely help you Sujan
-
First of all I must say I´m quite new to C++ and advanced programming. I need to write an application that communicates with the serial port programming in Visual C++ .Net. I have downloaded a number of source files from codeproject, however I cannot compile it, (guess its something wrong with my settings etc) and I´m a little confused about the number of files that come with the projects and what they do... I was wondering if anybody had a sample program that communicates with the serial port (like only a .cpp file or two)....hm maybe it´s not even possible, but I´ll be happy for some comments on this as this serial comm is getting on my nerves :-) best regards doneirik
i wish i can send you a book through the net but it is still impossible if it is in phisical paper format ... I strongly recommend you ( if you find it ) "Advanced Programming on windows" by Jeffrey Richter. However if you arent such an adventure man and simply want to solve the problem by now, you have to find in the msdn the documentation about: CreateFile, WriteFile and ReadFile, and SetCommConfig. They are functions of windows api. Do not forget to include . With those four functions and a lot of error discovering efforts you will probably success in comunicating with serial port. I have done it before in my work but i dont have the code.:)