How ca开发者_C百科n I use serial port in a Silverlight 4.0 application?
In Silverlight 4, this is only possible via COM, and only out of browser.
Here is an article showing how it can be done.
Usage while in-browser or directly is prohibited by Silverlight's runtime.
Use P/Invoke with Silverlight 5 to talk to Win32 libraries directly. Basically your re-writing the .NET SerialPort class. That's exactly what Ive done.
精彩评论