#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.
645 if(szDistUnit || szTYPE || szExt)
646 FIXME(
"Unsupported arguments\n");
648 ctx = heap_alloc_zero(
sizeof(*
ctx));
661 if(
hres == MK_S_ASYNCHRONOUS)
IBindStatusCallback * bsc_from_bctx(IBindCtx *bctx)
static HRESULT distunit_on_stop(void *ctx, const WCHAR *cache_file, HRESULT hresult, const WCHAR *error_str)
static LPCSTR DWORD void * pvReserved
HRESULT download_to_cache(IUri *uri, stop_cache_binding_proc_t proc, void *ctx, IBindStatusCallback *callback)
static void release_install_ctx(install_ctx_t *ctx)
HRESULT WINAPI CreateUri(LPCWSTR pwzURI, DWORD dwFlags, DWORD_PTR dwReserved, IUri **ppURI)
static BOOL heap_free(void *mem)
Referenced by install_codebase().
◆ distunit_on_stop()
Definition at line 613 of file axinstall.c.
619 if(hresult ==
S_OK) {
626 IBindStatusCallback_OnStopBinding(install_ctx->
callback, hresult, error_str);
static void failure_msgbox(install_ctx_t *ctx, HRESULT hres)
static const WCHAR * cache_file
static HRESULT install_file(install_ctx_t *ctx, const WCHAR *cache_file)
static void release_install_ctx(install_ctx_t *ctx)
IBindStatusCallback * callback
Referenced by AsyncInstallDistributionUnit().
◆ expand_command()
Definition at line 274 of file axinstall.c.
277 size_t len = 0, len2;
279 static const WCHAR expand_dirW[] = {
'%',
'E',
'X',
'T',
'R',
'A',
'C',
'T',
'_',
'D',
'I',
'R',
'%'};
_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)
GLenum GLuint GLenum GLsizei const GLchar * buf
_CONST_RETURN wchar_t *__cdecl wcschr(_In_z_ const wchar_t *_Str, wchar_t _Ch)
#define memcpy(s1, s2, n)
Referenced by process_hook_section().
◆ extract_cab_file()
Definition at line 200 of file axinstall.c.
207 hres = Modified_ExtractFilesW(
ctx->cache_file,
ctx->tmp_dir);
212 WARN(
"ExtractFilesW failed: %08x\n",
hres);
219 if(!
ctx->install_file)
247 FIXME(
"No known install file\n");
static void * heap_alloc(size_t len)
static const WCHAR dllW[]
static const WCHAR infW[]
#define memcpy(s1, s2, n)
static BOOL file_exists(const WCHAR *file_name)
HRESULT WINAPI ExtractFilesW(LPCWSTR CabName, LPCWSTR ExpandDir, DWORD Flags, LPCWSTR FileList, LPVOID LReserved, DWORD Reserved)
static const WCHAR ocxW[]
Referenced by install_cab_file().
◆ failure_msgbox()
Definition at line 604 of file axinstall.c.
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
GLenum GLuint GLenum GLsizei const GLchar * buf
HINSTANCE urlmon_instance
int _cdecl swprintf(const WCHAR *,...)
#define IDS_AXINSTALL_FAILURE
Referenced by distunit_on_stop().
◆ file_exists()
◆ init_warning_dialog()
Definition at line 481 of file axinstall.c.
489 hres = IUri_GetDisplayUri(
ctx->uri, &display_uri);
#define ID_AXINSTALL_ICON
static const WCHAR ctxW[]
static void update_counter(install_ctx_t *ctx, HWND hwnd)
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
BOOL WINAPI SetPropW(_In_ HWND, _In_ LPCWSTR, _In_opt_ HANDLE)
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
#define ID_AXINSTALL_LOCATION
Referenced by warning_proc().
◆ install_cab_file()
Definition at line 415 of file axinstall.c.
424 for(
i=0; !
res &&
i < 100;
i++) {
431 ctx->tmp_dir = tmp_dir;
438 IBindStatusCallback_OnProgress(
ctx->callback, 0, 0, BINDSTATUS_INSTALLINGCOMPONENTS,
ctx->install_file);
440 switch(
ctx->install_type) {
445 FIXME(
"Installing DLL, registering in temporary location\n");
BOOL WINAPI CreateDirectoryW(IN LPCWSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
static HRESULT install_inf_file(install_ctx_t *ctx)
DWORD WINAPI GetTickCount(VOID)
DWORD WINAPI GetTempPathW(IN DWORD count, OUT LPWSTR path)
BOOL WINAPI RemoveDirectoryW(IN LPCWSTR lpPathName)
static HRESULT extract_cab_file(install_ctx_t *ctx)
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
static HRESULT setup_dll(install_ctx_t *ctx)
Referenced by install_file().
◆ install_file()
Definition at line 559 of file axinstall.c.
569 TRACE(
"Installation cancelled\n");
GLsizei const GLchar ** path
static const WCHAR * cache_file
static BOOL install_warning(install_ctx_t *ctx)
static const WCHAR cab_extW[]
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
static HRESULT install_cab_file(install_ctx_t *ctx)
Referenced by distunit_on_stop().
◆ install_inf_file()
Definition at line 350 of file axinstall.c.
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};
363 default_install =
FALSE;
371 WARN(
"Could not get key value\n");
383 default_install =
FALSE;
391 WARN(
"Could not get key value\n");
398 WARN(
"RunSetupCommandW failed: %08x\n",
hres);
404 if(default_install) {
407 WARN(
"RunSetupCommandW failed: %08x\n",
hres);
INT WINAPI GetPrivateProfileStringW(LPCWSTR section, LPCWSTR entry, LPCWSTR def_val, LPWSTR buffer, UINT len, LPCWSTR filename)
GLenum GLuint GLenum GLsizei const GLchar * buf
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)
Referenced by install_cab_file().
◆ install_warning()
Definition at line 534 of file axinstall.c.
541 FIXME(
"no callback\n");
545 hres = IBindStatusCallback_QueryInterface(
ctx->callback, &IID_IWindowForBindingUI, (
void**)&window_iface);
549 hres = IWindowForBindingUI_GetWindow(window_iface, &IID_ICodeInstall, &
ctx->hwnd);
550 IWindowForBindingUI_Release(window_iface);
INT_PTR WINAPI DialogBoxParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
#define ID_AXINSTALL_WARNING_DLG
HINSTANCE urlmon_instance
static INT_PTR WINAPI warning_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
#define MAKEINTRESOURCEW(i)
Referenced by install_file().
◆ process_hook_section()
Definition at line 308 of file axinstall.c.
315 static const WCHAR runW[] = {
'r',
'u',
'n',0};
INT WINAPI GetPrivateProfileStringW(LPCWSTR section, LPCWSTR entry, LPCWSTR def_val, LPWSTR buffer, UINT len, LPCWSTR filename)
static void * heap_alloc(size_t len)
GLenum GLuint GLenum GLsizei const GLchar * buf
HRESULT WINAPI RunSetupCommandW(HWND hWnd, LPCWSTR szCmdName, LPCWSTR szInfSection, LPCWSTR szDir, LPCWSTR lpszTitle, HANDLE *phEXE, DWORD dwFlags, LPVOID pvReserved)
static void expand_command(install_ctx_t *ctx, const WCHAR *cmd, WCHAR *buf, size_t *size)
static BOOL heap_free(void *mem)
Referenced by install_inf_file().
◆ release_install_ctx()
◆ setup_dll()
Definition at line 251 of file axinstall.c.
266 WARN(
"no DllRegisterServer function\n");
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
#define GetProcAddress(x, y)
Referenced by install_cab_file().
◆ update_counter()
Definition at line 460 of file axinstall.c.
464 if(--
ctx->counter <= 0) {
#define IDS_AXINSTALL_INSTALL
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
GLenum GLuint GLenum GLsizei const GLchar * buf
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
HINSTANCE urlmon_instance
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
int _cdecl swprintf(const WCHAR *,...)
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
#define IDS_AXINSTALL_INSTALLN
#define ID_AXINSTALL_INSTALL_BTN
Referenced by init_warning_dialog(), and warning_proc().
◆ warning_proc()
Definition at line 505 of file axinstall.c.
static const WCHAR ctxW[]
static void update_counter(install_ctx_t *ctx, HWND hwnd)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
static UINT WPARAM LPARAM lparam
static BOOL init_warning_dialog(HWND hwnd, install_ctx_t *ctx)
HANDLE WINAPI GetPropW(_In_ HWND, _In_ LPCWSTR)
#define ID_AXINSTALL_INSTALL_BTN
static UINT WPARAM wparam
Referenced by install_warning().
◆ WINE_DEFAULT_DEBUG_CHANNEL()
WINE_DEFAULT_DEBUG_CHANNEL |
( |
urlmon |
| ) |
|
◆ cab_extW
◆ ctxW
◆ dllW
◆ infW
◆ ocxW