DirectX 5 Redocumentation
A redocumentation of DirectX 5, brought to you by a bunch of Infomaniacs.
dsetup.h
Go to the documentation of this file.
1/*==========================================================================
2 *
3 * Copyright (C) 1995-1997 Microsoft Corporation. All Rights Reserved.
4 *
5 * File: dsetup.h
6 * Content: DirectXSetup, error codes and flags
7 ***************************************************************************/
8
9#ifndef __DSETUP_H__
10#define __DSETUP_H__
11
12#include <windows.h> // windows stuff
13
14#ifdef _WIN32
15#define COM_NO_WINDOWS_H
16#include <objbase.h>
17#else
18#endif
19
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
29#define DSETUPERR_SUCCESS_RESTART 1
30#define DSETUPERR_SUCCESS 0
31#define DSETUPERR_BADWINDOWSVERSION -1
32#define DSETUPERR_SOURCEFILENOTFOUND -2
33#define DSETUPERR_BADSOURCESIZE -3
34#define DSETUPERR_BADSOURCETIME -4
35#define DSETUPERR_NOCOPY -5
36#define DSETUPERR_OUTOFDISKSPACE -6
37#define DSETUPERR_CANTFINDINF -7
38#define DSETUPERR_CANTFINDDIR -8
39#define DSETUPERR_INTERNAL -9
41#define DSETUPERR_NTWITHNO3D -10
42#define DSETUPERR_UNKNOWNOS -11
43#define DSETUPERR_USERHITCANCEL -12
44#define DSETUPERR_NOTPREINSTALLEDONNT -13
46
51#define DSETUP_DDRAWDRV 0x00000008
52#define DSETUP_DSOUNDDRV 0x00000010
53#define DSETUP_DXCORE 0x00010000
54#define DSETUP_DIRECTX (DSETUP_DXCORE|DSETUP_DDRAWDRV|DSETUP_DSOUNDDRV)
55#define DSETUP_TESTINSTALL 0x00020000
57
65// TODO: In the official doc, all of these say DX3 programs that use this will install all DX components. Does this mean doing one of these will necessitate installing all DX components?
66#define DSETUP_DDRAW 0x00000001
67#define DSETUP_DSOUND 0x00000002
68#define DSETUP_DPLAY 0x00000004
69#define DSETUP_DPLAYSP 0x00000020
70#define DSETUP_DVIDEO 0x00000040
71#define DSETUP_D3D 0x00000200
72#define DSETUP_DINPUT 0x00000800
73#define DSETUP_DIRECTXSETUP 0x00001000
74#define DSETUP_NOUI 0x00002000
75#define DSETUP_PROMPTFORDRIVERS 0x10000000
76#define DSETUP_RESTOREDRIVERS 0x20000000
78
79
80
81//******************************************************************
82// DirectX Setup Callback mechanism
83//******************************************************************
84
89#define DSETUP_CB_MSG_NOMESSAGE 0
90#define DSETUP_CB_MSG_CANTINSTALL_UNKNOWNOS 1
91#define DSETUP_CB_MSG_CANTINSTALL_NT 2
92#define DSETUP_CB_MSG_CANTINSTALL_BETA 3
93#define DSETUP_CB_MSG_CANTINSTALL_NOTWIN32 4
94#define DSETUP_CB_MSG_CANTINSTALL_WRONGLANGUAGE 5
95#define DSETUP_CB_MSG_CANTINSTALL_WRONGPLATFORM 6
96#define DSETUP_CB_MSG_PREINSTALL_NT 7
97#define DSETUP_CB_MSG_NOTPREINSTALLEDONNT 8
98#define DSETUP_CB_MSG_SETUP_INIT_FAILED 9
99#define DSETUP_CB_MSG_INTERNAL_ERROR 10
100#define DSETUP_CB_MSG_CHECK_DRIVER_UPGRADE 11
102#define DSETUP_CB_MSG_OUTOFDISKSPACE 12
103#define DSETUP_CB_MSG_BEGIN_INSTALL 13
104#define DSETUP_CB_MSG_BEGIN_INSTALL_RUNTIME 14
105#define DSETUP_CB_MSG_BEGIN_INSTALL_DRIVERS 15
106#define DSETUP_CB_MSG_BEGIN_RESTORE_DRIVERS 16
108#define DSETUP_CB_MSG_FILECOPYERROR 17
110
111
117#define DSETUP_CB_UPGRADE_TYPE_MASK 0x000F
119#define DSETUP_CB_UPGRADE_UNNECESSARY 0x000F
120#define DSETUP_CB_UPGRADE_KEEP 0x0001
121#define DSETUP_CB_UPGRADE_SAFE 0x0002
122#define DSETUP_CB_UPGRADE_FORCE 0x0004
123#define DSETUP_CB_UPGRADE_UNKNOWN 0x0008
124
125#define DSETUP_CB_UPGRADE_HASWARNINGS 0x0100
126#define DSETUP_CB_UPGRADE_CANTBACKUP 0x0200
127
128#define DSETUP_CB_UPGRADE_DEVICE_ACTIVE 0x0800
129
130#define DSETUP_CB_UPGRADE_DEVICE_DISPLAY 0x1000
131#define DSETUP_CB_UPGRADE_DEVICE_MEDIA 0x2000
133
137{
140
144{
147
148
149//
150// Data Structures
151//
153typedef struct _DIRECTXREGISTERAPPA {
161 LPGUID lpGUID;
167 LPSTR lpszPath;
171
173typedef struct _DIRECTXREGISTERAPPW {
177 LPGUID lpGUID;
180 LPWSTR lpszPath;
183
190#endif // UNICODE
191
192
193//
194// API
195//
197INT
198WINAPI
200 HWND hWnd,
201 LPSTR lpszRootPath,
206 );
208INT
209WINAPI
211 HWND hWnd,
212 LPWSTR lpszRootPath,
217 );
218
220#define DirectXSetup DirectXSetupW
222#define DirectXSetup DirectXSetupA
223
224INT
225WINAPI
227 HWND hWnd,
228 LPSTR lpszDriverClass,
229 LPSTR lpszDriverPath,
231 );
232
233INT
234WINAPI
236 HWND hWnd,
237 LPWSTR lpszDriverClass,
238 LPWSTR lpszDriverPath,
240 );
242#define DirectXDeviceDriverSetup DirectXDeviceDriverSetupW
244#define DirectXDeviceDriverSetup DirectXDeviceDriverSetupA
245
246
248INT
249WINAPI
251 HWND hWnd,
252 LPDIRECTXREGISTERAPPA lpDXRegApp
259 );
261INT
262WINAPI
264 HWND hWnd,
265 LPDIRECTXREGISTERAPPA lpDXRegApp
272 );
273
275#define DirectXRegisterApplication DirectXRegisterApplicationW
277#define DirectXRegisterApplication DirectXRegisterApplicationA
278
280INT
281WINAPI
283 HWND hWnd,
284 LPGUID lpGUID
289 );
290
291//
292// Function Pointers
293//
294typedef INT (WINAPI * LPDIRECTXSETUP)(HWND, LPWSTR, DWORD);
295typedef INT (WINAPI * LPDIRECTXDEVICEDRIVERSETUP)(HWND, LPWSTR, LPSTR, DWORD);
297typedef INT (WINAPI * LPDIRECTXSETUP)(HWND, LPSTR, DWORD);
298typedef INT (WINAPI * LPDIRECTXDEVICEDRIVERSETUP)(HWND, LPSTR, LPSTR, DWORD);
299typedef INT (WINAPI * LPDIRECTXREGISTERAPPLICATION)(HWND, LPDIRECTXREGISTERAPPA);
300#endif
301
302// Microsoft did this in the header file for DirectXSetupCallbackFunction - it is a placeholder after all.
303// typedef DWORD (FAR PASCAL * DSETUP_CALLBACK)(DWORD Reason,
304// DWORD MsgType, /*! Same as flags to MessageBox */
305// LPSTR szMessage,
306// LPSTR szName,
307// void *pInfo);
308
309// Here is the reconstructed thing. In the docs LPSTR is shown as char*, but its the same thing
310
314 DWORD Reason,
315 DWORD MsgType,
316 LPSTR *szMessage,
317 LPSTR *szName,
318 void *pInfo
323)
324
325
332INT WINAPI DirectXSetupSetCallback(DSETUP_CALLBACK Callback);
333
344INT WINAPI DirectXSetupGetVersion(DWORD *lpdwVersion, DWORD *lpdwMinorVersion);
345
346
347#ifdef __cplusplus
348};
349#endif
350
351#endif
typedef DWORD(FAR PASCAL *LPCLIPPERCALLBACK)(LPDIRECTDRAWCLIPPER lpDDClipper
HWND hWnd
Definition: ddraw.h:423
LPDWORD DWORD dwFlags
Definition: dplay.h:417
struct _DIRECTXREGISTERAPPA * LPDIRECTXREGISTERAPPA
struct _DIRECTXREGISTERAPPW * LPDIRECTXREGISTERAPPW
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.
struct _DSETUP_CB_FILECOPYERROR DSETUP_CB_FILECOPYERROR
Undocumented, but in the headerfile. Probably a structure passed as a callback to the DirectXSetupCal...
INT WINAPI DirectXDeviceDriverSetupW(HWND hWnd, LPWSTR lpszDriverClass, LPWSTR lpszDriverPath, DWORD dwFlags)
INT(WINAPI * LPDIRECTXDEVICEDRIVERSETUP)(HWND, LPWSTR, LPSTR, DWORD)
Definition: dsetup.h:295
struct _DIRECTXREGISTERAPPA * PDIRECTXREGISTERAPPA
INT WINAPI DirectXUnRegisterApplication(HWND hWnd, LPGUID lpGUID)
Deletes the registration of an application designed to work with DirectPlayLobby.
DIRECTXREGISTERAPPW DIRECTXREGISTERAPP
Definition: dsetup.h:184
INT WINAPI DirectXSetupW(HWND hWnd, LPWSTR lpszRootPath, DWORD dwFlags)
Installs one or more DirectX components. (Unicode only)
struct _DIRECTXREGISTERAPPW DIRECTXREGISTERAPPW
Contains the registry entries needed for applications designed to work with DirectPlayLobby....
INT WINAPI DirectXSetupA(HWND hWnd, LPSTR lpszRootPath, DWORD dwFlags)
Installs one or more DirectX components. (ANSI only)
INT WINAPI DirectXRegisterApplicationA(HWND hWnd, LPDIRECTXREGISTERAPPA lpDXRegApp)
Registers an application as one designed to work with DirectPlayLobby. (ANSI only)
INT WINAPI DirectXDeviceDriverSetupA(HWND hWnd, LPSTR lpszDriverClass, LPSTR lpszDriverPath, DWORD dwFlags)
struct _DIRECTXREGISTERAPPA DIRECTXREGISTERAPPA
Contains the registry entries needed for applications designed to work with DirectPlayLobby....
struct _DIRECTXREGISTERAPPW * PDIRECTXREGISTERAPPW
PDIRECTXREGISTERAPPW PDIRECTXREGISTERAPP
Definition: dsetup.h:185
LPDIRECTXREGISTERAPPW LPDIRECTXREGISTERAPP
Definition: dsetup.h:186
INT WINAPI DirectXRegisterApplicationW(HWND hWnd, LPDIRECTXREGISTERAPPA lpDXRegApp)
Registers an application as one designed to work with DirectPlayLobby. (Unicode only)
struct _DSETUP_CB_UPGRADEINFO DSETUP_CB_UPGRADEINFO
Structure passed as a parameter to the DirectXSetupCallbackFunction.
INT(WINAPI * LPDIRECTXREGISTERAPPLICATION)(HWND, LPDIRECTXREGISTERAPPW)
Definition: dsetup.h:296
INT WINAPI DirectXSetupGetVersion(DWORD *lpdwVersion, DWORD *lpdwMinorVersion)
Retrieves the version number of the DirectX components that are currently installed.
INT(WINAPI * LPDIRECTXSETUP)(HWND, LPWSTR, DWORD)
Definition: dsetup.h:294
Contains the registry entries needed for applications designed to work with DirectPlayLobby....
Definition: dsetup.h:153
LPSTR lpszFilename
Definition: dsetup.h:163
LPSTR lpszPath
Definition: dsetup.h:167
DWORD dwFlags
Definition: dsetup.h:157
LPSTR lpszApplicationName
Definition: dsetup.h:159
LPGUID lpGUID
Definition: dsetup.h:161
LPSTR lpszCommandLine
Definition: dsetup.h:165
DWORD dwSize
Definition: dsetup.h:155
LPSTR lpszCurrentDirectory
Current directory. This is typically the same as lpszPath.
Definition: dsetup.h:169
Contains the registry entries needed for applications designed to work with DirectPlayLobby....
Definition: dsetup.h:173
LPWSTR lpszFilename
Name of the executable file to be called.
Definition: dsetup.h:178
LPWSTR lpszCurrentDirectory
Current directory. This is typically the same as lpszPath.
Definition: dsetup.h:181
LPWSTR lpszPath
Path of the executable file.
Definition: dsetup.h:180
LPWSTR lpszApplicationName
Name of the application.
Definition: dsetup.h:176
LPGUID lpGUID
Globally unique identifier (GUID) of the application.
Definition: dsetup.h:177
LPWSTR lpszCommandLine
Command-line arguments for the executable file.
Definition: dsetup.h:179
DWORD dwSize
Size of the structure. Must be initialized to the size of the DirectXRegisterAppW structure.
Definition: dsetup.h:174
DWORD dwFlags
Reserved for future use.
Definition: dsetup.h:175
Undocumented, but in the headerfile. Probably a structure passed as a callback to the DirectXSetupCal...
Definition: dsetup.h:144
DWORD dwError
Probably solely for DSETUP_CB_MSG_FILECOPYERROR .
Definition: dsetup.h:145
Structure passed as a parameter to the DirectXSetupCallbackFunction.
Definition: dsetup.h:137
DWORD UpgradeFlags
A flag indicating the status of the upgrade. Can be any of the flags in DirectX Setup Callback Upgrad...
Definition: dsetup.h:138