Can a Singleton Class inside a DLL be shared across processes?

前端 未结 5 2108
眼角桃花
眼角桃花 2020-12-06 01:27

I am creating a custom .net hardware framework that will be used by other programmers to control some hardware. They will add a reference to our DLL to get to our hardware f

5条回答
  •  北荒
    北荒 (楼主)
    2020-12-06 02:18

    You cannot use a singleton to sync across applications. Each runs in its own application space, and as a matter of security cannot access memory/objects/etc. from the other without a method of communication (like remoting) To sync the two they would have to remote into a third program.

提交回复
热议问题