解决方案 »

  1.   

    跨用户会话,需要加上"Global\"前缀http://msdn.microsoft.com/en-us/library/system.threading.mutex.aspxOn a server that is running Terminal Services, a named system mutex can have two levels of visibility. If its name begins with the prefix "Global\", the mutex is visible in all terminal server sessions. If its name begins with the prefix "Local\", the mutex is visible only in the terminal server session where it was created. In that case, a separate mutex with the same name can exist in each of the other terminal server sessions on the server. If you do not specify a prefix when you create a named mutex, it takes the prefix "Local\". Within a terminal server session, two mutexes whose names differ only by their prefixes are separate mutexes, and both are visible to all processes in the terminal server session. That is, the prefix names "Global\" and "Local\" describe the scope of the mutex name relative to terminal server sessions, not relative to processes.
      

  2.   

    补充一点
    读取内存中数据都是通过:
                ShareMemory sm = new ShareMemory();
                sm.BeginShareMemory();
      

  3.   

    你意思是用socket更方便?我这个是在同一台电脑上跑的哦
      

  4.   

    你意思是用socket更方便?我这个是在同一台电脑上跑的哦
    是啊,一台电脑也可以用socket啊。
      

  5.   

    你意思是用socket更方便?我这个是在同一台电脑上跑的哦
    是啊,一台电脑也可以用socket啊。
    恩,这个我知道,用127.0.0.1来监听和发送
    那个效率高呢?
      

  6.   

    你意思是用socket更方便?我这个是在同一台电脑上跑的哦
    是啊,一台电脑也可以用socket啊。
    恩,这个我知道,用127.0.0.1来监听和发送
    那个效率高呢?
    网络效率不低,而且编程模型简单。一看你的代码效率就不高,因为你是用锁的。
      

  7.   

    socket也考虑过
    但是之前那个问题不解决也很憋屈
    跨用户会话,需要加上"Global\"前缀 
    这个是在哪个前面加?谢谢
      

  8.   

    加了好像问题也没解决,
    不行还是用socket吧
      

  9.   

    额 如果网络的吞吐量几十M能够达到Cpu的吞吐量几十G
    那么使用这种内存共享方式 是不是能够把几十台电脑变成一个 超级计算机???
      

  10.   

    在分布式与SOA的年代,进程通信真的大丈夫吗?
    PCB还是保留其原始的意味比较好,共享内存烦恼多~
    个人感觉,除非是制作极致的UI,都没必要这样写吧~
      

  11.   

    曹版,
    昨天晚上还在网上查了点资料,发现用WCF实现我这个功能也比较方便?
    只不过还有个疑问,WCF的双工通讯,客户端向服务请求,然后服务器可以回调客户端的方法。
    那服务器可以主动去调用客户端的方法吗?
    因为我要实现的功能,可能是两边都会主动发起事件
      

  12.   

    曹版,
    昨天晚上还在网上查了点资料,发现用WCF实现我这个功能也比较方便?
    只不过还有个疑问,WCF的双工通讯,客户端向服务请求,然后服务器可以回调客户端的方法。
    那服务器可以主动去调用客户端的方法吗?
    因为我要实现的功能,可能是两边都会主动发起事件
    可以,客户端启动的时候主动连下服务器端。
      

  13.   

    用WCF 搞定啦
    谢谢大家