ReactOS 0.4.15-dev-7889-g76290a6
addons.c
Go to the documentation of this file.
1/*
2 * Copyright 2006-2010 Jacek Caban for CodeWeavers
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19#include "appwiz.h"
20
21#include <stdio.h>
22
23#ifdef HAVE_UNISTD_H
24# include <unistd.h>
25#endif
26
27#include <msi.h>
28
29#define GECKO_VERSION "2.40"
30
31#ifdef __i386__
32#define ARCH_STRING "x86"
33#define GECKO_SHA "8a3adedf3707973d1ed4ac3b2e791486abf814bd"
34#else
35#define ARCH_STRING ""
36#define GECKO_SHA "???"
37#endif
38
39typedef struct {
40 const char *version;
41 const char *file_name;
42 const char *sha;
43 const char *config_key;
44 const char *dir_config_key;
47
48static const addon_info_t addons_info[] = {
49 {
51 "wine_gecko-" GECKO_VERSION "-" ARCH_STRING ".msi",
53 "MSHTML",
54 "GeckoCabDir",
56 }
57};
58
59static const addon_info_t *addon;
60
64
65static WCHAR GeckoUrl[] = L"https://svn.reactos.org/amine/wine_gecko-2.40-x86.msi";
66
67/* SHA definitions are copied from advapi32. They aren't available in headers. */
68
69typedef struct {
75
77void WINAPI A_SHAUpdate(PSHA_CTX,const unsigned char*,UINT);
79
81{
82 const unsigned char *file_map;
84 ULONG sha[5];
85 char buf[2*sizeof(sha)+1];
87 DWORD size, i;
88
91 return FALSE;
92
94
97 if(!map)
98 return FALSE;
99
100 file_map = MapViewOfFile(map, FILE_MAP_READ, 0, 0, 0);
102 if(!file_map)
103 return FALSE;
104
105 A_SHAInit(&ctx);
106 A_SHAUpdate(&ctx, file_map, size);
107 A_SHAFinal(&ctx, sha);
108
109 UnmapViewOfFile(file_map);
110
111 for(i=0; i < sizeof(sha); i++)
112 sprintf(buf + i*2, "%02x", *((unsigned char*)sha+i));
113
114 if(strcmp(buf, addon->sha)) {
115 WARN("Got %s, expected %s\n", buf, addon->sha);
116 return FALSE;
117 }
118
119 return TRUE;
120}
121
122static void set_status(DWORD id)
123{
125 WCHAR buf[64];
126
127 LoadStringW(hApplet, id, buf, sizeof(buf)/sizeof(WCHAR));
129}
130
135};
136
138{
139 ULONG res;
140
142 if(res != ERROR_SUCCESS) {
143 ERR("MsiInstallProduct failed: %u\n", res);
144 return INSTALL_FAILED;
145 }
146
147 return INSTALL_OK;
148}
149
150static enum install_res install_from_unix_file(const char *dir, const char *subdir, const char *file_name)
151{
152 LPWSTR dos_file_name;
153 char *file_path;
154 int fd, len;
155 enum install_res ret;
156 UINT res;
157
158 len = strlen(dir);
160 if(!file_path)
161 return INSTALL_FAILED;
162
164 if(len && file_path[len-1] != '/' && file_path[len-1] != '\\')
165 file_path[len++] = '/';
166 if(*subdir) {
167 strcpy(file_path+len, subdir);
168 len += strlen(subdir);
169 file_path[len++] = '/';
170 }
172
174 if(fd == -1) {
175 TRACE("%s not found\n", debugstr_a(file_path));
177 return INSTALL_NEXT;
178 }
179
180 _close(fd);
181
182 WARN("Could not get wine_get_dos_file_name function, calling install_cab directly.\n");
183 res = MultiByteToWideChar( CP_ACP, 0, file_path, -1, 0, 0);
184 dos_file_name = heap_alloc (res*sizeof(WCHAR));
185 MultiByteToWideChar( CP_ACP, 0, file_path, -1, dos_file_name, res);
186
188
189 ret = install_file(dos_file_name);
190
191 heap_free(dos_file_name);
192 return ret;
193}
194
195static const CHAR mshtml_keyA[] =
196 {'S','o','f','t','w','a','r','e',
197 '\\','W','i','n','e',
198 '\\','M','S','H','T','M','L',0};
199
201{
202 char *package_dir;
204 enum install_res ret;
205
206 package_dir = heap_alloc(size + sizeof(addon->file_name));
207
208 res = RegGetValueA(HKEY_CURRENT_USER, mshtml_keyA, "GeckoCabDir", RRF_RT_ANY, &type, (PBYTE)package_dir, &size);
209 if(res == ERROR_MORE_DATA) {
210 package_dir = heap_realloc(package_dir, size + sizeof(addon->file_name));
211 res = RegGetValueA(HKEY_CURRENT_USER, mshtml_keyA, "GeckoCabDir", RRF_RT_ANY, &type, (PBYTE)package_dir, &size);
212 }
213
214 if(res != ERROR_SUCCESS || (type != REG_SZ && type != REG_EXPAND_SZ)) {
215 heap_free(package_dir);
216 return INSTALL_FAILED;
217 }
218
219 if (type == REG_EXPAND_SZ)
220 {
221 size = ExpandEnvironmentStringsA(package_dir, NULL, 0);
222 if (size)
223 {
224 char* buf = heap_alloc(size + sizeof(addon->file_name));
225 ExpandEnvironmentStringsA(package_dir, buf, size);
226 heap_free(package_dir);
227 package_dir = buf;
228 }
229 }
230
231 TRACE("Trying %s/%s\n", debugstr_a(package_dir), debugstr_a(addon->file_name));
232
233 ret = install_from_unix_file(package_dir, "", addon->file_name);
234
235 heap_free(package_dir);
236 return ret;
237}
238
240 REFIID riid, void **ppv)
241{
242 if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IBindStatusCallback, riid)) {
243 *ppv = iface;
244 return S_OK;
245 }
246
247 return E_INVALIDARG;
248}
249
251{
252 return 2;
253}
254
256{
257 return 1;
258}
259
262{
264
265 IBinding_AddRef(pib);
266
268 download_binding = pib;
270
271 return S_OK;
272}
273
275 LONG *pnPriority)
276{
277 return E_NOTIMPL;
278}
279
282{
283 return E_NOTIMPL;
284}
285
287 ULONG ulProgressMax, ULONG ulStatusCode, LPCWSTR szStatusText)
288{
290
291 if(ulProgressMax)
292 SendMessageW(progress, PBM_SETRANGE32, 0, ulProgressMax);
293 if(ulProgress)
294 SendMessageW(progress, PBM_SETPOS, ulProgress, 0);
295
296 return S_OK;
297}
298
300 HRESULT hresult, LPCWSTR szError)
301{
303 if(download_binding) {
304 IBinding_Release(download_binding);
306 }
308
309 if(FAILED(hresult)) {
310 if(hresult == E_ABORT)
311 TRACE("Binding aborted\n");
312 else
313 ERR("Binding failed %08x\n", hresult);
314 return S_OK;
315 }
316
318 return S_OK;
319}
320
322 DWORD* grfBINDF, BINDINFO* pbindinfo)
323{
324 return E_NOTIMPL;
325}
326
328 DWORD dwSize, FORMATETC* pformatetc, STGMEDIUM* pstgmed)
329{
330 ERR("\n");
331 return E_NOTIMPL;
332}
333
335 REFIID riid, IUnknown* punk)
336{
337 ERR("\n");
338 return E_NOTIMPL;
339}
340
341static const IBindStatusCallbackVtbl InstallCallbackVtbl = {
353};
354
356
358{
359 WCHAR message[256];
360 WCHAR tmp_dir[MAX_PATH], tmp_file[MAX_PATH];
361 HRESULT hres, hrCoInit;
362
364
365 GetTempPathW(sizeof(tmp_dir)/sizeof(WCHAR), tmp_dir);
366 GetTempFileNameW(tmp_dir, NULL, 0, tmp_file);
367
368 TRACE("using temp file %s\n", debugstr_w(tmp_file));
369
371 if(FAILED(hres)) {
372 if (LoadStringW(hApplet, IDS_DWL_FAILED, message, sizeof(message) / sizeof(WCHAR))) {
373 /* If the user aborted the download, DO NOT display the message box */
374 if (hres == E_ABORT) {
375 TRACE("Downloading of Gecko package aborted!\n");
376 } else {
378 }
379 }
380 ERR("URLDownloadToFile failed: %08x\n", hres);
381 } else {
382 if(sha_check(tmp_file)) {
383 install_file(tmp_file);
384 }else {
385 if(LoadStringW(hApplet, IDS_INVALID_SHA, message, sizeof(message)/sizeof(WCHAR))) {
387 }
388 }
389 }
390
391 DeleteFileW(tmp_file);
393
394 if (SUCCEEDED(hrCoInit))
396
397 return 0;
398}
399
401{
402 HWND hwndProgress, hwndInstallButton;
403 switch(msg) {
404 case WM_INITDIALOG:
405 hwndProgress = GetDlgItem(hwnd, ID_DWL_PROGRESS);
406
407 /* CORE-5737: Move focus before SW_HIDE */
408 if (hwndProgress == GetFocus())
410
411 ShowWindow(hwndProgress, SW_HIDE);
413 return TRUE;
414
415 case WM_NOTIFY:
416 break;
417
418 case WM_COMMAND:
419 switch(wParam) {
420 case IDCANCEL:
422 if(download_binding) {
423 IBinding_Abort(download_binding);
424 }
425 else {
426 EndDialog(hwnd, 0);
427 }
429 return FALSE;
430
431 case ID_DWL_INSTALL:
433
434 /* CORE-17550: Never leave focus on a disabled control (Old/New/Thing p.228) */
435 hwndInstallButton = GetDlgItem(hwnd, ID_DWL_INSTALL);
436 if (hwndInstallButton == GetFocus())
437 {
439 }
440 EnableWindow(hwndInstallButton, FALSE);
441
443 return FALSE;
444 }
445 }
446
447 return FALSE;
448}
449
451{
452
453 if(!*ARCH_STRING)
454 return FALSE;
455
456 addon = addons_info + addon_type;
457
459
460 /*
461 * Try to find addon .msi file in following order:
462 * - directory stored in $dir_config_key value of HKCU/Wine/Software/$config_key key
463 * - download the package
464 */
467
469
470 return TRUE;
471}
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
#define O_RDONLY
Definition: acwin.h:108
static enum install_res install_from_unix_file(const char *dir, const char *subdir, const char *file_name)
Definition: addons.c:150
static void set_status(DWORD id)
Definition: addons.c:122
static ULONG WINAPI InstallCallback_Release(IBindStatusCallback *iface)
Definition: addons.c:255
static INT_PTR CALLBACK installer_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: addons.c:400
static HRESULT WINAPI InstallCallback_OnStartBinding(IBindStatusCallback *iface, DWORD dwReserved, IBinding *pib)
Definition: addons.c:260
static HRESULT WINAPI InstallCallback_OnLowResource(IBindStatusCallback *iface, DWORD dwReserved)
Definition: addons.c:280
void WINAPI A_SHAInit(PSHA_CTX)
Definition: sha1.c:102
static IBinding * download_binding
Definition: addons.c:63
static const CHAR mshtml_keyA[]
Definition: addons.c:195
static HRESULT WINAPI InstallCallback_GetBindInfo(IBindStatusCallback *iface, DWORD *grfBINDF, BINDINFO *pbindinfo)
Definition: addons.c:321
static BOOL sha_check(const WCHAR *file_name)
Definition: addons.c:80
#define ARCH_STRING
Definition: addons.c:35
static HRESULT WINAPI InstallCallback_OnDataAvailable(IBindStatusCallback *iface, DWORD grfBSCF, DWORD dwSize, FORMATETC *pformatetc, STGMEDIUM *pstgmed)
Definition: addons.c:327
void WINAPI A_SHAUpdate(PSHA_CTX, const unsigned char *, UINT)
Definition: sha1.c:128
static CRITICAL_SECTION csLock
Definition: addons.c:62
static enum install_res install_from_registered_dir(void)
Definition: addons.c:200
#define GECKO_SHA
Definition: addons.c:36
static const IBindStatusCallbackVtbl InstallCallbackVtbl
Definition: addons.c:341
static HWND install_dialog
Definition: addons.c:61
static HRESULT WINAPI InstallCallback_OnProgress(IBindStatusCallback *iface, ULONG ulProgress, ULONG ulProgressMax, ULONG ulStatusCode, LPCWSTR szStatusText)
Definition: addons.c:286
static enum install_res install_file(const WCHAR *file_name)
Definition: addons.c:137
static HRESULT WINAPI InstallCallback_QueryInterface(IBindStatusCallback *iface, REFIID riid, void **ppv)
Definition: addons.c:239
static HRESULT WINAPI InstallCallback_GetPriority(IBindStatusCallback *iface, LONG *pnPriority)
Definition: addons.c:274
static DWORD WINAPI download_proc(PVOID arg)
Definition: addons.c:357
struct SHA_CTX * PSHA_CTX
static const addon_info_t addons_info[]
Definition: addons.c:48
static ULONG WINAPI InstallCallback_AddRef(IBindStatusCallback *iface)
Definition: addons.c:250
#define GECKO_VERSION
Definition: nsiface.idl:28
void WINAPI A_SHAFinal(PSHA_CTX, PULONG)
Definition: sha1.c:171
static WCHAR GeckoUrl[]
Definition: addons.c:65
static HRESULT WINAPI InstallCallback_OnObjectAvailable(IBindStatusCallback *iface, REFIID riid, IUnknown *punk)
Definition: addons.c:334
BOOL install_addon(addon_t addon_type, HWND hwnd_parent)
Definition: addons.c:450
static const addon_info_t * addon
Definition: addons.c:59
static HRESULT WINAPI InstallCallback_OnStopBinding(IBindStatusCallback *iface, HRESULT hresult, LPCWSTR szError)
Definition: addons.c:299
install_res
Definition: addons.c:131
@ INSTALL_OK
Definition: addons.c:132
@ INSTALL_NEXT
Definition: addons.c:134
@ INSTALL_FAILED
Definition: addons.c:133
unsigned int dir
Definition: maze.c:112
static void * heap_alloc(size_t len)
Definition: appwiz.h:66
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
static void * heap_realloc(void *mem, size_t len)
Definition: appwiz.h:71
addon_t
Definition: appwiz.h:57
#define msg(x)
Definition: auth_time.c:54
const GUID IID_IUnknown
#define WARN(fmt,...)
Definition: debug.h:112
#define ERR(fmt,...)
Definition: debug.h:110
cd_progress_ptr progress
Definition: cdjpeg.h:152
Definition: bufpool.h:45
Definition: _map.h:48
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
static HWND hwnd_parent
Definition: dce.c:36
#define ERROR_MORE_DATA
Definition: dderror.h:13
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_NOTIMPL
Definition: ddrawi.h:99
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
HINSTANCE hApplet
Definition: access.c:17
#define ID_DWL_PROGRESS
Definition: resource.h:47
#define ID_DWL_GECKO_DIALOG
Definition: resource.h:46
#define IDS_DOWNLOADING
Definition: resource.h:34
#define IDS_INSTALLING
Definition: resource.h:35
#define ID_DWL_INSTALL
Definition: resource.h:48
#define IDS_INVALID_SHA
Definition: resource.h:36
#define IDS_DWL_FAILED
Definition: resource.h:37
#define ID_DWL_STATUS
Definition: resource.h:49
LSTATUS WINAPI RegGetValueA(HKEY hKey, LPCSTR pszSubKey, LPCSTR pszValue, DWORD dwFlags, LPDWORD pdwType, PVOID pvData, LPDWORD pcbData)
Definition: reg.c:2037
static const WCHAR sha[]
Definition: oid.c:1218
#define CloseHandle
Definition: compat.h:739
#define PAGE_READONLY
Definition: compat.h:138
#define UnmapViewOfFile
Definition: compat.h:746
#define CP_ACP
Definition: compat.h:109
#define OPEN_EXISTING
Definition: compat.h:775
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define CreateFileMappingW(a, b, c, d, e, f)
Definition: compat.h:744
#define GENERIC_READ
Definition: compat.h:135
#define MAX_PATH
Definition: compat.h:34
#define CreateFileW
Definition: compat.h:741
#define FILE_MAP_READ
Definition: compat.h:776
#define CALLBACK
Definition: compat.h:35
#define MapViewOfFile
Definition: compat.h:745
#define MultiByteToWideChar
Definition: compat.h:110
DWORD WINAPI ExpandEnvironmentStringsA(IN LPCSTR lpSrc, IN LPSTR lpDst, IN DWORD nSize)
Definition: environ.c:399
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
Definition: delete.c:39
DWORD WINAPI GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh)
Definition: fileinfo.c:331
DWORD WINAPI GetTempPathW(IN DWORD count, OUT LPWSTR path)
Definition: path.c:2080
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
Definition: thread.c:137
UINT WINAPI MsiInstallProductW(LPCWSTR szPackagePath, LPCWSTR szCommandLine)
Definition: msi.c:230
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(LPVOID lpReserved, DWORD dwCoInit)
Definition: compobj.c:2002
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: compobj.c:2067
UINT WINAPI GetTempFileNameW(IN LPCWSTR lpPathName, IN LPCWSTR lpPrefixString, IN UINT uUnique, OUT LPWSTR lpTempFileName)
Definition: filename.c:84
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLsizeiptr size
Definition: glext.h:5919
GLuint res
Definition: glext.h:9613
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLenum GLsizei len
Definition: glext.h:6722
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
@ Unknown
Definition: i8042prt.h:114
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
#define debugstr_a
Definition: kernel32.h:31
#define debugstr_w
Definition: kernel32.h:32
#define REG_SZ
Definition: layer.c:22
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:56
#define sprintf(buf, format,...)
Definition: sprintf.c:55
HRESULT hres
Definition: protocol.c:465
static LPCWSTR file_name
Definition: protocol.c:147
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:95
unsigned int UINT
Definition: ndis.h:50
int Count
Definition: noreturn.cpp:7
#define FILE_ATTRIBUTE_READONLY
Definition: nt_native.h:702
#define REG_EXPAND_SZ
Definition: nt_native.h:1494
#define L(x)
Definition: ntvdm.h:50
@ COINIT_MULTITHREADED
Definition: objbase.h:279
BYTE * PBYTE
Definition: pedump.c:66
long LONG
Definition: pedump.c:60
#define PBM_SETRANGE32
Definition: commctrl.h:2188
#define PBM_SETPOS
Definition: commctrl.h:2184
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
#define WM_NOTIFY
Definition: richedit.h:61
_Check_return_opt_ _CRTIMP int __cdecl _close(_In_ int _FileHandle)
_CRTIMP int __cdecl _open(const char *_Filename, int _OpenFlag,...)
Definition: file.c:2001
static int fd
Definition: io.c:51
TCHAR file_path[MAX_PATH]
Definition: sndrec32.cpp:57
#define TRACE(s)
Definition: solgame.cpp:4
Definition: addons.c:69
const char * sha
Definition: addons.c:42
LPCWSTR dialog_template
Definition: addons.c:45
const char * file_name
Definition: addons.c:41
const char * dir_config_key
Definition: addons.c:44
const char * version
Definition: addons.c:40
const char * config_key
Definition: addons.c:43
Definition: fci.c:127
Definition: tftpd.h:60
Definition: ps.c:97
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
Definition: synch.c:751
int32_t INT_PTR
Definition: typedefs.h:64
uint32_t * PULONG
Definition: typedefs.h:59
uint32_t ULONG
Definition: typedefs.h:59
int ret
HRESULT WINAPI URLDownloadToFileW(LPUNKNOWN pCaller, LPCWSTR szURL, LPCWSTR szFileName, DWORD dwReserved, LPBINDSTATUSCALLBACK lpfnCB)
Definition: download.c:427
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208
UINT_PTR WPARAM
Definition: windef.h:207
#define WINAPI
Definition: msvc.h:6
#define E_ABORT
Definition: winerror.h:2366
#define HKEY_CURRENT_USER
Definition: winreg.h:11
#define RRF_RT_ANY
Definition: winreg.h:64
HWND WINAPI GetFocus(void)
Definition: window.c:1893
#define SW_HIDE
Definition: winuser.h:768
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define IDCANCEL
Definition: winuser.h:831
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
#define DialogBoxW(i, t, p, f)
Definition: winuser.h:4399
#define WM_COMMAND
Definition: winuser.h:1740
#define WM_INITDIALOG
Definition: winuser.h:1739
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define WM_NEXTDLGCTL
Definition: winuser.h:1643
#define MB_ICONERROR
Definition: winuser.h:787
#define WM_SETTEXT
Definition: winuser.h:1617
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
#define SW_SHOW
Definition: winuser.h:775
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
unsigned char UCHAR
Definition: xmlstorage.h:181
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
char CHAR
Definition: xmlstorage.h:175