DirectX 5 Redocumentation
A redocumentation of DirectX 5, brought to you by a bunch of Infomaniacs.
dsetup.h File Reference
#include <windows.h>

Go to the source code of this file.

Data Structures

struct  _DSETUP_CB_UPGRADEINFO
 Structure passed as a parameter to the DirectXSetupCallbackFunction. More...
 
struct  _DSETUP_CB_FILECOPYERROR
 Undocumented, but in the headerfile. Probably a structure passed as a callback to the DirectXSetupCallbackFunction as a 'failed to copy file' error. More...
 
struct  _DIRECTXREGISTERAPPA
 Contains the registry entries needed for applications designed to work with DirectPlayLobby. (ANSI only) More...
 
struct  _DIRECTXREGISTERAPPW
 Contains the registry entries needed for applications designed to work with DirectPlayLobby. (Unicode only) More...
 

Macros

#define DSETUPERR_SUCCESS_RESTART   1
 Setup was successful and a restart is required. More...
 
#define DSETUPERR_SUCCESS   0
 Setup was successful and no restart is required. More...
 
#define DSETUPERR_BADWINDOWSVERSION   -1
 DirectX does not support the Windows version on the system. More...
 
#define DSETUPERR_SOURCEFILENOTFOUND   -2
 One of the required source files could not be found. More...
 
#define DSETUPERR_BADSOURCESIZE   -3
 A file's size could not be verified or was incorrect. More...
 
#define DSETUPERR_BADSOURCETIME   -4
 A file's date and time could not be verified or were incorrect. More...
 
#define DSETUPERR_NOCOPY   -5
 A file's version could not be verified or was incorrect. More...
 
#define DSETUPERR_OUTOFDISKSPACE   -6
 The setup program ran out of disk space during installation. More...
 
#define DSETUPERR_CANTFINDINF   -7
 A required .inf file could not be found. More...
 
#define DSETUPERR_CANTFINDDIR   -8
 The setup program could not find the working directory. More...
 
#define DSETUPERR_INTERNAL   -9
 
#define DSETUPERR_NTWITHNO3D   -10
 Undocumented flag, but it's in the header file. More...
 
#define DSETUPERR_UNKNOWNOS   -11
 The operating system on your system is not currently supported. More...
 
#define DSETUPERR_USERHITCANCEL   -12
 The Cancel button was pressed before the application was fully installed. More...
 
#define DSETUPERR_NOTPREINSTALLEDONNT   -13
 
#define DSETUP_DDRAWDRV   0x00000008
 Installs display drivers provided by Microsoft. More...
 
#define DSETUP_DSOUNDDRV   0x00000010
 Installs audio drivers provided by Microsoft. More...
 
#define DSETUP_DXCORE   0x00010000
 Installs DirectX runtime components. Does not install DirectX-compatible display and audio drivers. More...
 
#define DSETUP_DIRECTX   (DSETUP_DXCORE|DSETUP_DDRAWDRV|DSETUP_DSOUNDDRV)
 Installs DirectX runtime components as well as DirectX-compatible display and audio drivers. More...
 
#define DSETUP_TESTINSTALL   0x00020000
 
#define DSETUP_DDRAW   0x00000001
 OBSOLETE. install DirectDraw
More...
 
#define DSETUP_DSOUND   0x00000002
 OBSOLETE. install DirectSound
More...
 
#define DSETUP_DPLAY   0x00000004
 OBSOLETE. install DirectPlay
More...
 
#define DSETUP_DPLAYSP   0x00000020
 OBSOLETE. install DirectPlay Providers. More...
 
#define DSETUP_DVIDEO   0x00000040
 OBSOLETE. install DirectVideo
More...
 
#define DSETUP_D3D   0x00000200
 OBSOLETE. install Direct3D
More...
 
#define DSETUP_DINPUT   0x00000800
 OBSOLETE. install DirectInput
More...
 
#define DSETUP_DIRECTXSETUP   0x00001000
 OBSOLETE. install DirectXSetup DLL's
More...
 
#define DSETUP_NOUI   0x00002000
 OBSOLETE. install DirectX with NO UI
More...
 
#define DSETUP_PROMPTFORDRIVERS   0x10000000
 OBSOLETE. prompt when replacing display/audio drivers. More...
 
#define DSETUP_RESTOREDRIVERS   0x20000000
 
#define DSETUP_CB_MSG_NOMESSAGE   0
 No message to be displayed. The callback function should return. More...
 
#define DSETUP_CB_MSG_CANTINSTALL_UNKNOWNOS   1
 The operating system is unknown. The DirectX component or device driver can’t be installed. More...
 
#define DSETUP_CB_MSG_CANTINSTALL_NT   2
 The DirectX component or device driver can’t be installed on versions of Windows NT prior to version 4.0. More...
 
#define DSETUP_CB_MSG_CANTINSTALL_BETA   3
 A pre-release beta version of Windows 95 was detected. The DirectX component or device driver can’t be installed. More...
 
#define DSETUP_CB_MSG_CANTINSTALL_NOTWIN32   4
 The operating system detected is not Windows 95 or Windows NT®. DirectX is not compatible with Windows 3.x. More...
 
#define DSETUP_CB_MSG_CANTINSTALL_WRONGLANGUAGE   5
 The DirectX component or device driver is not localized to the language being used by Windows. More...
 
#define DSETUP_CB_MSG_CANTINSTALL_WRONGPLATFORM   6
 The DirectX component or device driver is for another type of computer. More...
 
#define DSETUP_CB_MSG_PREINSTALL_NT   7
 DirectX is already installed on the version of Windows NT in use. More...
 
#define DSETUP_CB_MSG_NOTPREINSTALLEDONNT   8
 The DirectX component or device driver can’t be installed on the version of Windows NT in use. More...
 
#define DSETUP_CB_MSG_SETUP_INIT_FAILED   9
 Setup of the DirectX component or device driver has failed. More...
 
#define DSETUP_CB_MSG_INTERNAL_ERROR   10
 An internal error has occurred. Setup of the DirectX component or device driver has failed. More...
 
#define DSETUP_CB_MSG_CHECK_DRIVER_UPGRADE   11
 
#define DSETUP_CB_MSG_OUTOFDISKSPACE   12
 Probably would have been: There is not enough disk space to install DirectX. More...
 
#define DSETUP_CB_MSG_BEGIN_INSTALL   13
 DirectXSetup is about to begin installing DirectX components and device drivers. More...
 
#define DSETUP_CB_MSG_BEGIN_INSTALL_RUNTIME   14
 DirectXSetup is about to begin installing DirectX components. More...
 
#define DSETUP_CB_MSG_BEGIN_INSTALL_DRIVERS   15
 DirectXSetup is about to begin installing device drivers. More...
 
#define DSETUP_CB_MSG_BEGIN_RESTORE_DRIVERS   16
 
#define DSETUP_CB_MSG_FILECOPYERROR   17
 
#define DSETUP_CB_UPGRADE_TYPE_MASK   0x000F
 
#define DSETUP_CB_UPGRADE_UNNECESSARY   0x000F
 The existing device driver is newer than the driver being installed. An upgrade is not recommended. More...
 
#define DSETUP_CB_UPGRADE_KEEP   0x0001
 The system may fail if this device driver is upgraded. Upgrade not allowed. More...
 
#define DSETUP_CB_UPGRADE_SAFE   0x0002
 DirectXSetup can safely upgrade this device driver. Upgrade recommended. A safe upgrade will not adversely affect the operation of Windows. Some hardware-dependent programs may be adversely affected. More...
 
#define DSETUP_CB_UPGRADE_FORCE   0x0004
 Windows may not function correctly if the component is not upgraded. The upgrade will be performed. More...
 
#define DSETUP_CB_UPGRADE_UNKNOWN   0x0008
 DirectXSetup does not recognize the existing driver for this device. This value will occur frequently. Upgrading may adversely affect the use of the device. It is strongly recommended that the upgrade not be performed. More...
 
#define DSETUP_CB_UPGRADE_HASWARNINGS   0x0100
 DirectXSetup can upgrade the driver for this device, but doing so may affect one or more programs on the system. szMessage contains the names of which programs may be affected. Upgrade not recommended. More...
 
#define DSETUP_CB_UPGRADE_CANTBACKUP   0x0200
 The old system components can’t be backed up. Upgrade can be performed, but the components or drivers can’t be restored later. More...
 
#define DSETUP_CB_UPGRADE_DEVICE_ACTIVE   0x0800
 The device is currently in use. More...
 
#define DSETUP_CB_UPGRADE_DEVICE_DISPLAY   0x1000
 The device driver being upgraded is for a display device. More...
 
#define DSETUP_CB_UPGRADE_DEVICE_MEDIA   0x2000
 
#define DirectXSetup   DirectXSetupW
 The define for the DirectXSetup struct. If using Unicode, this will be chosen. More...
 
#define DirectXSetup   DirectXSetupA
 The define for the DirectXSetup struct. If using Unicode, this will be chosen. More...
 
#define DirectXDeviceDriverSetup   DirectXDeviceDriverSetupW
 The define for the DirectXDeviceDriver struct. If using Unicode, this will be chosen. More...
 
#define DirectXDeviceDriverSetup   DirectXDeviceDriverSetupA
 The define for the DirectXDeviceDriver struct. If using Unicode, this will be chosen. More...
 
#define DirectXRegisterApplication   DirectXRegisterApplicationW
 The define for the DirectXRegisterApplication struct. If using Unicode, this will be chosen. More...
 
#define DirectXRegisterApplication   DirectXRegisterApplicationA
 The define for the DirectXRegisterApplication struct. If using Unicode, this will be chosen. More...
 

Typedefs

typedef struct _DSETUP_CB_UPGRADEINFO DSETUP_CB_UPGRADEINFO
 Structure passed as a parameter to the DirectXSetupCallbackFunction. More...
 
typedef struct _DSETUP_CB_FILECOPYERROR DSETUP_CB_FILECOPYERROR
 Undocumented, but in the headerfile. Probably a structure passed as a callback to the DirectXSetupCallbackFunction as a 'failed to copy file' error. More...
 
typedef struct _DIRECTXREGISTERAPPA DIRECTXREGISTERAPPA
 Contains the registry entries needed for applications designed to work with DirectPlayLobby. (ANSI only) More...
 
typedef struct _DIRECTXREGISTERAPPAPDIRECTXREGISTERAPPA
 
typedef struct _DIRECTXREGISTERAPPALPDIRECTXREGISTERAPPA
 
typedef struct _DIRECTXREGISTERAPPW DIRECTXREGISTERAPPW
 Contains the registry entries needed for applications designed to work with DirectPlayLobby. (Unicode only) More...
 
typedef struct _DIRECTXREGISTERAPPWPDIRECTXREGISTERAPPW
 
typedef struct _DIRECTXREGISTERAPPWLPDIRECTXREGISTERAPPW
 
typedef DIRECTXREGISTERAPPW DIRECTXREGISTERAPP
 
typedef PDIRECTXREGISTERAPPW PDIRECTXREGISTERAPP
 
typedef LPDIRECTXREGISTERAPPW LPDIRECTXREGISTERAPP
 
typedef INT(WINAPI * LPDIRECTXSETUP) (HWND, LPWSTR, DWORD)
 
typedef INT(WINAPI * LPDIRECTXDEVICEDRIVERSETUP) (HWND, LPWSTR, LPSTR, DWORD)
 
typedef INT(WINAPI * LPDIRECTXREGISTERAPPLICATION) (HWND, LPDIRECTXREGISTERAPPW)
 

Functions

INT WINAPI DirectXSetupA (HWND hWnd, LPSTR lpszRootPath, DWORD dwFlags)
 Installs one or more DirectX components. (ANSI only) More...
 
INT WINAPI DirectXSetupW (HWND hWnd, LPWSTR lpszRootPath, DWORD dwFlags)
 Installs one or more DirectX components. (Unicode only) More...
 
INT WINAPI DirectXDeviceDriverSetupA (HWND hWnd, LPSTR lpszDriverClass, LPSTR lpszDriverPath, DWORD dwFlags)
 
INT WINAPI DirectXDeviceDriverSetupW (HWND hWnd, LPWSTR lpszDriverClass, LPWSTR lpszDriverPath, DWORD dwFlags)
 
INT WINAPI DirectXRegisterApplicationA (HWND hWnd, LPDIRECTXREGISTERAPPA lpDXRegApp)
 Registers an application as one designed to work with DirectPlayLobby. (ANSI only) More...
 
INT WINAPI DirectXRegisterApplicationW (HWND hWnd, LPDIRECTXREGISTERAPPA lpDXRegApp)
 Registers an application as one designed to work with DirectPlayLobby. (Unicode only) More...
 
INT WINAPI DirectXUnRegisterApplication (HWND hWnd, LPGUID lpGUID)
 Deletes the registration of an application designed to work with DirectPlayLobby. More...
 
DWORD DirectXSetupCallbackFunction (DWORD Reason, DWORD MsgType, LPSTR *szMessage, LPSTR *szName, void *pInfo) INT WINAPI DirectXSetupSetCallback(DSETUP_CALLBACK Callback)
 Placeholder name for a callback function supplied by the setup program. More...
 
INT WINAPI DirectXSetupGetVersion (DWORD *lpdwVersion, DWORD *lpdwMinorVersion)
 Retrieves the version number of the DirectX components that are currently installed. More...
 

Macro Definition Documentation

◆ DirectXDeviceDriverSetup [1/2]

#define DirectXDeviceDriverSetup   DirectXDeviceDriverSetupW

The define for the DirectXDeviceDriver struct. If using Unicode, this will be chosen.

The define for the DirectXDeviceDriver struct. If using ANSI, this will be chosen.

◆ DirectXDeviceDriverSetup [2/2]

#define DirectXDeviceDriverSetup   DirectXDeviceDriverSetupA

The define for the DirectXDeviceDriver struct. If using Unicode, this will be chosen.

The define for the DirectXDeviceDriver struct. If using ANSI, this will be chosen.

◆ DirectXRegisterApplication [1/2]

#define DirectXRegisterApplication   DirectXRegisterApplicationW

The define for the DirectXRegisterApplication struct. If using Unicode, this will be chosen.

The define for the DirectXRegisterApplication struct. If using ANSI, this will be chosen.

◆ DirectXRegisterApplication [2/2]

#define DirectXRegisterApplication   DirectXRegisterApplicationA

The define for the DirectXRegisterApplication struct. If using Unicode, this will be chosen.

The define for the DirectXRegisterApplication struct. If using ANSI, this will be chosen.

◆ DirectXSetup [1/2]

#define DirectXSetup   DirectXSetupW

The define for the DirectXSetup struct. If using Unicode, this will be chosen.

The define for the DirectXSetup struct. If using ANSI, this will be chosen.

◆ DirectXSetup [2/2]

#define DirectXSetup   DirectXSetupA

The define for the DirectXSetup struct. If using Unicode, this will be chosen.

The define for the DirectXSetup struct. If using ANSI, this will be chosen.

Typedef Documentation

◆ DIRECTXREGISTERAPP

◆ DIRECTXREGISTERAPPA

Contains the registry entries needed for applications designed to work with DirectPlayLobby. (ANSI only)

◆ DIRECTXREGISTERAPPW

Contains the registry entries needed for applications designed to work with DirectPlayLobby. (Unicode only)

◆ DSETUP_CB_FILECOPYERROR

Undocumented, but in the headerfile. Probably a structure passed as a callback to the DirectXSetupCallbackFunction as a 'failed to copy file' error.

Remarks
This is undocumented. What we know is a guess.

◆ DSETUP_CB_UPGRADEINFO

Structure passed as a parameter to the DirectXSetupCallbackFunction.

It only contains valid information when the Reason parameter is DSETUP_CB_MSG_CHECK_DRIVER_UPGRADE. Callback functions can use it to get status information on the upgrade that is about to be done.

◆ LPDIRECTXDEVICEDRIVERSETUP

typedef INT(WINAPI * LPDIRECTXDEVICEDRIVERSETUP) (HWND, LPSTR, LPSTR, DWORD)

◆ LPDIRECTXREGISTERAPP

◆ LPDIRECTXREGISTERAPPA

◆ LPDIRECTXREGISTERAPPLICATION

typedef INT(WINAPI * LPDIRECTXREGISTERAPPLICATION) (HWND, LPDIRECTXREGISTERAPPA)

◆ LPDIRECTXREGISTERAPPW

◆ LPDIRECTXSETUP

typedef INT(WINAPI * LPDIRECTXSETUP) (HWND, LPSTR, DWORD)

◆ PDIRECTXREGISTERAPP

◆ PDIRECTXREGISTERAPPA

◆ PDIRECTXREGISTERAPPW

Function Documentation

◆ DirectXDeviceDriverSetupA()

INT WINAPI DirectXDeviceDriverSetupA ( HWND  hWnd,
LPSTR  lpszDriverClass,
LPSTR  lpszDriverPath,
DWORD  dwFlags 
)

◆ DirectXDeviceDriverSetupW()

INT WINAPI DirectXDeviceDriverSetupW ( HWND  hWnd,
LPWSTR  lpszDriverClass,
LPWSTR  lpszDriverPath,
DWORD  dwFlags 
)

◆ DirectXRegisterApplicationA()

INT WINAPI DirectXRegisterApplicationA ( HWND  hWnd,
LPDIRECTXREGISTERAPPA  lpDXRegApp 
)

Registers an application as one designed to work with DirectPlayLobby. (ANSI only)

Parameters
hWndHandle to the parent window. If this parameter is set to NULL, the desktop is the parent window.
lpDXRegAppAddress of the DIRECTXREGISTERAPP structure that contains the registry entries that are required for the application to function properly with DirectPlayLobby
Returns
If the function succeeds, the return value is TRUE meaning that the registration is successfully deleted.
If the function fails, the return value is FALSE.
Remarks
The DirectXRegisterApplication function inserts the registry entries needed for an application to operate with DirectPlayLobby. If these registry entries are added with DirectXRegisterApplication, they should be removed with DirectXUnRegisterApplication when the application is uninstalled.
Many commercial install programs will remove registry entries automatically when a program in uninstalled. However, such a program will only do so if it added the registry entries itself. If the DirectPlayLobby registry entries are added by DirectXRegisterApplication, commercial install programs will not delete the registry entries when the application is uninstalled. Therefore, DirectPlayLobby registry entries that are created by DirectXRegisterApplication should be deleted by DirectXUnRegisterApplication.
Registry entries needed for DirectPlayLobby access can be created without the use of the DirectXRegisterApplication function. This, however, is not generally recommended. See Registering Lobby-able Applications in the DirectPlay® documentation.
See also
DirectXUnRegisterApplication

◆ DirectXRegisterApplicationW()

INT WINAPI DirectXRegisterApplicationW ( HWND  hWnd,
LPDIRECTXREGISTERAPPA  lpDXRegApp 
)

Registers an application as one designed to work with DirectPlayLobby. (Unicode only)

Parameters
hWndHandle to the parent window. If this parameter is set to NULL, the desktop is the parent window.
lpDXRegAppAddress of the DIRECTXREGISTERAPP structure that contains the registry entries that are required for the application to function properly with DirectPlayLobby
Returns
If the function succeeds, the return value is TRUE meaning that the registration is successfully deleted.
If the function fails, the return value is FALSE.
Remarks
The DirectXRegisterApplication function inserts the registry entries needed for an application to operate with DirectPlayLobby. If these registry entries are added with DirectXRegisterApplication, they should be removed with DirectXUnRegisterApplication when the application is uninstalled.
Many commercial install programs will remove registry entries automatically when a program in uninstalled. However, such a program will only do so if it added the registry entries itself. If the DirectPlayLobby registry entries are added by DirectXRegisterApplication, commercial install programs will not delete the registry entries when the application is uninstalled. Therefore, DirectPlayLobby registry entries that are created by DirectXRegisterApplication should be deleted by DirectXUnRegisterApplication.
Registry entries needed for DirectPlayLobby access can be created without the use of the DirectXRegisterApplication function. This, however, is not generally recommended. See Registering Lobby-able Applications in the DirectPlay® documentation.
See also
DirectXUnRegisterApplication

◆ DirectXSetupA()

INT WINAPI DirectXSetupA ( HWND  hWnd,
LPSTR  lpszRootPath,
DWORD  dwFlags 
)

Installs one or more DirectX components. (ANSI only)

Parameters
hWndHandle to the parent window for the setup dialog boxes.
lpszRootPathPointer 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 Dsetup.dll32. This directory is typically Redist. If you are certain the current directory contains Dsetup.dll and the Directx directory, this parameter can be NULL.
dwFlagsOne or more flags indicating which DirectX components should be installed. A full installation (DSETUP_DIRECTX) is recommended. See DirectX Setup Flags .
Returns
If this function is successful, it returns SUCCESS.
If it is not successful, it returns an error code. For a list of possible return codes, see DirectX Setup Error Codes .
Remarks
According to official docs, "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."

◆ DirectXSetupCallbackFunction()

DWORD DirectXSetupCallbackFunction ( DWORD  Reason,
DWORD  MsgType,
LPSTR *  szMessage,
LPSTR *  szName,
void *  pInfo 
)

Placeholder name for a callback function supplied by the setup program.

The callback function reports the status of the current installation process. It also can provide information for use by the MessageBox function.

Sets a pointer to a callback function that is periodically called by DirectXSetup.

The callback function can be used for setup progress notification and to implement a custom user interface for an application’s setup program. For information on the callback function, see DirectXSetupCallbackFunction. If a setup program does not provide a callback function, the DirectXSetupSetCallback function should not be invoked.

Parameters
CallbackPointer to a callback function.
Returns
The documentation says, "Currently returns zero."
Remarks
To set a callback function, DirectXSetupSetCallback must be called before the DirectXSetup function is called.
The name of the callback function passed to DirectXSetupSetCallback is supplied by the setup program. However, it must match the prototype given in DirectXSetupCallbackFunction
See also
DirectXSetupCallbackFunction DirectXSetup
Parameters
ReasonReason for the callback. It can be one of the DirectX Setup Callback Message Info Codes .
MsgTypeContains flags that control the display of a message box. These flags can be passed to the MessageBox function. An exception is when MsgType is equal to zero. In that case, the setup program can display status information but should not wait for input from the user.
szMessageA localized character string containing error or status messages that can be displayed in a message box created with the MessageBox function.
szNameThe value of szName is NULL unless the Reason parameter is DSETUP_CB_MSG_CHECK_DRIVER_UPGRADE. In that case, szName contains the name of driver to be upgraded.
pInfoPointer to a structure containing upgrade information. When Reason is DSETUP_CB_MSG_CHECK_DRIVER_UPGRADE, the setup program is in the process of upgrading a driver and asking the user whether the upgrade should take place. This structure contains information about the upgrade in its UpgradeType member, which can be a value in @dxsetupupgradetypes .
Returns
The return value should be the same as the MessageBox function, with one exception. If this function returns zero, the DirectXSetup function will act as if no callback function was present. That is, it will perform the default action for upgrade of the DirectX component or driver.
Remarks
The name of the DirectXSetupCallbackFunction is supplied by the setup program. The DirectXSetupSetCallback function is used to pass the address of the callback function to DirectSetup.
If MsgType is equal to zero, the setup program may display status information, but it should not wait for user input. This is useful for displaying ongoing status information.
See also
MessageBox DirectXSetupSetCallback

◆ DirectXSetupGetVersion()

INT WINAPI DirectXSetupGetVersion ( DWORD lpdwVersion,
DWORD lpdwMinorVersion 
)

Retrieves the version number of the DirectX components that are currently installed.

Parameters
lpdwVersionReceives the version number. Pointer to a DWORD. The DirectXSetupGetVersion function will fill the DWORD with the version number. If this parameter is NULL, it is ignored.
lpdwMinorVersionReceives the revision number. Pointer to a DWORD. The DirectXSetupGetVersion function will fill the DWORD with the revision number. If this parameter is NULL, it is ignored.
Returns
If this function is successful, it returns non-zero.
If it is not successful, it returns zero.
Remarks
The DirectXSetupGetVersion function can be used to retrieve the version and revision numbers before or after the DirectXSetup function is called. If it is called before the DirectXSetup function is invoked, it gives the version and revision numbers of the DirectX components that are currently installed. If it is called after the DirectXSetup function is called, but before the computer has been rebooted, it will give the version and revision numbers of the DirectX components that will take effect after the computer is restarted.
The version number in the pdwVersion parameter is composed of the major version number and the minor version number. The major version number will be in the 16 most significant bits of the DWORD when this function returns. The minor version number will be in the 16 least significant bits of the DWORD when this function returns. The version numbers can be interpreted as 0x0x0004000(DirectX version number), so DirectX 1 would be 0x00040001 and so forth.
The version number in the pdwRevision parameter is composed of the release number and the build number. The release number will be in the 16 most significant bits of the DWORD when this function returns. The build number will be in the 16 least significant bits of the DWORD when this function returns.
Version and revision numbers can concatenated into a 64 bit quantity for comparison. The version number should be in the 32 most significant bits and the revision number should be in the 32 least significant bits.
See also
DirectXSetup

◆ DirectXSetupW()

INT WINAPI DirectXSetupW ( HWND  hWnd,
LPWSTR  lpszRootPath,
DWORD  dwFlags 
)

Installs one or more DirectX components. (Unicode only)

Parameters
hWndHandle to the parent window for the setup dialog boxes.
lpszRootPathPointer 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 Dsetup.dll32. This directory is typically Redist. If you are certain the current directory contains Dsetup.dll and the Directx directory, this parameter can be NULL.
dwFlagsOne or more flags indicating which DirectX components should be installed. A full installation (DSETUP_DIRECTX) is recommended. See DirectX Setup Flags .
Returns
If this function is successful, it returns SUCCESS.
If it is not successful, it returns an error code. For a list of possible return codes, see DirectX Setup Error Codes .
Remarks
According to official docs, "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."

◆ DirectXUnRegisterApplication()

INT WINAPI DirectXUnRegisterApplication ( HWND  hWnd,
LPGUID  lpGUID 
)

Deletes the registration of an application designed to work with DirectPlayLobby.

Parameters
hWndHandle to the parent window. Set this to NULL if the desktop is the parent window.
lpGUIDPointer to a GUID that represents the DirectPlay application to be unregistered.
Returns
If the function succeeds, the return value is TRUE meaning that the registration is successfully deleted.
If the function fails, the return value is FALSE.
Remarks
The DirectXUnRegisterApplication function removes registry the entries needed for an application to work with DirectPlayLobby. An uninstall program should only use DirectXUnRegisterApplication if it used DirectXRegisterApplication when the application was installed.
See also
DirectXRegisterApplication