|
-
February 26th, 2013, 05:00 PM
#11
Re: Sending Byte to serial port
Even though you may actually manage to get your C++/CLI program working with the native CSerialPort class, I'd strongly recommend against using it. The .NET framework provides the handy SerialPort class which you should use instead.
Unnecessarily combining managed and native code can considerably complicate things, which is particularly true when multithreading is involved, and that's the case in properly designed serial communication code. The complication may be so drammatic that you need to take more effort to have the managed and native parts of your program cooperate properly (the so-called interop) than to write the code that your program actually needs to do what it is supposed to do.
BTW, this is the correct forum section for C++/CLI questions: http://forums.codeguru.com/forumdisp...ed-C-and-C-CLI. Please post further questions of that kind over there.
I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.
This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.
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
|