Subversion Repositories Games.Chess Giants

Rev

Details | Last modification | View Log | RSS feed

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