From b79311b17573c30fc623f32d9955938cbd126fb4 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Sat, 14 Jan 2012 16:38:58 +0300 Subject: [PATCH] msi: Create installer object initializing automation object data. --- dlls/msi/automation.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/dlls/msi/automation.c b/dlls/msi/automation.c index b416007a324..933698fb152 100644 --- a/dlls/msi/automation.c +++ b/dlls/msi/automation.c @@ -2410,10 +2410,29 @@ static HRESULT InstallerImpl_Invoke( } } -/* Wrapper around create_automation_object to create an installer object. */ -HRESULT create_msiserver(IUnknown *pOuter, LPVOID *ppObj) +HRESULT create_msiserver(IUnknown *outer, void **ppObj) { - return create_automation_object(0, pOuter, ppObj, &DIID_Installer, InstallerImpl_Invoke, NULL, 0); + AutomationObject *installer; + HRESULT hr; + + TRACE("(%p %p)\n", outer, ppObj); + + if (outer) + return CLASS_E_NOAGGREGATION; + + installer = msi_alloc(sizeof(AutomationObject)); + if (!installer) return E_OUTOFMEMORY; + + hr = init_automation_object(installer, 0, &DIID_Installer, InstallerImpl_Invoke, NULL); + if (hr != S_OK) + { + msi_free(installer); + return hr; + } + + *ppObj = &installer->IDispatch_iface; + + return hr; } HRESULT create_session(MSIHANDLE msiHandle, IDispatch *installer, IDispatch **disp)