How can I use ReadFile() and WriteFile ()
-
I want to send an recive a CString between COM1 and COM2.How can I use the function ReadFile() and WriteFile()?Can anyone give a example code?thanks very much.;P YES, I am here.
Writing is easy but reading is not that simple. Check this website [^] for an example. Also search MSDN for serial communications. // Afterall, I realized that even my comment lines have bugs When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
-
Writing is easy but reading is not that simple. Check this website [^] for an example. Also search MSDN for serial communications. // Afterall, I realized that even my comment lines have bugs When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
-
I want to send an recive a CString between COM1 and COM2.How can I use the function ReadFile() and WriteFile()?Can anyone give a example code?thanks very much.;P YES, I am here.
Here is a link to MSDN that shows a good design sample from Microsoft. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn\_serial.asp Kuphryn
-
thank you .but that is too hard to find what my want. can anyone give me a simple? YES, I am here.
Angel Kid wrote: that is too hard to find what my want If you read the article that kuphryn gave you, maybe that example won't seem so hard. I agree with you when you say that it is too hard, because I had the same problem when I first saw the example a few years ago, but the thing is that I was unable to find anything more simple. I don't know how comfortable you are with threads because you have to use them. On the other hand just ignore all the stuff that seems complicated to you because you won't need most of it. I wish I could help you with some sample code, but unfortunately I don't have any available. Just take a look at [^] because there are some classes that deal with serial communications. // Afterall, I realized that even my comment lines have bugs When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
-
thank you .but that is too hard to find what my want. can anyone give me a simple? YES, I am here.