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( ...@@ -686,6 +686,14 @@ static HRESULT WINAPI SessionImpl_Invoke(
switch (dispIdMember) 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: case DISPID_SESSION_PROPERTY:
if (wFlags & DISPATCH_PROPERTYGET) { if (wFlags & DISPATCH_PROPERTYGET) {
hr = DispGetParam(pDispParams, 0, VT_BSTR, &varg0, puArgErr); hr = DispGetParam(pDispParams, 0, VT_BSTR, &varg0, puArgErr);
......
...@@ -163,6 +163,8 @@ library WindowsInstaller ...@@ -163,6 +163,8 @@ library WindowsInstaller
{ {
properties: properties:
methods: methods:
[id(DISPID_SESSION_INSTALLER), propget]
Installer *Installer();
[id(DISPID_SESSION_PROPERTY), propget] [id(DISPID_SESSION_PROPERTY), propget]
BSTR Property([in] BSTR PropertyName); BSTR Property([in] BSTR PropertyName);
[id(DISPID_SESSION_PROPERTY), propput] [id(DISPID_SESSION_PROPERTY), propput]
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#define DISPID_DATABASE_OPENVIEW 3 #define DISPID_DATABASE_OPENVIEW 3
#define DISPID_SESSION_INSTALLER 1
#define DISPID_SESSION_PROPERTY 2 #define DISPID_SESSION_PROPERTY 2
#define DISPID_SESSION_LANGUAGE 3 #define DISPID_SESSION_LANGUAGE 3
#define DISPID_SESSION_MODE 4 #define DISPID_SESSION_MODE 4
......
...@@ -908,12 +908,10 @@ static void test_Session(IDispatch *pSession) ...@@ -908,12 +908,10 @@ static void test_Session(IDispatch *pSession)
HRESULT hr; HRESULT hr;
/* Session::Installer */ /* Session::Installer */
todo_wine { hr = Session_Installer(pSession, &pInst);
hr = Session_Installer(pSession, &pInst); ok(SUCCEEDED(hr), "Session_Installer failed, hresult 0x%08x\n", hr);
ok(SUCCEEDED(hr), "Session_Installer failed, hresult 0x%08x\n", hr); ok(pInst != NULL, "Session_Installer returned NULL IDispatch pointer\n");
ok(pInst != NULL, "Session_Installer returned NULL IDispatch pointer\n"); ok(pInst == pInstaller, "Session_Installer does not match Installer instance from CoCreateInstance\n");
ok(pInst == pInstaller, "Session_Installer does not match Installer instance from CoCreateInstance\n");
}
/* Session::Property, get */ /* Session::Property, get */
memset(stringw, 0, sizeof(stringw)); 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