msi: automation: Implement Session::Installer.

This commit is contained in:
Misha Koshelev 2007-05-04 23:18:40 -05:00 committed by Alexandre Julliard
parent 8ba0b3c7b9
commit c7e7f36e77
4 changed files with 15 additions and 6 deletions

View File

@ -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);

View File

@ -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]

View File

@ -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

View File

@ -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));