bo3b / 3Dmigoto

Chiri's DX11 wrapper to enable fixing broken stereoscopic effects.
Other
688 stars 109 forks source link

Unable to load 3DMigoto "d3d11.dll" #178

Open Vitra2050 opened 8 months ago

Vitra2050 commented 8 months ago

When I try to run 3Dmigoto for Genshin Impact I get this error "unable to load d3d11.dll", I already tried to put the game path in d3dx.ini but nothing works, so I don't know what to do.

image

DarkStarSword commented 8 months ago

That's an odd error - it's found the DLL and was able to read the version number from it, but loading it failed for some reason. What version of Windows are you running?

There are a few situations I know of that could potentially cause that error:

  1. Filesystem permissions might be blocking it (i.e. Windows doesn't think you have the "read and execute" permission on the DLL file). It might be an issue with the program you used to extract the zip file, an issue with the folder you extracted it to, or something else may have messed up the permissions. Try extracting the zip file somewhere else and see if you have any more luck.

  2. Your system might be missing one the the DLLs that 3DMigoto requires. I'm assuming you are using the d3d11.dll shipped with the Genshin Impact loader rather than the official release from here. Running dumpbin.exe /dependents d3d11.dll over the GI version of 3DMigoto shows:

    Image has the following dependencies:
    
    XINPUT9_1_0.dll
    D3DCOMPILER_47.dll
    dxgi.dll
    SHLWAPI.dll
    dbghelp.dll
    KERNEL32.dll
    USER32.dll
    GDI32.dll
    ADVAPI32.dll
    SHELL32.dll
    ole32.dll

Most of those come with Windows and we can generally assume they should be present, but one huge suspect I'm seeing here is the dependency on d3dcompiler47.dll, but GI shipped with d3dcompiler46.dll (presumably because that's the version we depend on in the last official 3DMigoto release - @SilentNightSound FYI you might want to ship the 47 version of the dll with your fork). That could definitely be causing this issue - try dropping this one into the same directory as the loader and dll: https://darkstarsword.net/d3dcompiler_47.dll

It's also worth checking if XINPUT9_1_0.dll is installed on your system, I'm not entirely sure if that comes standard with Windows (I think I confirmed that was the case in the past).

  1. It could be that the loader exe and 3DMigoto dll have been mixed up (i.e. 64bit loader and 32bit dll, or vice versa). So long as you got both from the same zip file this shouldn't be the case, but I mention it for the sake of completeness.
SilentNightSound commented 8 months ago

Hello again! From my experience troubleshooting people's issues, ~95% of the time this error is since someone has run the exe directly from the zip folder without extracting the files first. The remaining ~5% is usually fixed by restarting the PC, or by moving the 3dmigoto folder to a directory with less restrictive permissions (make sure to not put the folder in the same directory as Genshin! Genshin specifically searches for and deletes foreign files, and it especially loves to delete the dll). Also, double check the 3Dmigoto dll is actually there and hasn't been eaten by an overzealous anti-virus.

Also, if this is genshin-related please note that we have extensive troubleshooting guides and channels pinned on both the modding sites (gamebanana) and discords (agmg server verification support channel) - 99%+ of the time, the setup issues people come across have been solved multiple times before and listed in those channels, so you can often get targeted and quick support instead of needing to open github issues (we get lots of people asking every day, so the staff is very knowledgeable about genshin-specific setup issues).

Thank you for the note about d3dcompiler DarkStarSword - I need to fix a few issues with the store command as well, so when I do I will update that dll.