How to determine which version of Direct3D is installed?

We have an application that should use Direct3D. In particular, it requires at least DirectX 9.0c version 4.09.0000.0904. Although this should be present on all newer XP machines, it cannot be installed on older XP machines. How can I programmatically (using C ++) determine if it is installed? I want the user to be able to tell the user that Direct3D will not be available.

+3
source share
4 answers

DirectXSetupGetVersion call: http://msdn.microsoft.com/en-us/library/microsoft.directx_sdk.directsetup.directxsetupgetversion

You will need to enable dsetup.h

Here is a sample code from the site:

DWORD dwVersion;
DWORD dwRevision;
if (DirectXSetupGetVersion(&dwVersion, &dwRevision))
{
    printf("DirectX version is %d.%d.%d.%d\n",
           HIWORD(dwVersion), LOWORD(dwVersion),
           HIWORD(dwRevision), LOWORD(dwRevision));
}
+5
source

DirectX 9.0 SDK ( 2004 .) . SDK GetDXVer \\\DXMisc\GetDXVer.

0

Google , case, , .

Google ++ .

Enjoy...

0

, , DirectX 2009 DirectX SDK. ( "" .)

! .

The only supported way is to use the DirectSetup API, which is shown in the DirectX installation example. I will also talk about this in chapter 24. Installation and configuration in my book Direct3D Graphics Pipeline . You can download this chapter for free at the above URL.

0
source

Source: https://habr.com/ru/post/1697016/


All Articles