Using the ForceDXSetupSuccess Fix

The ForceDXSetupSuccess compatibility fix addresses the issue that causes an application to not install or to not function because it cannot find a specific version of Microsoft® DirectX®. The ForceDXSetupSuccess compatibility fix uses the Load Library function to check if an application is calling dsetup.dll or dsetup32.dll. If the application calls either of these files, this compatibility fix intercepts the call and returns a value indicating success to the application, regardless of the actual DirectX version that is running on the computer, allowing the application to function properly. If neither of the .dll files is located, the code functions as originally expected.

Investigating the Issue

Application issues that can be resolved by applying the ForceDXSetupSuccess compatibility fix typically appear as dialog boxes or user interface (UI) elements that state your current DirectX version is not supported. In addition, you might experience application installation issues or your computer might hang while running multimedia or graphical content.

Intercepted APIs

The following APIs are intercepted by the ForceDXSetupSuccess compatibility fix.

API Description

LoadLibraryA (ANSI)

Used to load a library module into the address space of the process and to detect either dssetup.dll or dsetup32.dll. For more information, see the LoadLibrary Function page on MSDN.

LoadLibraryW (Unicode)

Used to load a library module into the address space of the process and to detect either dssetup.dll or dsetup32.dll. For more information, see the LoadLibrary Function page on MSDN.

LoadLibraryExA (ANSI)

Provides additional load options through the use of command-line parameters. For more information, see the LoadLibraryEx Function page on MSDN.

LoadLibraryExW (Unicode)

Provides additional load options through the use of command-line parameters. For more information, see the LoadLibraryEx Function page on MSDN.

GetProcAddress

Retrieves the address of an exported function or variable from a specified .dll module. For more information, see the GetProcAddress Function page on MSDN.

FreeLibrary

Frees the loaded .dll module and, if necessary, decrements its reference count. When the reference count reaches zero, the module is unloaded from the address space of the calling process and the handle is no longer valid. For more information, see the FreeLibrary Function page on MSDN.

Command-Line Options

The following table provides details for the available command-line option.

Option Description

DirectXSetupGetVersion

Returns the version number for applications that look for a specific version. You can use the DirectXSetupGetVersion function to retrieve the version and revision numbers before or after calling the DirectXSetup function. If you call this function before invoking DirectXSetup, the function returns the version and revision numbers of the DirectX core runtime components that are currently installed. If you call this function after invoking DirectXSetup but before the computer is restarted, it gives the version and revision numbers of the DirectX components that take effect after the computer is restarted.

Note
This function is not recommended, because it returns a version for the core components only (Direct3D, DirectSound, DirectInput, and so on), and it ignores optional side-by-side components, such as D3DX 9, D3DX 10, XACT, XINPUT, XAUDIO2, and X3DAUDIO. Therefore, the version number data is incomplete.

Included Module

The ForceDXSetupSuccess compatibility fix includes the iscript.dll module.

Fixing Your Code

Applications that perform version checks by using the GREATER THAN or EQUAL TO operators require the ForceDxSetupSuccess fix. However, in some cases, additional DirectX versions are supported through added equality comparisons and logical OR operators, which appear between each of these comparisons. Except in situations where there are specific legal or business reasons to do so, DirectX version checks should be done only with a GREATER THAN or EQUAL TO operator, which allows your software to use subsequent versions of DirectX without API interception.

See Also

Concepts

Windows Vista and Windows 7 Operating Systems