ReactOS 0.4.17-dev-573-g8315b8c
axinstall.c
Go to the documentation of this file.
1/*
2 * Copyright 2012 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#define OEMRESOURCE
20
21#include <assert.h>
22
23#include "urlmon_main.h"
24#include "resource.h"
25
26#include "advpub.h"
27#include "fdi.h"
28
29#include "wine/debug.h"
30
32
37};
38
39typedef struct {
46 const WCHAR *tmp_dir;
53
55{
56 if(ctx->uri)
57 IUri_Release(ctx->uri);
58 if(ctx->callback)
59 IBindStatusCallback_Release(ctx->callback);
60 free(ctx->install_file);
61 free(ctx);
62}
63
64static inline BOOL file_exists(const WCHAR *file_name)
65{
67}
68
69#ifdef __REACTOS__
70
71/* The following definitions were copied from dll/win32/advpack32/files.c */
72
73/* SESSION Operation */
74#define EXTRACT_FILLFILELIST 0x00000001
75#define EXTRACT_EXTRACTFILES 0x00000002
76
77struct FILELIST{
79 struct FILELIST *next;
81};
82
83typedef struct {
85 ERF Error;
86 struct FILELIST *FileList;
90 CHAR CurrentFile[MAX_PATH];
92 struct FILELIST *FilterList;
93} SESSION;
94
95static HRESULT (WINAPI *pExtract)(SESSION*, LPCSTR);
96
97
98/* The following functions were copied from dll/win32/advpack32/files.c
99 All unused arguments are removed */
100
101static void free_file_node(struct FILELIST *pNode)
102{
103 HeapFree(GetProcessHeap(), 0, pNode->FileName);
104 HeapFree(GetProcessHeap(), 0, pNode);
105}
106
107static void free_file_list(SESSION* session)
108{
109 struct FILELIST *next, *curr = session->FileList;
110
111 while (curr)
112 {
113 next = curr->next;
114 free_file_node(curr);
115 curr = next;
116 }
117}
118
119HRESULT WINAPI Modified_ExtractFilesA(LPCSTR CabName, LPCSTR ExpandDir)
120{
123 HRESULT res = S_OK;
124 LPSTR szConvertedList = NULL;
125
126 TRACE("(%s, %s)\n", debugstr_a(CabName), debugstr_a(ExpandDir));
127
128 if (!CabName || !ExpandDir)
129 return E_INVALIDARG;
130
133
134 hCabinet = LoadLibraryA("cabinet.dll");
135 if (!hCabinet)
136 return E_FAIL;
137
138 ZeroMemory(&session, sizeof(SESSION));
139
140 pExtract = (void *)GetProcAddress(hCabinet, "Extract");
141 if (!pExtract)
142 {
143 res = E_FAIL;
144 goto done;
145 }
146
147 lstrcpyA(session.Destination, ExpandDir);
148
150 res = pExtract(&session, CabName);
151
152done:
155 HeapFree(GetProcessHeap(), 0, szConvertedList);
156
157 return res;
158}
159
160static inline char *strdupWtoA(const WCHAR *str)
161{
162 char *ret = NULL;
163
164 if(str) {
166 ret = malloc(size);
167 if(ret)
169 }
170
171 return ret;
172}
173
174HRESULT WINAPI Modified_ExtractFilesW(LPCWSTR CabName, LPCWSTR ExpandDir)
175{
176 char *cab_name = NULL, *expand_dir = NULL;
177 HRESULT hres = S_OK;
178
179 TRACE("(%s, %s, %d)\n", debugstr_w(CabName), debugstr_w(ExpandDir));
180
181 if(CabName) {
182 cab_name = strdupWtoA(CabName);
183 if(!cab_name)
184 return E_OUTOFMEMORY;
185 }
186
187 if(ExpandDir) {
188 expand_dir = strdupWtoA(ExpandDir);
189 if(!expand_dir)
191 }
192
193 /* cabinet.dll, which does the real job of extracting files, doesn't have UNICODE API,
194 so we need W->A conversion at some point anyway. */
195 if(SUCCEEDED(hres))
196 hres = Modified_ExtractFilesA(cab_name, expand_dir);
197
198 free(cab_name);
199 free(expand_dir);
200 return hres;
201}
202
203#endif /* __REACTOS__ */
204
206{
207 size_t path_len, file_len;
208 WCHAR *ptr;
210
211#ifdef __REACTOS__
212 hres = Modified_ExtractFilesW(ctx->cache_file, ctx->tmp_dir);
213#else
214 hres = ExtractFilesW(ctx->cache_file, ctx->tmp_dir, 0, NULL, NULL, 0);
215#endif
216 if(FAILED(hres)) {
217 WARN("ExtractFilesW failed: %08lx\n", hres);
218 return hres;
219 }
220
221 path_len = lstrlenW(ctx->tmp_dir);
222 file_len = lstrlenW(ctx->file_name);
223 ctx->install_file = malloc((path_len + file_len + 2) * sizeof(WCHAR));
224 if(!ctx->install_file)
225 return E_OUTOFMEMORY;
226
227 memcpy(ctx->install_file, ctx->tmp_dir, path_len*sizeof(WCHAR));
228 ctx->install_file[path_len] = '\\';
229 memcpy(ctx->install_file+path_len+1, ctx->file_name, (file_len+1)*sizeof(WCHAR));
230
231 /* NOTE: Assume that file_name contains ".cab" extension */
232 ptr = ctx->install_file+path_len+1+file_len-3;
233
234 memcpy(ptr, L"inf", sizeof(L"inf"));
235 if(file_exists(ctx->install_file)) {
236 ctx->install_type = INSTALL_INF;
237 return S_OK;
238 }
239
240 memcpy(ptr, L"dll", sizeof(L"dll"));
241 if(file_exists(ctx->install_file)) {
242 ctx->install_type = INSTALL_DLL;
243 return S_OK;
244 }
245
246 memcpy(ptr, L"ocx", sizeof(L"ocx"));
247 if(file_exists(ctx->install_file)) {
248 ctx->install_type = INSTALL_DLL;
249 return S_OK;
250 }
251
252 FIXME("No known install file\n");
253 return E_NOTIMPL;
254}
255
257{
260
261 HRESULT (WINAPI *reg_func)(void);
262
263 module = LoadLibraryW(ctx->install_file);
264 if(!module)
265 return E_FAIL;
266
267 reg_func = (void*)GetProcAddress(module, "DllRegisterServer");
268 if(reg_func) {
269 hres = reg_func();
270 }else {
271 WARN("no DllRegisterServer function\n");
272 hres = E_FAIL;
273 }
274
276 return hres;
277}
278
279static void expand_command(install_ctx_t *ctx, const WCHAR *cmd, WCHAR *buf, size_t *size)
280{
281 const WCHAR *ptr = cmd, *prev_ptr = cmd;
282 size_t len = 0, len2;
283
284 static const WCHAR expand_dirW[] = {'%','E','X','T','R','A','C','T','_','D','I','R','%'};
285
286 while((ptr = wcschr(ptr, '%'))) {
287 if(buf)
288 memcpy(buf+len, prev_ptr, ptr-prev_ptr);
289 len += ptr-prev_ptr;
290
291 if(!wcsnicmp(ptr, expand_dirW, ARRAY_SIZE(expand_dirW))) {
292 len2 = lstrlenW(ctx->tmp_dir);
293 if(buf)
294 memcpy(buf+len, ctx->tmp_dir, len2*sizeof(WCHAR));
295 len += len2;
296 ptr += ARRAY_SIZE(expand_dirW);
297 }else {
298 FIXME("Can't expand %s\n", debugstr_w(ptr));
299 if(buf)
300 buf[len] = '%';
301 len++;
302 ptr++;
303 }
304
305 prev_ptr = ptr;
306 }
307
308 if(buf)
309 lstrcpyW(buf+len, prev_ptr);
310 *size = len + lstrlenW(prev_ptr) + 1;
311}
312
314{
315 WCHAR buf[2048], val[2*MAX_PATH];
316 const WCHAR *key;
317 DWORD len;
319
320 len = GetPrivateProfileStringW(sect_name, NULL, NULL, buf, ARRAY_SIZE(buf), ctx->install_file);
321 if(!len)
322 return S_OK;
323
324 for(key = buf; *key; key += lstrlenW(key)+1) {
325 if(!wcsicmp(key, L"run")) {
326 WCHAR *cmd;
327 size_t size;
328
329 len = GetPrivateProfileStringW(sect_name, L"run", NULL, val, ARRAY_SIZE(val), ctx->install_file);
330
331 TRACE("Run %s\n", debugstr_w(val));
332
334
335 cmd = malloc(size * sizeof(WCHAR));
336 if(!cmd)
337 return E_OUTOFMEMORY;
338
340 hres = RunSetupCommandW(ctx->hwnd, cmd, NULL, ctx->tmp_dir, NULL, NULL, 0, NULL);
341 free(cmd);
342 if(FAILED(hres))
343 return hres;
344 }else {
345 FIXME("Unsupported hook %s\n", debugstr_w(key));
346 return E_NOTIMPL;
347 }
348 }
349
350 return S_OK;
351}
352
354{
355 WCHAR buf[2048], sect_name[128];
356 BOOL default_install = TRUE;
357 const WCHAR *key;
358 DWORD len;
360
361 len = GetPrivateProfileStringW(L"Setup Hooks", NULL, NULL, buf, ARRAY_SIZE(buf), ctx->install_file);
362 if(len) {
363 default_install = FALSE;
364
365 for(key = buf; *key; key += lstrlenW(key)+1) {
366 TRACE("[Setup Hooks] key: %s\n", debugstr_w(key));
367
368 len = GetPrivateProfileStringW(L"Setup Hooks", key, NULL, sect_name, ARRAY_SIZE(sect_name),
369 ctx->install_file);
370 if(!len) {
371 WARN("Could not get key value\n");
372 return E_FAIL;
373 }
374
375 hres = process_hook_section(ctx, sect_name);
376 if(FAILED(hres))
377 return hres;
378 }
379 }
380
381 len = GetPrivateProfileStringW(L"Add.Code", NULL, NULL, buf, ARRAY_SIZE(buf), ctx->install_file);
382 if(len) {
383 default_install = FALSE;
384
385 for(key = buf; *key; key += lstrlenW(key)+1) {
386 TRACE("[Add.Code] key: %s\n", debugstr_w(key));
387
388 len = GetPrivateProfileStringW(L"Add.Code", key, NULL, sect_name, ARRAY_SIZE(sect_name),
389 ctx->install_file);
390 if(!len) {
391 WARN("Could not get key value\n");
392 return E_FAIL;
393 }
394
395 hres = RunSetupCommandW(ctx->hwnd, ctx->install_file, sect_name,
396 ctx->tmp_dir, NULL, NULL, RSC_FLAG_INF, NULL);
397 if(FAILED(hres)) {
398 WARN("RunSetupCommandW failed: %08lx\n", hres);
399 return hres;
400 }
401 }
402 }
403
404 if(default_install) {
405 hres = RunSetupCommandW(ctx->hwnd, ctx->install_file, NULL, ctx->tmp_dir, NULL, NULL, RSC_FLAG_INF, NULL);
406 if(FAILED(hres)) {
407 WARN("RunSetupCommandW failed: %08lx\n", hres);
408 return hres;
409 }
410 }
411
412 return S_OK;
413}
414
416{
417 WCHAR tmp_path[MAX_PATH], tmp_dir[MAX_PATH];
418 BOOL res = FALSE, leave_temp = FALSE;
419 DWORD i;
421
422 GetTempPathW(ARRAY_SIZE(tmp_path), tmp_path);
423
424 for(i=0; !res && i < 100; i++) {
425 GetTempFileNameW(tmp_path, NULL, GetTickCount() + i*17037, tmp_dir);
426 res = CreateDirectoryW(tmp_dir, NULL);
427 }
428 if(!res)
429 return E_FAIL;
430
431 ctx->tmp_dir = tmp_dir;
432
433 TRACE("Using temporary directory %s\n", debugstr_w(tmp_dir));
434
436 if(SUCCEEDED(hres)) {
437 if(ctx->callback)
438 IBindStatusCallback_OnProgress(ctx->callback, 0, 0, BINDSTATUS_INSTALLINGCOMPONENTS, ctx->install_file);
439
440 switch(ctx->install_type) {
441 case INSTALL_INF:
443 break;
444 case INSTALL_DLL:
445 FIXME("Installing DLL, registering in temporary location\n");
446 hres = setup_dll(ctx);
447 if(SUCCEEDED(hres))
448 leave_temp = TRUE;
449 break;
450 default:
451 assert(0);
452 }
453 }
454
455 if(!leave_temp)
456 RemoveDirectoryW(ctx->tmp_dir);
457 return hres;
458}
459
461{
462 WCHAR text[100];
463
464 if(--ctx->counter <= 0) {
465 HWND button_hwnd;
466
467 KillTimer(hwnd, ctx->timer);
469
471 EnableWindow(button_hwnd, TRUE);
472 }else {
473 WCHAR buf[100];
475 swprintf(text, ARRAY_SIZE(text), buf, ctx->counter);
476 }
477
479}
480
482{
483 BSTR display_uri;
485
486 if(!SetPropW(hwnd, L"ctx", ctx))
487 return FALSE;
488
489 hres = IUri_GetDisplayUri(ctx->uri, &display_uri);
490 if(FAILED(hres))
491 return FALSE;
492
494 SysFreeString(display_uri);
495
497 (WPARAM)LoadIconW(0, (const WCHAR*)OIC_WARNING), 0);
498
499 ctx->counter = 4;
501 ctx->timer = SetTimer(hwnd, 1, 1000, NULL);
502 return TRUE;
503}
504
506{
507 switch(msg) {
508 case WM_INITDIALOG: {
510 EndDialog(hwnd, 0);
511 return TRUE;
512 }
513 case WM_COMMAND:
514 switch(wparam) {
516 install_ctx_t *ctx = GetPropW(hwnd, L"ctx");
517 if(ctx)
518 ctx->cancel = FALSE;
519 EndDialog(hwnd, 0);
520 return FALSE;
521 }
522 case IDCANCEL:
523 EndDialog(hwnd, 0);
524 return FALSE;
525 }
526 case WM_TIMER:
528 return TRUE;
529 }
530
531 return FALSE;
532}
533
535{
536 IWindowForBindingUI *window_iface;
537 HWND parent_hwnd = NULL;
539
540 if(!ctx->callback) {
541 FIXME("no callback\n");
542 return FALSE;
543 }
544
545 hres = IBindStatusCallback_QueryInterface(ctx->callback, &IID_IWindowForBindingUI, (void**)&window_iface);
546 if(FAILED(hres))
547 return FALSE;
548
549 hres = IWindowForBindingUI_GetWindow(window_iface, &IID_ICodeInstall, &ctx->hwnd);
550 IWindowForBindingUI_Release(window_iface);
551 if(FAILED(hres))
552 return FALSE;
553
554 ctx->cancel = TRUE;
556 return !ctx->cancel;
557}
558
560{
561 BSTR path;
563
564 TRACE("%s\n", debugstr_w(cache_file));
565
566 ctx->cache_file = cache_file;
567
568 if(!install_warning(ctx)) {
569 TRACE("Installation cancelled\n");
570 return S_OK;
571 }
572
573 hres = IUri_GetPath(ctx->uri, &path);
574 if(SUCCEEDED(hres)) {
575 const WCHAR *ptr, *ptr2, *ext;
576
577 ptr = wcsrchr(path, '/');
578 if(!ptr)
579 ptr = path;
580 else
581 ptr++;
582
583 ptr2 = wcsrchr(ptr, '\\');
584 if(ptr2)
585 ptr = ptr2+1;
586
587 ctx->file_name = ptr;
588 ext = wcsrchr(ptr, '.');
589 if(!ext)
590 ext = ptr;
591
592 if(!wcsicmp(ext, L".cab")) {
594 }else {
595 FIXME("Unsupported extension %s\n", debugstr_w(ext));
596 hres = E_NOTIMPL;
597 }
599 }
600
601 return hres;
602}
603
605{
606 WCHAR buf[1024], fmt[1024];
607
610 MessageBoxW(ctx->hwnd, buf, NULL, MB_OK);
611}
612
613static HRESULT distunit_on_stop(void *ctx, const WCHAR *cache_file, HRESULT hresult, const WCHAR *error_str)
614{
615 install_ctx_t *install_ctx = ctx;
616
617 TRACE("(%p %s %08lx %s)\n", ctx, debugstr_w(cache_file), hresult, debugstr_w(error_str));
618
619 if(hresult == S_OK) {
620 hresult = install_file(install_ctx, cache_file);
621 if(FAILED(hresult))
622 failure_msgbox(ctx, hresult);
623 }
624
625 if(install_ctx->callback)
626 IBindStatusCallback_OnStopBinding(install_ctx->callback, hresult, error_str);
627
628 if(install_ctx->release_on_stop)
629 release_install_ctx(install_ctx);
630 return S_OK;
631}
632
633/***********************************************************************
634 * AsyncInstallDistributionUnit (URLMON.@)
635 */
636HRESULT WINAPI AsyncInstallDistributionUnit(const WCHAR *szDistUnit, const WCHAR *szTYPE, const WCHAR *szExt,
637 DWORD dwFileVersionMS, DWORD dwFileVersionLS, const WCHAR *szURL, IBindCtx *pbc, void *pvReserved, DWORD flags)
638{
641
642 TRACE("(%s %s %s %lx %lx %s %p %p %lx)\n", debugstr_w(szDistUnit), debugstr_w(szTYPE), debugstr_w(szExt),
643 dwFileVersionMS, dwFileVersionLS, debugstr_w(szURL), pbc, pvReserved, flags);
644
645 if(szDistUnit || szTYPE || szExt)
646 FIXME("Unsupported arguments\n");
647
648 ctx = calloc(1, sizeof(*ctx));
649 if(!ctx)
650 return E_OUTOFMEMORY;
651
652 hres = CreateUri(szURL, 0, 0, &ctx->uri);
653 if(FAILED(hres)) {
654 free(ctx);
655 return E_OUTOFMEMORY;
656 }
657
658 ctx->callback = bsc_from_bctx(pbc);
659
660 hres = download_to_cache(ctx->uri, distunit_on_stop, ctx, ctx->callback);
661 if(hres == MK_S_ASYNCHRONOUS)
662 ctx->release_on_stop = TRUE;
663 else
665
666 return hres;
667}
vector< FileInfo > FileList
Definition: DriveVolume.h:63
LIST_ENTRY FilterList
Definition: Filter.c:24
PULONG FileCount
Definition: SfcGetFiles.c:18
@ lparam
Definition: SystemMenu.c:31
@ wparam
Definition: SystemMenu.c:30
#define RSC_FLAG_INF
Definition: advpub.h:130
#define msg(x)
Definition: auth_time.c:54
static HRESULT distunit_on_stop(void *ctx, const WCHAR *cache_file, HRESULT hresult, const WCHAR *error_str)
Definition: axinstall.c:613
static BOOL install_warning(install_ctx_t *ctx)
Definition: axinstall.c:534
static HRESULT install_file(install_ctx_t *ctx, const WCHAR *cache_file)
Definition: axinstall.c:559
static void failure_msgbox(install_ctx_t *ctx, HRESULT hres)
Definition: axinstall.c:604
static BOOL init_warning_dialog(HWND hwnd, install_ctx_t *ctx)
Definition: axinstall.c:481
static HRESULT install_cab_file(install_ctx_t *ctx)
Definition: axinstall.c:415
static BOOL file_exists(const WCHAR *file_name)
Definition: axinstall.c:64
static HRESULT install_inf_file(install_ctx_t *ctx)
Definition: axinstall.c:353
HRESULT WINAPI AsyncInstallDistributionUnit(const WCHAR *szDistUnit, const WCHAR *szTYPE, const WCHAR *szExt, DWORD dwFileVersionMS, DWORD dwFileVersionLS, const WCHAR *szURL, IBindCtx *pbc, void *pvReserved, DWORD flags)
Definition: axinstall.c:636
static void expand_command(install_ctx_t *ctx, const WCHAR *cmd, WCHAR *buf, size_t *size)
Definition: axinstall.c:279
static HRESULT extract_cab_file(install_ctx_t *ctx)
Definition: axinstall.c:205
static HRESULT setup_dll(install_ctx_t *ctx)
Definition: axinstall.c:256
static void update_counter(install_ctx_t *ctx, HWND hwnd)
Definition: axinstall.c:460
static INT_PTR WINAPI warning_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
Definition: axinstall.c:505
static void release_install_ctx(install_ctx_t *ctx)
Definition: axinstall.c:54
static HRESULT process_hook_section(install_ctx_t *ctx, const WCHAR *sect_name)
Definition: axinstall.c:313
install_type
Definition: axinstall.c:33
@ INSTALL_UNKNOWN
Definition: axinstall.c:34
@ INSTALL_DLL
Definition: axinstall.c:35
@ INSTALL_INF
Definition: axinstall.c:36
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define ARRAY_SIZE(A)
Definition: main.h:20
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
BOOL Error
Definition: chkdsk.c:66
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define EXTRACT_EXTRACTFILES
Definition: files.c:543
static void free_file_list(SESSION *session)
Definition: files.c:673
static void free_file_node(struct FILELIST *pNode)
Definition: files.c:616
#define EXTRACT_FILLFILELIST
Definition: files.c:542
HRESULT WINAPI ExtractFilesW(LPCWSTR CabName, LPCWSTR ExpandDir, DWORD Flags, LPCWSTR FileList, LPVOID LReserved, DWORD Reserved)
Definition: files.c:802
HRESULT WINAPI RunSetupCommandW(HWND hWnd, LPCWSTR szCmdName, LPCWSTR szInfSection, LPCWSTR szDir, LPCWSTR lpszTitle, HANDLE *phEXE, DWORD dwFlags, LPVOID pvReserved)
Definition: install.c:990
#define wcschr
Definition: compat.h:17
#define GetProcessHeap()
Definition: compat.h:736
#define wcsnicmp
Definition: compat.h:14
#define wcsrchr
Definition: compat.h:16
#define CP_ACP
Definition: compat.h:109
#define GetProcAddress(x, y)
Definition: compat.h:753
#define FreeLibrary(x)
Definition: compat.h:748
OLECHAR * BSTR
Definition: compat.h:2293
#define MAX_PATH
Definition: compat.h:34
#define HeapFree(x, y, z)
Definition: compat.h:735
#define lstrcpyW
Definition: compat.h:749
#define WideCharToMultiByte
Definition: compat.h:111
#define LoadLibraryW(x)
Definition: compat.h:747
#define wcsicmp
Definition: compat.h:15
#define lstrlenW
Definition: compat.h:750
static const WCHAR *const ext[]
Definition: module.c:53
BOOL WINAPI CreateDirectoryW(IN LPCWSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
Definition: dir.c:58
BOOL WINAPI RemoveDirectoryW(IN LPCWSTR lpPathName)
Definition: dir.c:700
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
Definition: fileinfo.c:636
DWORD WINAPI GetFileAttributesA(LPCSTR lpFileName)
Definition: fileinfo.c:620
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
Definition: loader.c:111
DWORD WINAPI GetTempPathW(IN DWORD count, OUT LPWSTR path)
Definition: path.c:1999
INT WINAPI GetPrivateProfileStringW(LPCWSTR section, LPCWSTR entry, LPCWSTR def_val, LPWSTR buffer, UINT len, LPCWSTR filename)
Definition: profile.c:1142
ULONG WINAPI DECLSPEC_HOTPATCH GetTickCount(void)
Definition: sync.c:182
const WCHAR * text
Definition: package.c:1794
#define assert(_expr)
Definition: assert.h:32
#define IDS_AXINSTALL_FAILURE
Definition: resource.h:24
#define IDS_AXINSTALL_INSTALL
Definition: resource.h:26
#define ID_AXINSTALL_INSTALL_BTN
Definition: resource.h:21
#define ID_AXINSTALL_ICON
Definition: resource.h:22
#define IDS_AXINSTALL_INSTALLN
Definition: resource.h:25
#define ID_AXINSTALL_LOCATION
Definition: resource.h:20
#define ID_AXINSTALL_WARNING_DLG
Definition: resource.h:19
HRESULT WINAPI CreateUri(LPCWSTR pwzURI, DWORD dwFlags, DWORD_PTR dwReserved, IUri **ppURI)
Definition: uri.c:5382
#define swprintf
Definition: precomp.h:40
return ret
Definition: mutex.c:146
#define L(x)
Definition: resources.c:13
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
FP_OP Operation
Definition: fpcontrol.c:150
_Must_inspect_result_ _Out_ PLARGE_INTEGER FileSize
Definition: fsrtlfuncs.h:108
GLuint res
Definition: glext.h:9613
GLsizeiptr size
Definition: glext.h:5919
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLbitfield flags
Definition: glext.h:7161
GLuint GLfloat * val
Definition: glext.h:7180
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
unsigned int UINT
Definition: sysinfo.c:13
static LPSTR strdupWtoA(LPCWSTR str)
Definition: hhctrl.h:299
#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
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:100
#define ZeroMemory
Definition: minwinbase.h:31
LONG_PTR LPARAM
Definition: minwindef.h:175
UINT_PTR WPARAM
Definition: minwindef.h:174
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static PVOID ptr
Definition: dispmode.c:27
static DWORD path_len
Definition: batch.c:31
static LPCWSTR LPVOID pvReserved
Definition: asmcache.c:749
HRESULT hres
Definition: protocol.c:465
static const WCHAR * cache_file
Definition: protocol.c:102
static LPCWSTR file_name
Definition: protocol.c:152
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
Definition: rtlfuncs.h:3051
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:273
short WCHAR
Definition: pedump.c:58
char CHAR
Definition: pedump.c:57
static unsigned __int64 next
Definition: rand_nt.c:6
#define calloc
Definition: rosglue.h:14
const WCHAR * str
#define LoadStringW
Definition: utils.h:64
#define TRACE(s)
Definition: solgame.cpp:4
Definition: fci.h:44
struct FILELIST * next
Definition: files.c:547
LPSTR FileName
Definition: files.c:546
BOOL DoExtract
Definition: files.c:548
Definition: files.c:551
Definition: ftp_var.h:139
Definition: dsound.c:943
enum install_type install_type
Definition: axinstall.c:48
INT_PTR timer
Definition: axinstall.c:51
const WCHAR * cache_file
Definition: axinstall.c:45
const WCHAR * tmp_dir
Definition: axinstall.c:46
IUri * uri
Definition: axinstall.c:40
BOOL release_on_stop
Definition: axinstall.c:42
WCHAR * install_file
Definition: axinstall.c:44
IBindStatusCallback * callback
Definition: axinstall.c:41
const WCHAR * file_name
Definition: axinstall.c:47
Definition: copy.c:22
const char * LPCSTR
Definition: typedefs.h:52
int32_t INT_PTR
Definition: typedefs.h:64
const uint16_t * LPCWSTR
Definition: typedefs.h:57
char * LPSTR
Definition: typedefs.h:51
int32_t INT
Definition: typedefs.h:58
IBindStatusCallback * bsc_from_bctx(IBindCtx *bctx)
Definition: bindctx.c:70
static HMODULE hCabinet
Definition: urlmon_main.c:43
HINSTANCE urlmon_instance
Definition: urlmon_main.c:41
#define INVALID_FILE_ATTRIBUTES
Definition: vfdcmd.c:23
HRESULT download_to_cache(IUri *uri, stop_cache_binding_proc_t proc, void *ctx, IBindStatusCallback *callback)
Definition: download.c:375
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
#define HRESULT
Definition: msvc.h:7
#define WINAPI
Definition: msvc.h:6
static HRESULT HRESULT_FROM_WIN32(unsigned int x)
Definition: winerror.h:210
#define ERROR_PATH_NOT_FOUND
Definition: winerror.h:228
#define STM_SETICON
Definition: winuser.h:2128
#define IDCANCEL
Definition: winuser.h:842
#define WM_COMMAND
Definition: winuser.h:1768
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
#define WM_INITDIALOG
Definition: winuser.h:1767
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)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_TIMER
Definition: winuser.h:1770
BOOL WINAPI SetPropW(_In_ HWND, _In_ LPCWSTR, _In_opt_ HANDLE)
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
#define MB_OK
Definition: winuser.h:801
HANDLE WINAPI GetPropW(_In_ HWND, _In_ LPCWSTR)
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpIconName)
Definition: cursoricon.c:2444
INT_PTR WINAPI DialogBoxParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)