DirectXSetupCallbackFunction
DirectXSetupCallbackFunction is a placeholder name for an optional callback function supplied by the setup program. If present, it is called once for each step of the setup process.
DWORD DirectXSetupCallbackFunction(
DWORD Reason,
DWORD MsgType,
char *szMessage,
char *szName,
void *pInfo
);
Parameters
- Reason
- Reason for the callback. It can be one of the following values:
- DSETUP_CB_MSG_BEGIN_INSTALL
- DirectXSetup is about to begin installing DirectX components and device drivers.
- DSETUP_CB_MSG_BEGIN_INSTALL_DRIVERS
- DirectXSetup is about to begin installing device drivers.
- DSETUP_CB_MSG_BEGIN_INSTALL_RUNTIME
- DirectXSetup is about to begin installing DirectX components.
- DSETUP_CB_MSG_BEGIN_RESTORE_DRIVERS
- DirectXSetup is about to begin restoring previous drivers.
- DSETUP_CB_MSG_CANTINSTALL_BETA
- A pre-release beta version of Windows 95 was detected. The DirectX component or device driver can't be installed.
- DSETUP_CB_MSG_CANTINSTALL_NOTWIN32
- The operating system detected is not a Windows 32-bit operating system. DirectX is not compatible with Windows 3.x.
- DSETUP_CB_MSG_CANTINSTALL_NT
- The DirectX component or device driver can't be installed on versions of Windows NT prior to version 4.0.
- DSETUP_CB_MSG_CANTINSTALL_UNKNOWNOS
- The operating system is unknown. The DirectX component or device driver can't be installed.
- DSETUP_CB_MSG_CANTINSTALL_WRONGLANGUAGE
- The DirectX component or device driver is not localized to the language being used by Windows.
- DSETUP_CB_MSG_CANTINSTALL_WRONGPLATFORM
- The DirectX component or device driver is for another type of computer.
- DSETUP_CB_MSG_CHECK_DRIVER_UPGRADE
- Driver is being considered for upgrade. Verification from user is recommended.
- DSETUP_CB_MSG_INTERNAL_ERROR
- An internal error has occurred. Setup of the DirectX component or device driver has failed.
- DSETUP_CB_MSG_NOMESSAGE
- No message to be displayed. The callback function should return.
- DSETUP_CB_MSG_NOTPREINSTALLEDONNT
- The DirectX component or device driver can't be installed on the version of Windows NT/Windows 2000 in use.
- DSETUP_CB_MSG_PREINSTALL_NT
- DirectX is already installed on the version of Windows NT/Windows 2000 in use.
- DSETUP_CB_MSG_SETUP_INIT_FAILED
- Setup of the DirectX component or device driver has failed.
- MsgType
- Contains flags that control the display of a message box. These flags can be passed to the MessageBox function. An exception is when MsgType is 0. In that case, the setup program can display status information but should not wait for input from the user.
- szMessage
- A localized character string containing error or status messages that can be displayed in a dialog box created with the MessageBox function.
- szName
- The 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.
- pInfo
- Pointer 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. In this case, pInfo points to a DSETUP_CB_UPGRADEINFO structure containing information about the upgrade.
Return Values
The return value should be the same as would be returned by the MessageBox function, with one exception. If this function returns zero, the DirectXSetup function 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. In this case the function should return IDOK.
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: User-defined.
See Also
MessageBox, DirectXSetupSetCallback, Customizing Setup