Skip to content

Configuration (stub)

Elisha Riedlinger edited this page Dec 25, 2023 · 6 revisions

Configuration for the stub of DxWrapper

The stub file in dxwrapper is a small dll file that is used to load dxwrapper into a game. The stub is not required as the dxwrapper.dll file can be renamed and loaded into the game directly by simply renaming it. dxwrapper includes many different stub files (such as ddraw.dll, d3d8.dll, d3d9.dll, dsound.dll, dinput.dll, etc.), however, all of the files are identical other than their names. So you can rename any of the files to any other supported name. Only a single stub file is normally needed.

No config ini file is required. However, in some circumstances you may want to configure how the stub works. When the stub files loads it tries to read the ini file. It looks for an ini file with the same name as the dll file. For example if you are using the winmm.dll stub then it will look for a file called winmm.ini. Make sure to rename the ini file to match the dll name.

The default configuration option file for the stub is Stub.ini.

Also see: Configuration

Also see: Configuration (advanced)

General

RealDllPath

By default when stub is loaded it will load the Windows System dll. However, if you need the stub to load a different dll you can list that dll here. A use case for this would be if you want to use DxWrapper alongside some other wrapper like dgVoodoo or an existing game dll with the same name.

WrapperMode

This tells the stub which dll it is wrapping. By default the stub will detect the name of the wrapper and use the mode associated with the name. So, if you are wrapping d3d8.dll then it will automatically choose the d3d8 wrapper mode. However, in some circumstances games will rename the dll file. For example, if you are playing the GOG version of American Conquest, then it has a dll named mdraw.dll that is just ddraw.dll renamed. In this case you would rename the stub to mdraw.dll and you would need to set the WrapperMode to ddraw to tell DxWrapper that this is a ddraw dll.

Supported wrapper modes are: bcrypt, cryptsp, d2d1, d3d8, d3d9, d3d10, d3d11, d3d12, dciman32, ddraw, dinput, dinput8, dplayx, dsound, dwmapi, msacm32, msvfw32, version, wininet, winmm, wsock32, winmmbase.

StubOnly

By default the stub will attempt to load dxwrapper.dll. However, you can configure this option to tell the stub not to load dxwrapper.dll. This can be set to 0 for off or 1 for on.

LoadFromMemory

This option will tell the stub to load dxwrapper.dll from memory rather than from disk. This can be set to 0 for off or 1 for on.

Sample

Below is a sample configuration for the stub:

;; Config file for Stub to dxwrapper
[General]
RealDllPath       = AUTO
WrapperMode       = AUTO
StubOnly          = 0
LoadFromMemory    = 0