Isle
Loading...
Searching...
No Matches
detectdx5.cpp File Reference
#include "detectdx5.h"
#include <ddraw.h>
#include <dinput.h>
Include dependency graph for detectdx5.cpp:

Go to the source code of this file.

Typedefs

typedef HRESULT WINAPI DirectDrawCreate_fn(GUID FAR *lpGUID, LPDIRECTDRAW FAR *lplpDD, IUnknown FAR *pUnkOuter)
 
typedef HRESULT WINAPI DirectInputCreateA_fn(HINSTANCE hinst, DWORD dwVersion, LPDIRECTINPUTA *ppDI, LPUNKNOWN punkOuter)
 

Functions

BOOL DetectDirectX5 ()
 [AI] Checks whether DirectX 5 or a later version is present and available on the system. More...
 
void DetectDirectX (unsigned int *p_version, BOOL *p_found)
 [AI] Detects the version of DirectX installed and indicates if it is present. More...
 

Typedef Documentation

◆ DirectDrawCreate_fn

typedef HRESULT WINAPI DirectDrawCreate_fn(GUID FAR *lpGUID, LPDIRECTDRAW FAR *lplpDD, IUnknown FAR *pUnkOuter)

Definition at line 6 of file detectdx5.cpp.

◆ DirectInputCreateA_fn

typedef HRESULT WINAPI DirectInputCreateA_fn(HINSTANCE hinst, DWORD dwVersion, LPDIRECTINPUTA *ppDI, LPUNKNOWN punkOuter)

Definition at line 8 of file detectdx5.cpp.

Function Documentation

◆ DetectDirectX()

void DetectDirectX ( unsigned int *  p_version,
BOOL p_found 
)

[AI] Detects the version of DirectX installed and indicates if it is present.

Parameters
p_version[OUT] Receives the version number in hexadecimal (e.g., 0x100, 0x200, 0x300, 0x500). [AI]
p_found[OUT] Will be set to TRUE or platform indicator if DirectX-related components are found. [AI]

[AI] Examines the Windows platform and attempts to load key DirectX components (DirectDraw and DirectInput) to determine the DirectX version installed. This includes probing the system for the presence of the required DLLs and interfaces, and incrementally setting the version according to available interfaces and features (DirectDraw2, DirectInput, DirectDrawSurface3, etc.). Sets both the version and a found/platform marker.

Definition at line 20 of file detectdx5.cpp.

◆ DetectDirectX5()

BOOL DetectDirectX5 ( )

[AI] Checks whether DirectX 5 or a later version is present and available on the system.

[AI] This function calls DetectDirectX to determine the installed DirectX version and whether DirectX is found, then returns TRUE if the version is 5.0 (0x500) or newer.

Returns
TRUE if DirectX 5.0 or newer is detected, otherwise FALSE. [AI]

Definition at line 11 of file detectdx5.cpp.