Proper way to chain-inject DLLs into wine?

Cláudio Sampaio patola at gmail.com
Tue Jan 5 18:07:59 CST 2021


Hi all,

I have an interesting problem which so far I have been unable to solve, and
I'd like to consult your expertise on this. I've looked through the winehq
docs extensively and even tried to look at the source code of wine but
couldn't figure it out.

Here's the problem: MotherVR - https://github.com/Nibre/MotherVR/releases -
is a replacement dxgi.dll for Alien: Isolation on Windows that intercepts
DirectX calls in order to show the game in Virtual Reality using
SteamVR/openvr. It acts this way by being put into the executable directory
and by itself it calls the functions in the original DirectX dxgi.dll.

How could I reproduce this injection in wine? I know dxvk is not supported
and it not part of the wine project, but in any case regard this as a
broader theoretical question. In that case, I would need MotherVR's
dxgi.dll to be loaded first, then internally call the functions in dxvk's
dxgi.dll for it to work, right? I've tried many combinations with
WINEDLLOVERRIDES to no avail, hasn't worked so far. Would I have to change
the source code of wine, dxvk, or MotherVR? MotherVR is still not
open-source although it is planned to be.

Also, I wonder if this DLL injection would have memory alignment issues,
requiring patches like "Map Image Top Down" -
https://github.com/hdmap/wine-hackery/blob/master/f4se/mapimagetopdown.patch
-- to work? (this patch is required for the Skyrim Script Extender DLL to
work on Linux)

Please advise!
-- 
Cláudio "Patola" Sampaio
MakerLinux Labs - Campinas, SP
Resume <https://github.com/Patola/resume> Gmail <patola at gmail.com> -
MakerLinux <patola at makerlinux.com.br> - YOUTUBE
<https://www.youtube.com/user/makerlinux>!
Facebook <https://www.facebook.com/patolinux> - Facebook da MakerLinux
<https://www.facebook.com/makerlinux> - Lattes
<http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4763932Z5>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20210106/ea8fc3be/attachment.htm>


More information about the wine-devel mailing list