Author: Sean Pesce
Simple d3d9.dll wrapper used by programs to load d3d9.dll and dxgi.dll from the system directory instead of the local directory to circumvent any existing wrappers for these DLLs that may cause incompatibility issues (such as SweetFX or PvP Watchdog for Dark Souls). This wrapper does not modify or add to the functionality of the original d3d9.dll.
First, add this class to your project:
static class Kernel32_LoadLib
{
[System.Runtime.InteropServices.DllImport("kernel32.dll")]
public static extern IntPtr LoadLibrary(string dllToLoad);
}
Then, load the library at runtime, like so:
IntPtr dll_preload = Kernel32_LoadLib.LoadLibrary(@"dll_preloader.dll");
Include the Win32 API header in your project (#include <Windows.h>
), and load the library at runtime, like so:
LoadLibrary("dll_preloader.dll");
GNU General Public License v3.0
For inquiries and/or information about me, visit my personal website.