?/TD> |
Microsoft DirectX 9.0 |
Installs one or more Microsoft?DirectX?components.
Syntax
int 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 the DirectX redistributable files. If this value is NULL, the current working directory is used.
- dwFlags
- One or more flags indicating which control the DirectSetup configuration.
- DSETUP_DIRECTX
- Installs DirectX run-time components, as well as DirectX-compatible display and audio drivers.
- DSETUP_MANAGEDDX
- Installs the Managed DirectX component. This requires that the Microsoft .NET Framework is installed.
- DSETUP_TESTINSTALL
- Performs a test installation. Does not install new components.
Return Value
If it fails, it returns an error value. For a list of possible return values, see 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.
Remarks
Before using the DirectXSetup function in your setup program, you should first ensure that the system has enough available disk space. The maximum space that you need to set up DirectX 9.0 is 20 MB for Microsoft Windows?98 and Windows Millennium Edition (Windows Me) systems, and 25 MB for Windows 2000 and Windows XP.
The following flags can be specified for the dwFlags parameter but are ignored by DirectX 9.0.
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.1. DSETUP_DINPUT Obsolete. DirectX programs that use this flag install all DirectX components. 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.1. DSETUP_DXCORE Installs DirectX run-time components. Does not install DirectX-compatible display and audio drivers.
Function Information
Header dsetup.h Import library dsetup.lib Minimum operating systems Windows 98