?/TD>
Microsoft DirectX 9.0

DirectXSetupCallbackFunction Function


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.

Syntax

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 Microsoft?DirectX?components. The system will be checked for the DirectX version, operating system, system language, and disk space requirements.
DSETUP_CB_MSG_BEGIN_INSTALL_RUNTIME
DirectXSetup is about to begin installing DirectX components.
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_PROGRESS
Reporting the progress of the runtime installation, which includes initializing, extracting, copying, and finalizing DirectSetup files.
DSETUP_CB_MSG_WARNING_DISABLED_COMPONENT
DirectSetup has detected that one or more DirectX components are disabled.
MsgType
Flags that control the display of a message box. These flags can be passed as the uType parameter 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
Pointer to a localized character string containing error or status messages that can be displayed in a dialog box created with the MessageBox function.
szName
NULL and can be ignored.
pInfo
Pointer to the address of a structure containing upgrade information. When Reason is DSETUP_CB_MSG_PROGRESS, the setup program supplies the current state of installation. In this case, pInfo points to a DSETUP_CB_PROGRESS structure containing information about the phase of the installation.

Return Value

The return value should be the same as the value that 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.

If Reason is DSETUP_CB_MSG_WARNING_DISABLED_COMPONENT, direct the user to the DirectX Diagnostic Tool for more information about enabling DirectX components. It is typical for components such as Microsoft Direct3D?to be disabled on Microsoft Windows?servers.

Function Information

Headerdsetup.h
Import libraryNone
Minimum operating systems Windows 98

See Also

DirectXSetupSetCallback, Customizing Setup


© 2002 Microsoft Corporation. All rights reserved.