开发者

How can I share data between two winform applications?

I have two VB projects in one VS2010 solution. The first program brings in about 60 integers every few seconds from my PC's serial port. The second program, published via Click-Once and running on my customer's PC, needs to开发者_如何转开发 see that new data every two to five seconds.

Is there a simple and reliable way to accomplish this, staying with VB?


Use WCF to establish a contract between producer and consumer of the data, implement it ant voila!

WCF Example.

Note: Basics steps to get started:

  • Define your contract (that is, define the interface you'll use to communicate)
  • Generate the WCF proxy
  • Implement the server side (the one that hosts the WCF service)
  • Implement the client side (the one that connects and consumes the WCF service)


The simplest way (and fastest) Just write them in a txt (or XML is better) file from the first application and read them from the other
Fast and easy


Look into Memory-Mapped files in .net 4.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜