msi: Stub out a few more Installer object methods.

This commit is contained in:
James Hawkins 2009-12-10 17:01:43 -08:00 committed by Alexandre Julliard
parent 9ab7d9e21a
commit ae58e29e5e
4 changed files with 123 additions and 19 deletions

View File

@ -1624,6 +1624,15 @@ static HRESULT WINAPI InstallerImpl_Invoke(
else return DISP_E_MEMBERNOTFOUND;
break;
case DISPID_INSTALLER_OPENPRODUCT:
if (wFlags & DISPATCH_METHOD)
{
VariantInit(pVarResult);
FIXME("Unhandled method: OpenProduct");
}
else return DISP_E_MEMBERNOTFOUND;
break;
case DISPID_INSTALLER_OPENDATABASE:
if (wFlags & DISPATCH_METHOD)
{
@ -1658,6 +1667,15 @@ static HRESULT WINAPI InstallerImpl_Invoke(
else return DISP_E_MEMBERNOTFOUND;
break;
case DISPID_INSTALLER_SUMMARYINFORMATION:
if (wFlags & DISPATCH_METHOD)
{
VariantInit(pVarResult);
FIXME("Unhandled method: SummaryInformation");
}
else return DISP_E_MEMBERNOTFOUND;
break;
case DISPID_INSTALLER_UILEVEL:
if (wFlags & DISPATCH_PROPERTYPUT)
{
@ -1683,6 +1701,15 @@ static HRESULT WINAPI InstallerImpl_Invoke(
else return DISP_E_MEMBERNOTFOUND;
break;
case DISPID_INSTALLER_ENABLELOG:
if (wFlags & DISPATCH_METHOD)
{
VariantInit(pVarResult);
FIXME("Unhandled method: EnableLog");
}
else return DISP_E_MEMBERNOTFOUND;
break;
case DISPID_INSTALLER_INSTALLPRODUCT:
if (wFlags & DISPATCH_METHOD)
{
@ -1725,6 +1752,15 @@ static HRESULT WINAPI InstallerImpl_Invoke(
else return DISP_E_MEMBERNOTFOUND;
break;
case DISPID_INSTALLER_LASTERRORRECORD:
if (wFlags & DISPATCH_METHOD)
{
VariantInit(pVarResult);
FIXME("Unhandled method: LastErrorRecord");
}
else return DISP_E_MEMBERNOTFOUND;
break;
case DISPID_INSTALLER_REGISTRYVALUE:
if (wFlags & DISPATCH_METHOD) {
HKEY hkey;
@ -1819,6 +1855,42 @@ static HRESULT WINAPI InstallerImpl_Invoke(
else return DISP_E_MEMBERNOTFOUND;
break;
case DISPID_INSTALLER_ENVIRONMENT:
if (wFlags & DISPATCH_PROPERTYGET || wFlags & DISPATCH_PROPERTYPUT)
{
VariantInit(pVarResult);
FIXME("Unhandled property: Environment");
}
else return DISP_E_MEMBERNOTFOUND;
break;
case DISPID_INSTALLER_FILEATTRIBUTES:
if (wFlags & DISPATCH_METHOD)
{
VariantInit(pVarResult);
FIXME("Unhandled method: FileAttributes");
}
else return DISP_E_MEMBERNOTFOUND;
break;
case DISPID_INSTALLER_FILESIZE:
if (wFlags & DISPATCH_METHOD)
{
VariantInit(pVarResult);
FIXME("Unhandled method: FileSize");
}
else return DISP_E_MEMBERNOTFOUND;
break;
case DISPID_INSTALLER_FILEVERSION:
if (wFlags & DISPATCH_METHOD)
{
VariantInit(pVarResult);
FIXME("Unhandled method: FileVersion");
}
else return DISP_E_MEMBERNOTFOUND;
break;
case DISPID_INSTALLER_PRODUCTSTATE:
if (wFlags & DISPATCH_PROPERTYGET) {
hr = DispGetParam(pDispParams, 0, VT_BSTR, &varg0, puArgErr);

View File

@ -152,21 +152,48 @@ library WindowsInstaller
Session* OpenPackage(
[in] VARIANT PackagePath,
[in, optional, defaultvalue(0)] long Options);
[id(DISPID_INSTALLER_OPENPRODUCT)]
Session* OpenProduct(
[in] BSTR ProductCode);
[id(DISPID_INSTALLER_SUMMARYINFORMATION)]
SummaryInfo* SummaryInformation(
[in] BSTR PackagePath,
[in, optional, defaultvalue(0)] long UpdateCount);
[id(DISPID_INSTALLER_OPENDATABASE)]
Database *OpenDatabase(
[in] BSTR DatabasePath,
[in] VARIANT OpenMode);
[id(DISPID_INSTALLER_ENABLELOG)]
void EnableLog(
[in] BSTR LogMode,
[in] BSTR LogFile);
[id(DISPID_INSTALLER_INSTALLPRODUCT)]
void InstallProduct(
[in] BSTR PackagePath,
[in, optional, defaultvalue("0")] BSTR PropertyValues);
[id(DISPID_INSTALLER_VERSION)]
BSTR Version();
[id(DISPID_INSTALLER_LASTERRORRECORD)]
Record* LastErrorRecord();
[id(DISPID_INSTALLER_REGISTRYVALUE), propget]
BSTR RegistryValue(
[in] VARIANT Root,
[in] BSTR Key,
[in, optional] VARIANT Value);
[id(DISPID_INSTALLER_ENVIRONMENT), propget]
BSTR Environment([in] BSTR Variable);
[id(DISPID_INSTALLER_ENVIRONMENT), propput]
void Environment(
[in] BSTR Variable,
[in] BSTR rhs);
[id(DISPID_INSTALLER_FILEATTRIBUTES)]
long FileAttributes([in] BSTR FilePath);
[id(DISPID_INSTALLER_FILESIZE)]
long FileSize([in] BSTR FilePath);
[id(DISPID_INSTALLER_FILEVERSION)]
BSTR FileVersion(
[in] BSTR FilePath,
[in, optional] VARIANT Language);
[id(DISPID_INSTALLER_PRODUCTSTATE), propget]
MsiInstallState ProductState(
[in] BSTR Product);

View File

@ -18,11 +18,19 @@
#define DISPID_INSTALLER_CREATERECORD 1
#define DISPID_INSTALLER_OPENPACKAGE 2
#define DISPID_INSTALLER_OPENPRODUCT 3
#define DISPID_INSTALLER_OPENDATABASE 4
#define DISPID_INSTALLER_SUMMARYINFORMATION 5
#define DISPID_INSTALLER_UILEVEL 6
#define DISPID_INSTALLER_ENABLELOG 7
#define DISPID_INSTALLER_INSTALLPRODUCT 8
#define DISPID_INSTALLER_VERSION 9
#define DISPID_INSTALLER_LASTERRORRECORD 10
#define DISPID_INSTALLER_REGISTRYVALUE 11
#define DISPID_INSTALLER_ENVIRONMENT 12
#define DISPID_INSTALLER_FILEATTRIBUTES 13
#define DISPID_INSTALLER_FILESIZE 15
#define DISPID_INSTALLER_FILEVERSION 16
#define DISPID_INSTALLER_PRODUCTSTATE 17
#define DISPID_INSTALLER_PRODUCTINFO 18
#define DISPID_INSTALLER_PRODUCTS 35

View File

@ -477,35 +477,32 @@ static void test_dispid(void)
ok(dispid == 1, "Expected 1, got %d\n", dispid);
dispid = get_dispid(pInstaller, "OpenPackage");
ok(dispid == 2, "Expected 2, got %d\n", dispid);
dispid = get_dispid(pInstaller, "OpenProduct");
ok(dispid == 3, "Expected 3, got %d\n", dispid);
dispid = get_dispid(pInstaller, "OpenDatabase");
ok(dispid == 4, "Expected 4, got %d\n", dispid);
dispid = get_dispid(pInstaller, "SummaryInformation");
ok(dispid == 5, "Expected 5, got %d\n", dispid);
dispid = get_dispid( pInstaller, "UILevel" );
ok(dispid == 6, "Expected 6, got %d\n", dispid);
dispid = get_dispid(pInstaller, "EnableLog");
ok(dispid == 7, "Expected 7, got %d\n", dispid);
dispid = get_dispid(pInstaller, "InstallProduct");
ok(dispid == 8, "Expected 8, got %d\n", dispid);
dispid = get_dispid(pInstaller, "Version");
ok(dispid == 9, "Expected 9, got %d\n", dispid);
dispid = get_dispid(pInstaller, "LastErrorRecord");
ok(dispid == 10, "Expected 10, got %d\n", dispid);
dispid = get_dispid(pInstaller, "RegistryValue");
ok(dispid == 11, "Expected 11, got %d\n", dispid);
todo_wine
{
dispid = get_dispid(pInstaller, "OpenProduct");
ok(dispid == 3, "Expected 3, got %d\n", dispid);
dispid = get_dispid(pInstaller, "SummaryInformation");
ok(dispid == 5, "Expected 5, got %d\n", dispid);
dispid = get_dispid(pInstaller, "EnableLog");
ok(dispid == 7, "Expected 7, got %d\n", dispid);
dispid = get_dispid(pInstaller, "LastErrorRecord");
ok(dispid == 10, "Expected 10, got %d\n", dispid);
dispid = get_dispid(pInstaller, "Environment");
ok(dispid == 12, "Expected 12, got %d\n", dispid);
dispid = get_dispid(pInstaller, "FileAttributes");
ok(dispid == 13, "Expected 13, got %d\n", dispid);
dispid = get_dispid(pInstaller, "FileSize");
ok(dispid == 15, "Expected 15, got %d\n", dispid);
dispid = get_dispid(pInstaller, "FileVersion");
ok(dispid == 16, "Expected 16, got %d\n", dispid);
}
dispid = get_dispid(pInstaller, "Environment");
ok(dispid == 12, "Expected 12, got %d\n", dispid);
dispid = get_dispid(pInstaller, "FileAttributes");
ok(dispid == 13, "Expected 13, got %d\n", dispid);
dispid = get_dispid(pInstaller, "FileSize");
ok(dispid == 15, "Expected 15, got %d\n", dispid);
dispid = get_dispid(pInstaller, "FileVersion");
ok(dispid == 16, "Expected 16, got %d\n", dispid);
dispid = get_dispid(pInstaller, "ProductState");
ok(dispid == 17, "Expected 17, got %d\n", dispid);
dispid = get_dispid(pInstaller, "ProductInfo");