DirectX SDK

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 in 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 prerelease beta version of the Microsoft® Windows® 95 operating system was detected. The DirectX component or device driver cannot 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 cannot be installed on versions of the Microsoft® Windows NT® operating system prior to version 4.0.
DSETUP_CB_MSG_CANTINSTALL_UNKNOWNOS
The operating system is unknown. The DirectX component or device driver cannot 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_FILECOPYERROR
Setup of the DirectX component or device driver file has failed during the copy process.
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 cannot be installed on the version of Windows NT or Microsoft® Windows® 2000 in use.
DSETUP_CB_MSG_OUTOFDISKSPACE
Setup of the DirectX component has failed due to lack of disk space.
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
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
Localized character string containing error or status messages that can be displayed in a dialog box created with the MessageBox function.
szName
NULL unless the Reason parameter is DSETUP_CB_MSG_CHECK_DRIVER_UPGRADE. In that case, szName contains the name of the driver to be upgraded.
pInfo
Address of a structure containing upgrade information. When Reason is DSETUP_CB_MSG_CHECK_DRIVER_UPGRADE, the setup program is 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 0, the DirectXSetup function performs the default action for upgrade of the DirectX component or driver.

Remarks

The name of 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 0, the setup program can display status information, but it should not wait for user input. In this case, the function returns IDOK.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: 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