DirectXSetup
Installs DirectX components.
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
- This flag is ignored unless you use:
- DSETUP_MANAGEDDX
- Installs the Managed Code component. This requires that the Microsoft .NET Framework is installed.
- DSETUP_TESTINSTALL
- Performs a test installation. Does not install new components.
Return Values
If it fails, it returns an error value (see DirectXSetup Return Values). If this function succeeds, it returns one of the following success codes: DSETUPERR_SUCCESS, DSETUPERR_SUCCESS_RESTART
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 is 20 MB for Windows 98 and Windows Millenium systems, and 25 MB for Windows 2000 and Windows XP.
Requirements
Header: Declared in Dsetup.h.
See Also
Installing DirectX with DirectSetup