问题描述
予有需要的整数传递给另一个程序在同一台机器上的.NET 3.0应用。我使用的是WCF服务要做到这一点,但在尝试主办的本地主机服务时遇到了用户权限的问题。如何做到这一点的任何想法woudld大大AP preciated。
I have a .Net 3.0 application that needs to pass an integer to another program on the same machine. I was using a WCF service to do this, but ran into user rights issues when trying HOSTING the service on the local box. Any thoughts on how to accomplish this woudld be greatly appreciated.
谢谢
戴夫
推荐答案
WCF还是要走的道路在这里。
WCF is still the way to go here.
通常情况下,在同一台机器上的进程间通信时,将使用命名管道的通道。如果你使用的不是这个,我建议你做什么,然后确定在托管误差。
Generally, for inter-process communication on the same machine, you would use the named pipe channel. If you are not using this, I suggest you do and then determine what the error in hosting is.
如果这两个程序都正在处理邮件循环,并您发送一个整数,您可以通过在P使用调用SendMessage函数/调用层为好,但这只是因为你发送的数据等于的或比SendMessage函数将允许更小。更大的消息将需要像WCF。
If both programs have message loops that are being processed, and you are sending an integer, you could use a call to SendMessage through the P/Invoke layer as well, but that's only because you are sending data that is equal to or smaller than what SendMessage will allow. Larger messages will require something like WCF.
这篇关于你如何传递一个消息从一个项目到另一个?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!