Microsoft DirectX 8.0 (Visual Basic)

DirectXSetup

Installs one or more Microsoft� DirectX� components.

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

Parameters

hWnd
Handle of the parent window for the setup dialog boxes.
lpszRootPath
Address of 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, and Dsetup32.dll, as well as a "DirectX" (this name is 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 programs that use this flag install all DirectX components.
DSETUP_DDRAW Obsolete. DirectX programs that use this flag install all DirectX components.
DSETUP_DDRAWDRV Not used in DirectX 8.0.
DSETUP_DINPUT Obsolete. DirectX programs that use this flag install all DirectX components.
DSETUP_DIRECTX Installs DirectX run-time components, as well as DirectX-compatible display and audio drivers.
DSETUP_DIRECTXSETUP Obsolete. DirectX programs that use this flag install all DirectX components.
DSETUP_DPLAY Obsolete. DirectX programs that use this flag install all DirectX components.
DSETUP_DPLAYSP Obsolete. DirectX programs that use this flag install all DirectX components.
DSETUP_DSOUND Obsolete. DirectX programs that use this flag install all DirectX components.
DSETUP_DSOUNDDRV Not used in DirectX 8.0.
DSETUP_DXCORE Installs DirectX run-time components. Does not install DirectX-compatible display and audio drivers.
DSETUP_TESTINSTALL Performs a test installation. Does not install new components.
DSETUP_USEROLDERFLAG Enables the return of �14, which means that the installed version of DirectX is newer than the version being installed.

Return Values

If this function succeeds, it returns one of the following success codes:

DSETUPERR_SUCCESS Success.
DSETUPERR_SUCCESS_RESTART Success, but the user must restart the system for the changes to take effect.

If it fails, it returns an error value. For a list of possible return values, see Return Values.

Remarks

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

Requirements

  Windows NT/2000: Requires Windows NT 4.0 SP3 or later.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Header: Declared in Dsetup.h.
  Import Library: Use Dsetup.lib.