从加载到葡萄酒过程中的共享对象(.so)调用Winapi函数
我有一个在葡萄酒下运行的Windows程序。如果我理解正确的话,可以将PE的映射到葡萄酒过程中。 我使用ld_preload将.so加载到葡萄酒过程中。这是SO钩到Vulkan渲染管道中。这使我能够在Winows程序的主线程中执行代码。 从那里开始,我想将Winapi函数称为Windows程序调用。例如,kernel32.dll的getModulehandle()。但是我不知道如何检索其地址。
是否有可能从葡萄酒或Windows程序加载的DLL访问功能? 如果我使用dl_iterate_phdr,我发现似乎与Windows有关的唯一库是ntdll.so
I have a windows program that is run under wine. If i understand correctly, the pe-executable is mapped into the wine process.
I use LD_PRELOAD to load a .so into the wine process. This .so hooks into the vulkan rendering pipeline. That makes me able to execute code in the winows program´s main thread.
From there i would now like to call a WINAPI function as if it was called by the windows program. For example GetModuleHandle() from kernel32.dll. But i do not know how to retrieve the address of it.
Is there any possibility to access functions from the dlls that got loaded by wine or windows program?
If i use dl_iterate_phdr the only library i find that seems to have to do with windows is ntdll.so
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论