RetroArch
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 __cplusplus
15 extern "C" {
16 #endif
17 
18 #define FOURCC_VERS mmioFOURCC('v','e','r','s')
19 
20 // DSETUP Error Codes, must remain compatible with previous setup.
21 #define DSETUPERR_SUCCESS_RESTART 1
22 #define DSETUPERR_SUCCESS 0
23 #define DSETUPERR_BADWINDOWSVERSION -1
24 #define DSETUPERR_SOURCEFILENOTFOUND -2
25 #define DSETUPERR_NOCOPY -5
26 #define DSETUPERR_OUTOFDISKSPACE -6
27 #define DSETUPERR_CANTFINDINF -7
28 #define DSETUPERR_CANTFINDDIR -8
29 #define DSETUPERR_INTERNAL -9
30 #define DSETUPERR_UNKNOWNOS -11
31 #define DSETUPERR_NEWERVERSION -14
32 #define DSETUPERR_NOTADMIN -15
33 #define DSETUPERR_UNSUPPORTEDPROCESSOR -16
34 #define DSETUPERR_MISSINGCAB_MANAGEDDX -17
35 #define DSETUPERR_NODOTNETFRAMEWORKINSTALLED -18
36 #define DSETUPERR_CABDOWNLOADFAIL -19
37 #define DSETUPERR_DXCOMPONENTFILEINUSE -20
38 #define DSETUPERR_UNTRUSTEDCABINETFILE -21
39 
40 // DSETUP flags. DirectX 5.0 apps should use these flags only.
41 #define DSETUP_DDRAWDRV 0x00000008 /* install DirectDraw Drivers */
42 #define DSETUP_DSOUNDDRV 0x00000010 /* install DirectSound Drivers */
43 #define DSETUP_DXCORE 0x00010000 /* install DirectX runtime */
44 #define DSETUP_DIRECTX (DSETUP_DXCORE|DSETUP_DDRAWDRV|DSETUP_DSOUNDDRV)
45 #define DSETUP_MANAGEDDX 0x00004000 /* OBSOLETE. install managed DirectX */
46 #define DSETUP_TESTINSTALL 0x00020000 /* just test install, don't do anything */
47 
48 // These OBSOLETE flags are here for compatibility with pre-DX5 apps only.
49 // They are present to allow DX3 apps to be recompiled with DX5 and still work.
50 // DO NOT USE THEM for DX5. They will go away in future DX releases.
51 #define DSETUP_DDRAW 0x00000001 /* OBSOLETE. install DirectDraw */
52 #define DSETUP_DSOUND 0x00000002 /* OBSOLETE. install DirectSound */
53 #define DSETUP_DPLAY 0x00000004 /* OBSOLETE. install DirectPlay */
54 #define DSETUP_DPLAYSP 0x00000020 /* OBSOLETE. install DirectPlay Providers */
55 #define DSETUP_DVIDEO 0x00000040 /* OBSOLETE. install DirectVideo */
56 #define DSETUP_D3D 0x00000200 /* OBSOLETE. install Direct3D */
57 #define DSETUP_DINPUT 0x00000800 /* OBSOLETE. install DirectInput */
58 #define DSETUP_DIRECTXSETUP 0x00001000 /* OBSOLETE. install DirectXSetup DLL's */
59 #define DSETUP_NOUI 0x00002000 /* OBSOLETE. install DirectX with NO UI */
60 #define DSETUP_PROMPTFORDRIVERS 0x10000000 /* OBSOLETE. prompt when replacing display/audio drivers */
61 #define DSETUP_RESTOREDRIVERS 0x20000000 /* OBSOLETE. restore display/audio drivers */
62 
63 
64 
65 //******************************************************************
66 // DirectX Setup Callback mechanism
67 //******************************************************************
68 
69 // DSETUP Message Info Codes, passed to callback as Reason parameter.
70 #define DSETUP_CB_MSG_NOMESSAGE 0
71 #define DSETUP_CB_MSG_INTERNAL_ERROR 10
72 #define DSETUP_CB_MSG_BEGIN_INSTALL 13
73 #define DSETUP_CB_MSG_BEGIN_INSTALL_RUNTIME 14
74 #define DSETUP_CB_MSG_PROGRESS 18
75 #define DSETUP_CB_MSG_WARNING_DISABLED_COMPONENT 19
76 
77 
78 
79 
80 
81 
82 typedef struct _DSETUP_CB_PROGRESS
83 {
84  DWORD dwPhase;
90 
91 
93 {
98 };
99 
100 
101 #ifdef _WIN32
102 //
103 // Data Structures
104 //
105 #ifndef UNICODE_ONLY
106 
107 typedef struct _DIRECTXREGISTERAPPA {
108  DWORD dwSize;
109  DWORD dwFlags;
110  LPSTR lpszApplicationName;
111  LPGUID lpGUID;
112  LPSTR lpszFilename;
113  LPSTR lpszCommandLine;
114  LPSTR lpszPath;
115  LPSTR lpszCurrentDirectory;
116 } DIRECTXREGISTERAPPA, *PDIRECTXREGISTERAPPA, *LPDIRECTXREGISTERAPPA;
117 
118 typedef struct _DIRECTXREGISTERAPP2A {
119  DWORD dwSize;
120  DWORD dwFlags;
121  LPSTR lpszApplicationName;
122  LPGUID lpGUID;
123  LPSTR lpszFilename;
124  LPSTR lpszCommandLine;
125  LPSTR lpszPath;
126  LPSTR lpszCurrentDirectory;
127  LPSTR lpszLauncherName;
128 } DIRECTXREGISTERAPP2A, *PDIRECTXREGISTERAPP2A, *LPDIRECTXREGISTERAPP2A;
129 
130 #endif
131 #ifndef ANSI_ONLY
132 
133 typedef struct _DIRECTXREGISTERAPPW {
134  DWORD dwSize;
135  DWORD dwFlags;
136  LPWSTR lpszApplicationName;
137  LPGUID lpGUID;
138  LPWSTR lpszFilename;
139  LPWSTR lpszCommandLine;
140  LPWSTR lpszPath;
141  LPWSTR lpszCurrentDirectory;
142 } DIRECTXREGISTERAPPW, *PDIRECTXREGISTERAPPW, *LPDIRECTXREGISTERAPPW;
143 
144 typedef struct _DIRECTXREGISTERAPP2W {
145  DWORD dwSize;
146  DWORD dwFlags;
147  LPWSTR lpszApplicationName;
148  LPGUID lpGUID;
149  LPWSTR lpszFilename;
150  LPWSTR lpszCommandLine;
151  LPWSTR lpszPath;
152  LPWSTR lpszCurrentDirectory;
153  LPWSTR lpszLauncherName;
154 } DIRECTXREGISTERAPP2W, *PDIRECTXREGISTERAPP2W, *LPDIRECTXREGISTERAPP2W;
155 #endif
156 #ifdef UNICODE
157 typedef DIRECTXREGISTERAPPW DIRECTXREGISTERAPP;
158 typedef PDIRECTXREGISTERAPPW PDIRECTXREGISTERAPP;
159 typedef LPDIRECTXREGISTERAPPW LPDIRECTXREGISTERAPP;
160 typedef DIRECTXREGISTERAPP2W DIRECTXREGISTERAPP2;
161 typedef PDIRECTXREGISTERAPP2W PDIRECTXREGISTERAPP2;
162 typedef LPDIRECTXREGISTERAPP2W LPDIRECTXREGISTERAPP2;
163 #else
164 typedef DIRECTXREGISTERAPPA DIRECTXREGISTERAPP;
165 typedef PDIRECTXREGISTERAPPA PDIRECTXREGISTERAPP;
166 typedef LPDIRECTXREGISTERAPPA LPDIRECTXREGISTERAPP;
167 typedef DIRECTXREGISTERAPP2A DIRECTXREGISTERAPP2;
168 typedef PDIRECTXREGISTERAPP2A PDIRECTXREGISTERAPP2;
169 typedef LPDIRECTXREGISTERAPP2A LPDIRECTXREGISTERAPP2;
170 #endif // UNICODE
171 
172 
173 //
174 // API
175 //
176 
177 #ifndef UNICODE_ONLY
178 INT
179 WINAPI
180 DirectXSetupA(
181  HWND hWnd,
182  __in_opt LPSTR lpszRootPath,
183  DWORD dwFlags
184  );
185 #endif
186 #ifndef ANSI_ONLY
187 INT
188 WINAPI
189 DirectXSetupW(
190  HWND hWnd,
191  __in_opt LPWSTR lpszRootPath,
192  DWORD dwFlags
193  );
194 #endif
195 #ifdef UNICODE
196 #define DirectXSetup DirectXSetupW
197 #else
198 #define DirectXSetup DirectXSetupA
199 #endif // !UNICODE
200 
201 #ifndef UNICODE_ONLY
202 INT
203 WINAPI
204 DirectXRegisterApplicationA(
205  HWND hWnd,
206  LPVOID lpDXRegApp
207  );
208 #endif
209 #ifndef ANSI_ONLY
210 INT
211 WINAPI
212 DirectXRegisterApplicationW(
213  HWND hWnd,
214  LPVOID lpDXRegApp
215  );
216 #endif
217 #ifdef UNICODE
218 #define DirectXRegisterApplication DirectXRegisterApplicationW
219 #else
220 #define DirectXRegisterApplication DirectXRegisterApplicationA
221 #endif // !UNICODE
222 
223 INT
224 WINAPI
225 DirectXUnRegisterApplication(
226  HWND hWnd,
227  LPGUID lpGUID
228  );
229 
230 //
231 // Function Pointers
232 //
233 #ifdef UNICODE
234 typedef INT (WINAPI * LPDIRECTXSETUP)(HWND, LPWSTR, DWORD);
235 typedef INT (WINAPI * LPDIRECTXREGISTERAPPLICATION)(HWND, LPVOID);
236 #else
237 typedef INT (WINAPI * LPDIRECTXSETUP)(HWND, LPSTR, DWORD);
238 typedef INT (WINAPI * LPDIRECTXREGISTERAPPLICATION)(HWND, LPVOID);
239 #endif // UNICODE
240 
241 typedef DWORD (FAR PASCAL * DSETUP_CALLBACK)(DWORD Reason,
242  DWORD MsgType, /* Same as flags to MessageBox */
243  LPSTR szMessage,
244  LPSTR szName,
245  void *pInfo);
246 
247 INT WINAPI DirectXSetupSetCallback(DSETUP_CALLBACK Callback);
248 INT WINAPI DirectXSetupGetVersion(DWORD *lpdwVersion, DWORD *lpdwMinorVersion);
249 INT WINAPI DirectXSetupShowEULA(HWND hWndParent);
250 #ifndef UNICODE_ONLY
251 UINT
252 WINAPI
253 DirectXSetupGetEULAA(
254  __out_ecount(cchEULA) LPSTR lpszEULA,
255  UINT cchEULA,
256  WORD LangID
257  );
258 #endif
259 #ifndef ANSI_ONLY
260 UINT
261 WINAPI
262 DirectXSetupGetEULAW(
263  __out_ecount(cchEULA) LPWSTR lpszEULA,
264  UINT cchEULA,
265  WORD LangID
266  );
267 #endif
268 #ifdef UNICODE
269 #define DirectXSetupGetEULA DirectXSetupGetEULAW
270 typedef UINT (WINAPI * LPDIRECTXSETUPGETEULA)(LPWSTR, UINT, WORD);
271 #else
272 #define DirectXSetupGetEULA DirectXSetupGetEULAA
273 typedef UINT (WINAPI * LPDIRECTXSETUPGETEULA)(LPSTR, UINT, WORD);
274 #endif // !UNICODE
275 
276 #endif // WIN32
277 
278 
279 #ifdef __cplusplus
280 };
281 #endif
282 
283 #endif
DWORD dwOverallMaximum
Definition: dsetup.h:87
DWORD dwInPhaseMaximum
Definition: dsetup.h:85
Definition: dsetup.h:96
__out_ecount(4) FLOAT *WINAPI D3DXSHMultiply2(__out_ecount(4) FLOAT *pOut
Definition: dsetup.h:82
DWORD dwPhase
Definition: dsetup.h:84
DWORD dwOverallProgress
Definition: dsetup.h:88
_DSETUP_CB_PROGRESS_PHASE
Definition: dsetup.h:92
Definition: dsetup.h:97
DWORD dwInPhaseProgress
Definition: dsetup.h:86
Definition: dsetup.h:94
Definition: dsetup.h:95
Definition: glslang_tab.cpp:135
Definition: glslang_tab.cpp:136
#define FAR
Definition: zconf.h:327
struct _DSETUP_CB_PROGRESS DSETUP_CB_PROGRESS