How to share memory between linux program and windows program running through Wine (same computer)?

后端 未结 2 962
[愿得一人]
[愿得一人] 2021-02-13 13:40

Is there a way (and then how to) share memory between a linux program and a windows program running through wine ?

Since it could be hard to understand why to do such a

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-13 14:04

    I'm not sure this is a good idea or if it will even work, but you could create files in /dev/shm and access them both from Wine and your native Linux application.

    It's not guaranteed to exist, so you should have a fallback IPC method.

    https://superuser.com/questions/45342/when-should-i-use-dev-shm-and-when-should-i-use-tmp

    Otherwise, you might try building a winelib application that can call your Windows code from Linux: http://web.archive.org/web/20150225173552/http://wine-wiki.org/index.php/WineLib#Calling_a_Native_Windows_dll_from_Linux. I am also not sure whether it will work.

提交回复
热议问题