DirectXSetup

The DirectXSetup function installs one or more DirectX components.

int WINAPI DirectXSetup(
  HWND hWnd,           
  LPSTR lpszRootPath,  
  DWORD dwFlags        
);
 

Parameters

hWnd
Handle to the parent window for the setup dialog boxes.
lpszRootPath
Pointer to a string that contains the root path of the DirectX component files. This string must specify a full path to the directory that contains the files Dsetup.dll, Dsetup16.dll, and Dsetup32.dll, as well as a "DirectX" (not case sensitive) directory containing redistributable files. If this value is NULL, the current working directory is used.
dwFlags
One or more flags indicating which DirectX components should be installed. A full installation (DSETUP_DIRECTX) is recommended.
DSETUP_D3D Obsolete. DirectX 3 programs that use this flag will install all DirectX components.
DSETUP_DDRAW Obsolete. DirectX 3 programs that use this flag will install all DirectX components.
DSETUP_DDRAWDRV Installs display drivers provided by Microsoft.
DSETUP_DINPUT Obsolete. DirectX 3 programs that use this flag will install all DirectX components.
DSETUP_DIRECTX Installs DirectX run-time components as well as DirectX-compatible display and audio drivers.
DSETUP_DIRECTXSETUP Obsolete. DirectX 3 programs that use this flag will install all DirectX components.
DSETUP_DPLAY Obsolete. DirectX 3 programs that use this flag will install all DirectX components.
DSETUP_DPLAYSP Obsolete. DirectX 3 programs that use this flag will install all DirectX components.
DSETUP_DSOUND Obsolete. DirectX 3 programs that use this flag will install all DirectX components.
DSETUP_DSOUNDDRV Installs audio drivers provided by Microsoft.
DSETUP_DXCORE Installs DirectX run-time components. Does not install DirectX-compatible display and audio drivers.
DSETUP_TESTINSTALL Performs a test installation. Does not actually install new components.

Return Values

If this function is successful, it returns DSETUPERR_SUCCESS, or DSETUPERR_SUCCESS_RESTART if the user must restart the system in order for changes to take effect.

If it is not successful, it returns an error code. For a list of possible return codes, see Return Values.

Remarks

Before you use the DirectXSetup function in your setup program, you should ensure that there is at least 15 MB of available disk space on the user's system. This is the maximum space required for DirectX to set up the appropriate files. If the user's system already contains the DirectX files, this space is not needed.

QuickInfo

  Windows NT: Requires version 4.0 SP3 or later.
  Windows: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Header: Declared in dsetup.h.
  Import Library: Use dsetup.lib.