63 IUri_Release(
ctx->uri);
65 IBindStatusCallback_Release(
ctx->callback);
80#define EXTRACT_FILLFILELIST 0x00000001
81#define EXTRACT_EXTRACTFILES 0x00000002
134 if (!CabName || !ExpandDir)
170 char *cab_name =
NULL, *expand_dir =
NULL;
190 hres = Modified_ExtractFilesA(cab_name, expand_dir);
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");
266 WARN(
"no DllRegisterServer function\n");
277 size_t len = 0, len2;
279 static const WCHAR expand_dirW[] = {
'%',
'E',
'X',
'T',
'R',
'A',
'C',
'T',
'_',
'D',
'I',
'R',
'%'};
315 static const WCHAR runW[] = {
'r',
'u',
'n',0};
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);
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");
464 if(--
ctx->counter <= 0) {
489 hres = IUri_GetDisplayUri(
ctx->uri, &display_uri);
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);
569 TRACE(
"Installation cancelled\n");
619 if(hresult ==
S_OK) {
626 IBindStatusCallback_OnStopBinding(install_ctx->
callback, hresult, error_str);
645 if(szDistUnit || szTYPE || szExt)
646 FIXME(
"Unsupported arguments\n");
648 ctx = heap_alloc_zero(
sizeof(*
ctx));
661 if(
hres == MK_S_ASYNCHRONOUS)
vector< FileInfo > FileList
static char * heap_strdupWtoA(const WCHAR *str)
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
static HRESULT distunit_on_stop(void *ctx, const WCHAR *cache_file, HRESULT hresult, const WCHAR *error_str)
static BOOL install_warning(install_ctx_t *ctx)
static HRESULT install_file(install_ctx_t *ctx, const WCHAR *cache_file)
static const WCHAR ctxW[]
static void failure_msgbox(install_ctx_t *ctx, HRESULT hres)
static BOOL init_warning_dialog(HWND hwnd, install_ctx_t *ctx)
static HRESULT install_cab_file(install_ctx_t *ctx)
static BOOL file_exists(const WCHAR *file_name)
static HRESULT install_inf_file(install_ctx_t *ctx)
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 void expand_command(install_ctx_t *ctx, const WCHAR *cmd, WCHAR *buf, size_t *size)
static HRESULT extract_cab_file(install_ctx_t *ctx)
static const WCHAR cab_extW[]
static HRESULT setup_dll(install_ctx_t *ctx)
static void update_counter(install_ctx_t *ctx, HWND hwnd)
static const WCHAR infW[]
static INT_PTR WINAPI warning_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static void release_install_ctx(install_ctx_t *ctx)
static const WCHAR ocxW[]
static const WCHAR dllW[]
static HRESULT process_hook_section(install_ctx_t *ctx, const WCHAR *sect_name)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define EXTRACT_EXTRACTFILES
static void free_file_list(SESSION *session)
static void free_file_node(struct FILELIST *pNode)
#define EXTRACT_FILLFILELIST
HRESULT WINAPI ExtractFilesW(LPCWSTR CabName, LPCWSTR ExpandDir, DWORD Flags, LPCWSTR FileList, LPVOID LReserved, DWORD Reserved)
HRESULT WINAPI RunSetupCommandW(HWND hWnd, LPCWSTR szCmdName, LPCWSTR szInfSection, LPCWSTR szDir, LPCWSTR lpszTitle, HANDLE *phEXE, DWORD dwFlags, LPVOID pvReserved)
#define GetProcAddress(x, y)
#define HeapFree(x, y, z)
static const WCHAR *const ext[]
BOOL WINAPI CreateDirectoryW(IN LPCWSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
BOOL WINAPI RemoveDirectoryW(IN LPCWSTR lpPathName)
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
DWORD WINAPI GetFileAttributesA(LPCSTR lpFileName)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
DWORD WINAPI GetTempPathW(IN DWORD count, OUT LPWSTR path)
DWORD WINAPI GetTickCount(VOID)
INT WINAPI GetPrivateProfileStringW(LPCWSTR section, LPCWSTR entry, LPCWSTR def_val, LPWSTR buffer, UINT len, LPCWSTR filename)
#define IDS_AXINSTALL_FAILURE
#define IDS_AXINSTALL_INSTALL
#define ID_AXINSTALL_INSTALL_BTN
#define ID_AXINSTALL_ICON
#define IDS_AXINSTALL_INSTALLN
#define ID_AXINSTALL_LOCATION
#define ID_AXINSTALL_WARNING_DLG
HRESULT WINAPI CreateUri(LPCWSTR pwzURI, DWORD dwFlags, DWORD_PTR dwReserved, IUri **ppURI)
UINT WINAPI GetTempFileNameW(IN LPCWSTR lpPathName, IN LPCWSTR lpPrefixString, IN UINT uUnique, OUT LPWSTR lpTempFileName)
_Must_inspect_result_ _Out_ PLARGE_INTEGER FileSize
GLenum GLuint GLenum GLsizei const GLchar * buf
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
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
#define memcpy(s1, s2, n)
static LPCSTR DWORD void * pvReserved
static const WCHAR * cache_file
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
static unsigned __int64 next
_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)
enum install_type install_type
IBindStatusCallback * callback
IBindStatusCallback * bsc_from_bctx(IBindCtx *bctx)
HINSTANCE urlmon_instance
#define INVALID_FILE_ATTRIBUTES
HRESULT download_to_cache(IUri *uri, stop_cache_binding_proc_t proc, void *ctx, IBindStatusCallback *callback)
_Reserved_ PVOID Reserved
#define ERROR_PATH_NOT_FOUND
#define HRESULT_FROM_WIN32(x)
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)
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)
BOOL WINAPI SetPropW(_In_ HWND, _In_ LPCWSTR, _In_opt_ HANDLE)
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
HANDLE WINAPI GetPropW(_In_ HWND, _In_ LPCWSTR)
#define MAKEINTRESOURCEW(i)
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpIconName)
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)