Commit c7e7f36e authored by Misha Koshelev's avatar Misha Koshelev Committed by Alexandre Julliard

msi: automation: Implement Session::Installer.

parent 8ba0b3c7
......@@ -686,6 +686,14 @@ static HRESULT WINAPI SessionImpl_Invoke(
switch (dispIdMember)
{
case DISPID_SESSION_INSTALLER:
if (wFlags & DISPATCH_PROPERTYGET) {
V_VT(pVarResult) = VT_DISPATCH;
IDispatch_AddRef(This->pInstaller);
V_DISPATCH(pVarResult) = This->pInstaller;
}
break;
case DISPID_SESSION_PROPERTY:
if (wFlags & DISPATCH_PROPERTYGET) {
hr = DispGetParam(pDispParams, 0, VT_BSTR, &varg0, puArgErr);
......
......@@ -163,6 +163,8 @@ library WindowsInstaller
{
properties:
methods:
[id(DISPID_SESSION_INSTALLER), propget]
Installer *Installer();
[id(DISPID_SESSION_PROPERTY), propget]
BSTR Property([in] BSTR PropertyName);
[id(DISPID_SESSION_PROPERTY), propput]
......
......@@ -26,6 +26,7 @@
#define DISPID_DATABASE_OPENVIEW 3
#define DISPID_SESSION_INSTALLER 1
#define DISPID_SESSION_PROPERTY 2
#define DISPID_SESSION_LANGUAGE 3
#define DISPID_SESSION_MODE 4
......
......@@ -908,12 +908,10 @@ static void test_Session(IDispatch *pSession)
HRESULT hr;
/* Session::Installer */
todo_wine {
hr = Session_Installer(pSession, &pInst);
ok(SUCCEEDED(hr), "Session_Installer failed, hresult 0x%08x\n", hr);
ok(pInst != NULL, "Session_Installer returned NULL IDispatch pointer\n");
ok(pInst == pInstaller, "Session_Installer does not match Installer instance from CoCreateInstance\n");
}
hr = Session_Installer(pSession, &pInst);
ok(SUCCEEDED(hr), "Session_Installer failed, hresult 0x%08x\n", hr);
ok(pInst != NULL, "Session_Installer returned NULL IDispatch pointer\n");
ok(pInst == pInstaller, "Session_Installer does not match Installer instance from CoCreateInstance\n");
/* Session::Property, get */
memset(stringw, 0, sizeof(stringw));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment