DirectXSetup

int WINAPI DirectXSetup(HWND hwnd, LPSTR root_path,

DWORD dwflags);

Installs one or more DirectX components.

·Returns one of the following values:

SUCCESS

A 0 is returned if the setup was successful and no reboot is required.

A 1 is returned if the setup was successful and a reboot is required.

DSETUPERR_BADSOURCESIZE

A file's size could not be verified or was incorrect.

DSETUPERR_BADSOURCETIME

A file's date and time could not be verified or was incorrect.

DSETUPERR_BADWINDOWSVERSION

The Windows version on your system is not supported by DirectX.

DSETUPERR_CANTFINDDIR

The setup program could not find the working directory.

DSETUPERR_CANTFINDINF

A required .inf file could not be found.

DSETUPERR_INTERNAL

An internal error occurred.

DSETUPERR_NOCOPY

A file's version could not be verified or was incorrect. If the DSETUP_REINSTALL flag is specified, equal versions will be installed.

DSETUPERR_OUTOFDISKSPACE

The setup program ran out of disk space during installation.

DSETUPERR_SOURCEFILENOTFOUND

One of the required source files could not be found.

hwnd

Parent HWND for the setup dialog boxes.

root_path

Address of a string containing the root path of the DirectX component files.

dwflags

One or more flags used to indicate which DirectX components should be installed. A full installation is recommended.

DSETUP_D3D Installs Direct3D.

DSETUP_DDRAW Installs DirectDraw.

DSETUP_DIRECTX Installs all DirectX components.

DSETUP_DPLAY Installs DirectPlay.

DSETUP_DSOUND Installs DirectSound.

DSETUP_REINSTALL Installs even if the existing components are the same version.