Sharing a global/static variable between a process and DLL

前端 未结 8 1602
借酒劲吻你
借酒劲吻你 2020-11-27 04:16

I\'d like to share a static/global variable only between a process and a dll that is invoked by the process. The exe and dll are in the same memory address space. I don\'t w

8条回答
  •  独厮守ぢ
    2020-11-27 05:03

    Thanks for providing various solution on this. i have looked at these option and decided to implement the cross module singleton using the Shared Memory and it worked well for me as well. i have used Qt QSharedMemory to achieve my task but the prototype i wrote using the Win32 CreateFileMapping & etc.

提交回复
热议问题