123 *
ppv = &
This->IBindStatusCallback_iface;
127 TRACE(
"(%p)->(IID_IBindStatusCallback %p)\n",
This,
ppv);
128 *
ppv = &
This->IBindStatusCallback_iface;
163 IInstallEngine2_Release(&
This->engine->IInstallEngine2_iface);
207 case BINDSTATUS_BEGINDOWNLOADDATA:
208 if (!
This->engine->thread.download_start)
211 case BINDSTATUS_DOWNLOADINGDATA:
212 case BINDSTATUS_ENDDOWNLOADDATA:
213 This->engine->thread.downloaded_kb =
This->dl_previous_kb +
progress / 1024;
214 if (
This->engine->callback)
216 hr = IInstallEngineCallback_OnComponentProgress(
This->engine->callback,
221 case BINDSTATUS_CACHEFILENAMEAVAILABLE:
223 if (!
This->cache_file)
225 ERR(
"Failed to allocate memory for cache file\n");
230 case BINDSTATUS_CONNECTING:
231 case BINDSTATUS_SENDINGREQUEST:
232 case BINDSTATUS_MIMETYPEAVAILABLE:
233 case BINDSTATUS_FINDINGRESOURCE:
255 if (!
This->cache_file)
275 DWORD *grfBINDF, BINDINFO *pbindinfo)
279 TRACE(
"(%p)->(%p %p)\n",
This, grfBINDF, pbindinfo);
281 *grfBINDF = BINDF_PULLDATA | BINDF_NEEDFILE;
290 TRACE(
"(%p)->(%08x %u %p %p)\n",
This, grfBSCF,
dwSize, pformatetc, pstgmed);
325 cb = heap_alloc_zero(
sizeof(*
cb));
356 *
ppv = &
This->IInstallEngine2_iface;
359 *
ppv = &
This->IInstallEngine2_iface;
362 *
ppv = &
This->IInstallEngine2_iface;
364 TRACE(
"(%p)->(IID_IInstallEngineTiming %p)\n",
This,
ppv);
365 *
ppv = &
This->IInstallEngineTiming_iface;
396 ICifFile_Release(
This->icif);
411 IInstallEngineCallback_OnEngineStatusChange(
This->callback,
status, 0);
424 hr = IEnumCifComponents_Reset(enum_comp);
427 while (
SUCCEEDED(IEnumCifComponents_Next(enum_comp, &comp)))
429 if (ICifComponent_GetInstallQueueState(comp) !=
ActionInstall)
434 download = ICifComponent_GetDownloadSize(comp);
441 *size_download = download;
452 hr = IEnumCifComponents_Reset(enum_comp);
455 while (
SUCCEEDED(IEnumCifComponents_Next(enum_comp, &comp)))
457 if (ICifComponent_GetInstallQueueState(comp) !=
ActionInstall)
475 char *url_temp =
NULL;
512 int len_base =
strlen(baseurl);
516 combined =
heap_alloc(len_base + len_url + 2);
517 if (!combined)
return NULL;
519 strcpy(combined, baseurl);
520 if (len_base && combined[len_base-1] !=
'/')
532 if (
flags & URLF_RELATIVEURL)
561 if (!combined)
return NULL;
579 if (!
This->downloaddir)
581 WARN(
"No download directory set\n");
588 FIXME(
"Failed to create moniker\n");
595 IMoniker_Release(mon);
617 if (unk) IUnknown_Release(unk);
620 IMoniker_Release(mon);
621 IBindCtx_Release(bindctx);
627 IBindStatusCallback_Release(&
callback->IBindStatusCallback_iface);
631 if (mon) IMoniker_Release(mon);
633 if (
callback) IBindStatusCallback_Release(&
callback->IBindStatusCallback_iface);
634 if (bindctx) IBindCtx_Release(bindctx);
641 char id[MAX_ID_LENGTH+1],
type;
648 hr = ICifComponent_GetDependency(comp,
i,
id,
sizeof(
id), &
type, &ver, &build);
660 DWORD size_dl, size_install, phase;
661 char display[MAX_DISPLAYNAME_LENGTH+1];
662 char id[MAX_ID_LENGTH+1];
666 hr = ICifComponent_GetID(comp,
id,
sizeof(
id));
674 size_dl = (
This->thread.operation ==
OP_DOWNLOAD) ? ICifComponent_GetDownloadSize(comp) : 0;
679 IInstallEngineCallback_OnStartComponent(
This->callback,
id, size_dl, size_install,
display);
709 IInstallEngineCallback_OnEngineProblem(
This->callback, ENGINEPROBLEM_DOWNLOADFAIL, &retry);
710 if (!retry)
goto done;
725 FIXME(
"Installation not yet implemented\n");
728 IInstallEngineCallback_OnStopComponent(
This->callback,
id,
hr, phase,
display, 0);
739 IInstallEngineCallback_OnStartInstall(
This->callback,
This->thread.download_size,
This->thread.install_size);
756 IInstallEngineCallback_OnStopInstall(
This->callback,
hr,
NULL, 0);
758 IEnumCifComponents_Release(
This->thread.enum_comp);
759 IInstallEngine2_Release(&
This->IInstallEngine2_iface);
771 This->thread.jobflags = jobflags;
772 This->thread.downloaded_kb = 0;
773 This->thread.download_start = 0;
782 hr = ICifFile_EnumComponents(
This->icif, &
This->thread.enum_comp, 0,
NULL);
788 IInstallEngine2_AddRef(&
This->IInstallEngine2_iface);
793 IInstallEngine2_Release(&
This->IInstallEngine2_iface);
802 IEnumCifComponents_Release(
This->thread.enum_comp);
839 IInstallEngineCallback_OnEngineStatusChange(
This->callback, ENGINESTATUS_INSTALLING, 0);
871 if (!
This->icif || !
id)
882 if (ICifComponent_GetInstallQueueState(comp) !=
ActionInstall)
885 if (ICifComponent_IsComponentDownloaded(comp) !=
S_FALSE)
948 hr = ICifFile_FindComponent(
This->icif,
id, &comp);
951 hr = ICifComponent_SetInstallQueueState(comp,
action);
954 hr = ICifComponent_SetCurrentPriority(comp,
priority);
1004 if (
This->downloaddir)
1082 ICifFile_Release(
This->icif);
1103 if (!
This->icif || !cif_file)
1106 ICifFile_AddRef(
This->icif);
1107 *cif_file =
This->icif;
1145 return IInstallEngine2_QueryInterface(&
This->IInstallEngine2_iface,
riid,
ppv);
1151 return IInstallEngine2_AddRef(&
This->IInstallEngine2_iface);
1157 return IInstallEngine2_Release(&
This->IInstallEngine2_iface);
1183 progress->dwDownloadKBRemaining =
max(
This->thread.download_size,
This->thread.downloaded_kb) -
This->thread.downloaded_kb;
1186 if (
This->thread.download_start &&
This->thread.downloaded_kb && elapsed > 100)
1187 progress->dwDownloadSecsRemaining = (
progress->dwDownloadKBRemaining * elapsed) / (
This->thread.downloaded_kb * 1000);
1189 progress->dwDownloadSecsRemaining = -1;
1191 progress->dwInstallKBRemaining = 0;
1192 progress->dwInstallSecsRemaining = -1;
1211 TRACE(
"(%p)->(IID_IUnknown %p)\n", iface,
ppv);
1214 TRACE(
"(%p)->(IID_IClassFactory %p)\n", iface,
ppv);
1278 case DLL_WINE_PREATTACH:
ULONGLONG WINAPI GetTickCount64(VOID)
char * strcat(char *DstString, const char *SrcString)
ACPI_SIZE strlen(const char *String)
char * strcpy(char *DstString, const char *SrcString)
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static WCHAR * strdupW(const WCHAR *src)
const GUID IID_IClassFactory
#define DLL_PROCESS_ATTACH
static LPSTR strdupA(LPCSTR str)
BOOL WINAPI CopyFileW(IN LPCWSTR lpExistingFileName, IN LPCWSTR lpNewFileName, IN BOOL bFailIfExists)
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
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)
static UINT enum_components(const WCHAR *usersid, DWORD ctx, DWORD index, DWORD *idx, WCHAR guid[39], MSIINSTALLCONTEXT *installed_ctx, LPWSTR sid, LPDWORD sid_len)
GLuint GLuint GLsizei GLenum type
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
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
HRESULT WINAPI GetICifFileFromFile(ICifFile **icif, const char *path)
void component_set_downloaded(ICifComponent *iface, BOOL value)
char * component_get_id(ICifComponent *iface)
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
@ INSTALLSTATUS_INITIALIZING
@ INSTALLSTATUS_DOWNLOADFINISHED
@ INSTALLSTATUS_DOWNLOADING
@ INSTALLSTATUS_CHECKINGTRUST
static ULONG WINAPI InstallEngine_Release(IInstallEngine2 *iface)
static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL fLock)
static ULONG WINAPI InstallEngineTiming_Release(IInstallEngineTiming *iface)
static HRESULT WINAPI InstallEngine2_SetLocalCif(IInstallEngine2 *iface, const char *cif)
static HRESULT WINAPI InstallEngine_RegisterInstallEngineCallback(IInstallEngine2 *iface, IInstallEngineCallback *callback)
static InstallEngine * impl_from_IInstallEngineTiming(IInstallEngineTiming *iface)
static void set_status(InstallEngine *This, DWORD status)
static ULONG WINAPI downloadcb_Release(IBindStatusCallback *iface)
static HRESULT WINAPI InstallEngine_SetIStream(IInstallEngine2 *iface, IStream *stream)
static HRESULT WINAPI InstallEngine_SetCifFile(IInstallEngine2 *iface, const char *cab_name, const char *cif_name)
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
static const IInstallEngine2Vtbl InstallEngine2Vtbl
static HRESULT get_next_component(IEnumCifComponents *enum_comp, DWORD operation, ICifComponent **ret_comp)
static HRESULT WINAPI InstallEngine_SetHWND(IInstallEngine2 *iface, HWND hwnd)
static HRESULT WINAPI downloadcb_QueryInterface(IBindStatusCallback *iface, REFIID riid, void **ppv)
HRESULT WINAPI DllRegisterServer(void)
static HRESULT WINAPI InstallEngineCF_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv)
static HRESULT get_url(ICifComponent *comp, int index, char **url, DWORD *flags)
static HRESULT WINAPI InstallEngine_GetEngineStatus(IInstallEngine2 *iface, DWORD *status)
static HRESULT WINAPI InstallEngineTiming_GetRates(IInstallEngineTiming *iface, DWORD *download, DWORD *install)
static HRESULT WINAPI InstallEngine_IsComponentInstalled(IInstallEngine2 *iface, const char *id, DWORD *status)
static HRESULT calc_sizes(IEnumCifComponents *enum_comp, DWORD operation, DWORD *size_download, DWORD *size_install)
static HRESULT WINAPI downloadcb_GetPriority(IBindStatusCallback *iface, LONG *priority)
static HRESULT start_installation(InstallEngine *This, DWORD operation, DWORD jobflags)
static HRESULT WINAPI InstallEngine_LaunchExtraCommand(IInstallEngine2 *iface, const char *inf_name, const char *section)
static HRESULT WINAPI InstallEngine_SetInstallOptions(IInstallEngine2 *iface, DWORD flags)
static HRESULT WINAPI InstallEngine_SetBaseUrl(IInstallEngine2 *iface, const char *base_name)
static HRESULT process_component(InstallEngine *This, ICifComponent *comp)
static HRESULT generate_moniker(char *baseurl, char *url, DWORD flags, IMoniker **moniker)
static HRESULT download_url(InstallEngine *This, char *id, char *display, char *url, DWORD flags, DWORD dl_size)
static char * merge_path(char *path1, char *path2)
static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
static HINSTANCE instance
static struct downloadcb * impl_from_IBindStatusCallback(IBindStatusCallback *iface)
static char * combine_url(char *baseurl, char *url)
static HRESULT WINAPI InstallEngine2_GetICifFile(IInstallEngine2 *iface, ICifFile **cif_file)
static HRESULT WINAPI InstallEngine_SetInstallDrive(IInstallEngine2 *iface, char drive)
static HRESULT WINAPI InstallEngine_GetDisplayName(IInstallEngine2 *iface, const char *id, const char *name)
BOOL WINAPI CheckTrustEx(LPVOID a, LPVOID b, LPVOID c, LPVOID d, LPVOID e)
static const IBindStatusCallbackVtbl BindStatusCallbackVtbl
static HRESULT WINAPI downloadcb_OnStopBinding(IBindStatusCallback *iface, HRESULT hresult, LPCWSTR szError)
static InstallEngine * impl_from_IInstallEngine2(IInstallEngine2 *iface)
static const IClassFactoryVtbl InstallEngineCFVtbl
static HRESULT WINAPI InstallEngine_UnregisterInstallEngineCallback(IInstallEngine2 *iface)
HRESULT WINAPI DllUnregisterServer(void)
HRESULT WINAPI DllInstall(BOOL bInstall, LPCWSTR cmdline)
DWORD WINAPI thread_installation(LPVOID param)
static HRESULT WINAPI InstallEngine_DownloadComponents(IInstallEngine2 *iface, DWORD flags)
static HRESULT process_component_dependencies(InstallEngine *This, ICifComponent *comp)
static HRESULT WINAPI downloadcb_OnDataAvailable(IBindStatusCallback *iface, DWORD grfBSCF, DWORD dwSize, FORMATETC *pformatetc, STGMEDIUM *pstgmed)
static HRESULT WINAPI InstallEngine_SetAction(IInstallEngine2 *iface, const char *id, DWORD action, DWORD priority)
static ULONG WINAPI downloadcb_AddRef(IBindStatusCallback *iface)
static HRESULT WINAPI InstallEngineTiming_QueryInterface(IInstallEngineTiming *iface, REFIID riid, void **ppv)
static HRESULT WINAPI InstallEngineTiming_GetInstallProgress(IInstallEngineTiming *iface, INSTALLPROGRESS *progress)
static HRESULT WINAPI InstallEngine_SetDownloadDir(IInstallEngine2 *iface, const char *download_dir)
static ULONG WINAPI InstallEngineTiming_AddRef(IInstallEngineTiming *iface)
static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
static HRESULT WINAPI InstallEngine_Suspend(IInstallEngine2 *iface)
static HRESULT WINAPI downloadcb_OnProgress(IBindStatusCallback *iface, ULONG progress, ULONG progress_max, ULONG status, const WCHAR *status_text)
static HRESULT WINAPI downloadcb_OnStartBinding(IBindStatusCallback *iface, DWORD reserved, IBinding *pbind)
static HRESULT WINAPI InstallEngine_GetSizes(IInstallEngine2 *iface, const char *id, COMPONENT_SIZES *sizes)
static HRESULT WINAPI downloadcb_OnObjectAvailable(IBindStatusCallback *iface, REFIID riid, IUnknown *punk)
static HRESULT WINAPI downloadcb_GetBindInfo(IBindStatusCallback *iface, DWORD *grfBINDF, BINDINFO *pbindinfo)
static ULONG WINAPI InstallEngine_AddRef(IInstallEngine2 *iface)
static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface)
static const IInstallEngineTimingVtbl InstallEngineTimingVtbl
static HRESULT WINAPI InstallEngine_Resume(IInstallEngine2 *iface)
static HRESULT WINAPI downloadcb_OnLowResource(IBindStatusCallback *iface, DWORD reserved)
static HRESULT WINAPI InstallEngine_Abort(IInstallEngine2 *iface, DWORD flags)
static HRESULT WINAPI InstallEngine_EnumDownloadIDs(IInstallEngine2 *iface, UINT index, char **id)
HRESULT WINAPI DllCanUnloadNow(void)
static HRESULT WINAPI InstallEngine_InstallComponents(IInstallEngine2 *iface, DWORD flags)
static HRESULT WINAPI InstallEngine_QueryInterface(IInstallEngine2 *iface, REFIID riid, void **ppv)
static HRESULT downloadcb_create(InstallEngine *engine, HANDLE event, char *file_name, char *id, char *display, DWORD dl_size, struct downloadcb **callback)
static HRESULT WINAPI InstallEngine_EnumInstallIDs(IInstallEngine2 *iface, UINT index, char **id)
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
static IClassFactory InstallEngineCF
static LPWSTR strAtoW(const char *str)
#define InterlockedCompareExchange
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
static IPrintDialogCallback callback
static HMODULE MODULEINFO DWORD cb
static const WCHAR path1[]
static const WCHAR path2[]
static const struct @541 sizes[]
#define IsEqualGUID(rguid1, rguid2)
HRESULT __wine_unregister_resources(HMODULE module) DECLSPEC_HIDDEN
HRESULT __wine_register_resources(HMODULE module) DECLSPEC_HIDDEN
_CRT_RESTORE_GCC_WARNINGS _CRT_DISABLE_GCC_WARNINGS _Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strrchr(_In_z_ const char *_Str, _In_ int _Ch)
IInstallEngineTiming IInstallEngineTiming_iface
IInstallEngine2 IInstallEngine2_iface
struct thread_info thread
IInstallEngineCallback * callback
IBindStatusCallback IBindStatusCallback_iface
IEnumCifComponents * enum_comp
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
#define CONTAINING_RECORD(address, type, field)
HRESULT WINAPI CreateURLMoniker(IMoniker *pmkContext, LPCWSTR szURL, IMoniker **ppmk)
HRESULT WINAPI CreateAsyncBindCtx(DWORD reserved, IBindStatusCallback *callback, IEnumFORMATETC *format, IBindCtx **pbind)
DWORD WINAPI GetLastError(void)
#define CLASS_E_CLASSNOTAVAILABLE