#include <assert.h>
#include "urlmon_main.h"
#include "resource.h"
#include "advpub.h"
#include "fdi.h"
#include "wine/debug.h"
Go to the source code of this file.
|
| WINE_DEFAULT_DEBUG_CHANNEL (urlmon) |
|
static void | release_install_ctx (install_ctx_t *ctx) |
|
static BOOL | file_exists (const WCHAR *file_name) |
|
static HRESULT | extract_cab_file (install_ctx_t *ctx) |
|
static HRESULT | setup_dll (install_ctx_t *ctx) |
|
static void | expand_command (install_ctx_t *ctx, const WCHAR *cmd, WCHAR *buf, size_t *size) |
|
static HRESULT | process_hook_section (install_ctx_t *ctx, const WCHAR *sect_name) |
|
static HRESULT | install_inf_file (install_ctx_t *ctx) |
|
static HRESULT | install_cab_file (install_ctx_t *ctx) |
|
static void | update_counter (install_ctx_t *ctx, HWND hwnd) |
|
static BOOL | init_warning_dialog (HWND hwnd, install_ctx_t *ctx) |
|
static INT_PTR WINAPI | warning_proc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) |
|
static BOOL | install_warning (install_ctx_t *ctx) |
|
static HRESULT | install_file (install_ctx_t *ctx, const WCHAR *cache_file) |
|
static void | failure_msgbox (install_ctx_t *ctx, HRESULT hres) |
|
static HRESULT | distunit_on_stop (void *ctx, const WCHAR *cache_file, HRESULT hresult, const WCHAR *error_str) |
|
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) |
|
|
static const WCHAR | ctxW [] = {'c','t','x',0} |
|
static const WCHAR | cab_extW [] = {'.','c','a','b',0} |
|
static const WCHAR | infW [] = {'i','n','f',0} |
|
static const WCHAR | dllW [] = {'d','l','l',0} |
|
static const WCHAR | ocxW [] = {'o','c','x',0} |
|
◆ OEMRESOURCE
◆ install_type
Enumerator |
---|
INSTALL_UNKNOWN | |
INSTALL_DLL | |
INSTALL_INF | |
Definition at line 39 of file axinstall.c.
◆ AsyncInstallDistributionUnit()
Definition at line 636 of file axinstall.c.
638{
641
644
645 if(szDistUnit || szTYPE || szExt)
646 FIXME(
"Unsupported arguments\n");
647
648 ctx = heap_alloc_zero(
sizeof(*
ctx));
651
656 }
657
659
661 if(
hres == MK_S_ASYNCHRONOUS)
663 else
665
667}
static BOOL heap_free(void *mem)
static HRESULT distunit_on_stop(void *ctx, const WCHAR *cache_file, HRESULT hresult, const WCHAR *error_str)
static void release_install_ctx(install_ctx_t *ctx)
HRESULT WINAPI CreateUri(LPCWSTR pwzURI, DWORD dwFlags, DWORD_PTR dwReserved, IUri **ppURI)
static LPCSTR DWORD void * pvReserved
IBindStatusCallback * bsc_from_bctx(IBindCtx *bctx)
HRESULT download_to_cache(IUri *uri, stop_cache_binding_proc_t proc, void *ctx, IBindStatusCallback *callback)
Referenced by install_codebase().
◆ distunit_on_stop()
Definition at line 613 of file axinstall.c.
614{
616
618
619 if(hresult ==
S_OK) {
623 }
624
626 IBindStatusCallback_OnStopBinding(install_ctx->
callback, hresult, error_str);
627
631}
static HRESULT install_file(install_ctx_t *ctx, const WCHAR *cache_file)
static void failure_msgbox(install_ctx_t *ctx, HRESULT hres)
static const WCHAR * cache_file
IBindStatusCallback * callback
Referenced by AsyncInstallDistributionUnit().
◆ expand_command()
Definition at line 274 of file axinstall.c.
275{
277 size_t len = 0, len2;
278
279 static const WCHAR expand_dirW[] = {
'%',
'E',
'X',
'T',
'R',
'A',
'C',
'T',
'_',
'D',
'I',
'R',
'%'};
280
285
292 }else {
298 }
299
301 }
302
306}
GLenum GLuint GLenum GLsizei const GLchar * buf
#define memcpy(s1, s2, n)
_Check_return_ _CRTIMP int __cdecl _wcsnicmp(_In_reads_or_z_(_MaxCount) const wchar_t *_Str1, _In_reads_or_z_(_MaxCount) const wchar_t *_Str2, _In_ size_t _MaxCount)
Referenced by process_hook_section().
◆ extract_cab_file()
Definition at line 200 of file axinstall.c.
201{
205
206#ifdef __REACTOS__
207 hres = Modified_ExtractFilesW(
ctx->cache_file,
ctx->tmp_dir);
208#else
210#endif
212 WARN(
"ExtractFilesW failed: %08x\n",
hres);
214 }
215
219 if(!
ctx->install_file)
221
225
226
228
233 }
234
239 }
240
245 }
246
247 FIXME(
"No known install file\n");
249}
static void * heap_alloc(size_t len)
static BOOL file_exists(const WCHAR *file_name)
static const WCHAR infW[]
static const WCHAR ocxW[]
static const WCHAR dllW[]
HRESULT WINAPI ExtractFilesW(LPCWSTR CabName, LPCWSTR ExpandDir, DWORD Flags, LPCWSTR FileList, LPVOID LReserved, DWORD Reserved)
Referenced by install_cab_file().
◆ failure_msgbox()
Definition at line 604 of file axinstall.c.
605{
607
611}
#define IDS_AXINSTALL_FAILURE
HINSTANCE urlmon_instance
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
Referenced by distunit_on_stop().
◆ file_exists()
◆ init_warning_dialog()
Definition at line 481 of file axinstall.c.
482{
485
488
489 hres = IUri_GetDisplayUri(
ctx->uri, &display_uri);
492
495
498
503}
static const WCHAR ctxW[]
static void update_counter(install_ctx_t *ctx, HWND hwnd)
#define ID_AXINSTALL_ICON
#define ID_AXINSTALL_LOCATION
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
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)
BOOL WINAPI SetPropW(_In_ HWND, _In_ LPCWSTR, _In_opt_ HANDLE)
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpIconName)
Referenced by warning_proc().
◆ install_cab_file()
Definition at line 415 of file axinstall.c.
416{
421
423
424 for(
i=0; !
res &&
i < 100;
i++) {
427 }
430
431 ctx->tmp_dir = tmp_dir;
432
434
438 IBindStatusCallback_OnProgress(
ctx->callback, 0, 0, BINDSTATUS_INSTALLINGCOMPONENTS,
ctx->install_file);
439
440 switch(
ctx->install_type) {
443 break;
445 FIXME(
"Installing DLL, registering in temporary location\n");
449 break;
450 default:
452 }
453 }
454
455 if(!leave_temp)
458}
static HRESULT install_inf_file(install_ctx_t *ctx)
static HRESULT extract_cab_file(install_ctx_t *ctx)
static HRESULT setup_dll(install_ctx_t *ctx)
BOOL WINAPI CreateDirectoryW(IN LPCWSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
BOOL WINAPI RemoveDirectoryW(IN LPCWSTR lpPathName)
DWORD WINAPI GetTempPathW(IN DWORD count, OUT LPWSTR path)
DWORD WINAPI GetTickCount(VOID)
UINT WINAPI GetTempFileNameW(IN LPCWSTR lpPathName, IN LPCWSTR lpPrefixString, IN UINT uUnique, OUT LPWSTR lpTempFileName)
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
Referenced by install_file().
◆ install_file()
Definition at line 559 of file axinstall.c.
560{
563
565
567
569 TRACE(
"Installation cancelled\n");
571 }
572
576
580 else
582
584 if(ptr2)
586
591
594 }else {
597 }
599 }
600
602}
static BOOL install_warning(install_ctx_t *ctx)
static HRESULT install_cab_file(install_ctx_t *ctx)
static const WCHAR cab_extW[]
static const WCHAR *const ext[]
Referenced by distunit_on_stop().
◆ install_inf_file()
Definition at line 350 of file axinstall.c.
351{
357
358 static const WCHAR setup_hooksW[] = {
'S',
'e',
't',
'u',
'p',
' ',
'H',
'o',
'o',
'k',
's',0};
359 static const WCHAR add_codeW[] = {
'A',
'd',
'd',
'.',
'C',
'o',
'd',
'e',0};
360
363 default_install =
FALSE;
364
367
371 WARN(
"Could not get key value\n");
373 }
374
378 }
379 }
380
383 default_install =
FALSE;
384
387
391 WARN(
"Could not get key value\n");
393 }
394
398 WARN(
"RunSetupCommandW failed: %08x\n",
hres);
400 }
401 }
402 }
403
404 if(default_install) {
407 WARN(
"RunSetupCommandW failed: %08x\n",
hres);
409 }
410 }
411
413}
static HRESULT process_hook_section(install_ctx_t *ctx, const WCHAR *sect_name)
HRESULT WINAPI RunSetupCommandW(HWND hWnd, LPCWSTR szCmdName, LPCWSTR szInfSection, LPCWSTR szDir, LPCWSTR lpszTitle, HANDLE *phEXE, DWORD dwFlags, LPVOID pvReserved)
INT WINAPI GetPrivateProfileStringW(LPCWSTR section, LPCWSTR entry, LPCWSTR def_val, LPWSTR buffer, UINT len, LPCWSTR filename)
Referenced by install_cab_file().
◆ install_warning()
Definition at line 534 of file axinstall.c.
535{
539
541 FIXME(
"no callback\n");
543 }
544
545 hres = IBindStatusCallback_QueryInterface(
ctx->callback, &IID_IWindowForBindingUI, (
void**)&window_iface);
548
549 hres = IWindowForBindingUI_GetWindow(window_iface, &IID_ICodeInstall, &
ctx->hwnd);
550 IWindowForBindingUI_Release(window_iface);
553
557}
static INT_PTR WINAPI warning_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
#define ID_AXINSTALL_WARNING_DLG
#define MAKEINTRESOURCEW(i)
INT_PTR WINAPI DialogBoxParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
Referenced by install_file().
◆ process_hook_section()
Definition at line 308 of file axinstall.c.
309{
314
315 static const WCHAR runW[] = {
'r',
'u',
'n',0};
316
320
325
327
329
331
335
341 }else {
344 }
345 }
346
348}
static void expand_command(install_ctx_t *ctx, const WCHAR *cmd, WCHAR *buf, size_t *size)
Referenced by install_inf_file().
◆ release_install_ctx()
◆ setup_dll()
Definition at line 251 of file axinstall.c.
252{
255
257
261
263 if(reg_func) {
265 }else {
266 WARN(
"no DllRegisterServer function\n");
268 }
269
272}
#define GetProcAddress(x, y)
Referenced by install_cab_file().
◆ update_counter()
Definition at line 460 of file axinstall.c.
461{
463
464 if(--
ctx->counter <= 0) {
466
469
472 }else {
476 }
477
479}
#define IDS_AXINSTALL_INSTALL
#define ID_AXINSTALL_INSTALL_BTN
#define IDS_AXINSTALL_INSTALLN
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
Referenced by init_warning_dialog(), and warning_proc().
◆ warning_proc()
Definition at line 505 of file axinstall.c.
506{
512 }
521 }
525 }
529 }
530
532}
static BOOL init_warning_dialog(HWND hwnd, install_ctx_t *ctx)
HANDLE WINAPI GetPropW(_In_ HWND, _In_ LPCWSTR)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
Referenced by install_warning().
◆ WINE_DEFAULT_DEBUG_CHANNEL()
WINE_DEFAULT_DEBUG_CHANNEL |
( |
urlmon |
| ) |
|
◆ cab_extW
◆ ctxW
◆ dllW
◆ infW
◆ ocxW