D3DXCheckVersion

Verify that the version of D3DX you compiled with is the version that you are running.

BOOL D3DXCheckVersion(
  UINT D3DSDKVersion,
  UINT D3DXSDKVersion
);

Parameters

D3DSDKVersion
[in] Use D3D_SDK_VERSION. See remarks.
D3DXSDKVersion
[in] Use D3DX_SDK_VERSION. See remarks.

Return Values

Returns TRUE if the version of D3DX you compiled against is the version you are running with; otherwise, FALSE is returned.

Remarks

Use this function during the initialization of your application like this:

HRESULT CD3DXMyApplication::Initialize(HINSTANCE hInstance, 
  LPCSTR szWindowName, LPCSTR szClassName, UINT uWidth, UINT uHeight)
{
    HRESULT hr;
    
    if (!D3DXCheckVersion(D3D_SDK_VERSION, D3DX_SDK_VERSION))
        return E_FAIL;
    
    ...
}

Use Direct3DCreate9 to verify that the correct runtime is installed.

Requirements

Header: Declared in D3dx9core.h.