From 1a275aec57f5a69ec7957605e3644fd66f87397c Mon Sep 17 00:00:00 2001 From: Misha Koshelev Date: Sat, 3 Mar 2007 16:42:46 -0600 Subject: msi: automation: Implement Session::DoAction. --- dlls/msi/automation.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 39 insertions(+), 0 deletions(-) diff --git a/dlls/msi/automation.c b/dlls/msi/automation.c index 3947a44..98ddfb7 100644 --- a/dlls/msi/automation.c +++ b/dlls/msi/automation.c @@ -854,6 +854,45 @@ HRESULT WINAPI SessionImpl_Invoke( } break; + case DISPID_SESSION_DOACTION: + if (wFlags & DISPATCH_METHOD) { + hr = DispGetParam(pDispParams, 0, VT_BSTR, &varg0, puArgErr); + if (FAILED(hr)) return hr; + ret = MsiDoActionW(This->msiHandle, V_BSTR(&varg0)); + V_VT(pVarResult) = VT_I4; + switch (ret) + { + case ERROR_FUNCTION_NOT_CALLED: + V_I4(pVarResult) = msiDoActionStatusNoAction; + break; + case ERROR_SUCCESS: + V_I4(pVarResult) = msiDoActionStatusSuccess; + break; + case ERROR_INSTALL_USEREXIT: + V_I4(pVarResult) = msiDoActionStatusUserExit; + break; + case ERROR_INSTALL_FAILURE: + V_I4(pVarResult) = msiDoActionStatusFailure; + break; + case ERROR_INSTALL_SUSPEND: + V_I4(pVarResult) = msiDoActionStatusSuspend; + break; + case ERROR_MORE_DATA: + V_I4(pVarResult) = msiDoActionStatusFinished; + break; + case ERROR_INVALID_HANDLE_STATE: + V_I4(pVarResult) = msiDoActionStatusWrongState; + break; + case ERROR_INVALID_DATA: + V_I4(pVarResult) = msiDoActionStatusBadActionData; + break; + default: + FIXME("MsiDoAction returned unhandled value %d\n", ret); + return DISP_E_EXCEPTION; + } + } + break; + case DISPID_SESSION_FEATURECURRENTSTATE: if (wFlags & DISPATCH_PROPERTYGET) { hr = DispGetParam(pDispParams, 0, VT_BSTR, &varg0, puArgErr); -- 1.4.1