MSICOSTTREE_SELFONLY, INSTALLSTATE_LOCAL, &each_cost)))
{
/* each_cost is in 512-byte units */
- total_cost += each_cost * 512;
+ total_cost += ((LONGLONG)each_cost) * 512;
}
if (ERROR_SUCCESS == (MSI_GetFeatureCost(dialog->package, feature,
MSICOSTTREE_SELFONLY, INSTALLSTATE_ABSENT, &each_cost)))
{
/* each_cost is in 512-byte units */
- total_cost -= each_cost * 512;
+ total_cost -= ((LONGLONG)each_cost) * 512;
}
}
return total_cost;
MSIINSTALLCONTEXT context = MSIINSTALLCONTEXT_USERUNMANAGED;
UINT r = ERROR_UNKNOWN_PROPERTY;
HKEY prodkey, userdata, source;
- WCHAR *val = NULL, squashed_pc[SQUASHED_GUID_SIZE], packagecode[SQUASHED_GUID_SIZE];
+ WCHAR *val = NULL, squashed_pc[SQUASHED_GUID_SIZE], packagecode[GUID_SIZE];
BOOL badconfig = FALSE;
LONG res;
DWORD type = REG_NONE;
if (lstrlenW(val) >= *pccbValue)
{
- lstrcpynW(szValue, val, *pccbValue);
- *pccbValue = lstrlenW(val);
+ if (szValue) lstrcpynW(szValue, val, *pccbValue);
r = ERROR_MORE_DATA;
}
else
{
- lstrcpyW(szValue, val);
- *pccbValue = lstrlenW(val);
+ if (szValue) lstrcpyW(szValue, val);
r = ERROR_SUCCESS;
}
+ *pccbValue = lstrlenW(val);
+
done:
if (view)
{
return MsiUseFeatureExA(szProduct, szFeature, 0, 0);
}
-WCHAR *reg_get_multisz( HKEY hkey, const WCHAR *name )
+static WCHAR *reg_get_multisz( HKEY hkey, const WCHAR *name )
{
WCHAR *ret;
DWORD len, type;
return ret;
}
-WCHAR *reg_get_sz( HKEY hkey, const WCHAR *name )
+static WCHAR *reg_get_sz( HKEY hkey, const WCHAR *name )
{
WCHAR *ret;
DWORD len, type;
11 stdcall MsiConfigureFeatureA(str str long)
12 stub MsiConfigureFeatureFromDescriptorA
13 stub MsiConfigureFeatureFromDescriptorW
-14 stdcall MsiConfigureFeatureW(wstr wstr ptr)
+14 stdcall MsiConfigureFeatureW(wstr wstr long)
15 stdcall MsiConfigureProductA(str long long)
16 stdcall MsiConfigureProductW(wstr long long)
17 stdcall MsiCreateRecord(long)
64 stdcall MsiGetMode(long long)
65 stdcall MsiGetProductCodeA(str str)
66 stdcall MsiGetProductCodeW(wstr wstr)
-67 stdcall MsiGetProductInfoA(str str ptr long)
+67 stdcall MsiGetProductInfoA(str str ptr ptr)
68 stub MsiGetProductInfoFromScriptA
69 stub MsiGetProductInfoFromScriptW
-70 stdcall MsiGetProductInfoW(wstr wstr ptr long)
+70 stdcall MsiGetProductInfoW(wstr wstr ptr ptr)
71 stdcall MsiGetProductPropertyA(long str ptr ptr)
72 stdcall MsiGetProductPropertyW(long wstr ptr ptr)
73 stdcall MsiGetPropertyA(ptr str ptr ptr)
86 stub MsiInstallMissingFileW
87 stdcall MsiInstallProductA(str str)
88 stdcall MsiInstallProductW(wstr wstr)
-89 stdcall MsiLocateComponentA(str ptr long)
-90 stdcall MsiLocateComponentW(wstr ptr long)
+89 stdcall MsiLocateComponentA(str ptr ptr)
+90 stdcall MsiLocateComponentW(wstr ptr ptr)
91 stdcall MsiOpenDatabaseA(str str ptr)
92 stdcall MsiOpenDatabaseW(wstr wstr ptr)
93 stdcall MsiOpenPackageA(str ptr)
UINT MSIREG_OpenUserComponentsKey(LPCWSTR szComponent, HKEY *key, BOOL create)
{
WCHAR squashed_cc[SQUASHED_GUID_SIZE], keypath[0x200];
+ REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
UINT ret;
if (!squash_guid( szComponent, squashed_cc)) return ERROR_FUNCTION_FAILED;
strcpyW(keypath, szInstaller_Components);
strcatW( keypath, squashed_cc );
- return RegOpenKeyW(HKEY_LOCAL_MACHINE, keypath, key);
+ return RegOpenKeyExW( HKEY_LOCAL_MACHINE, keypath, 0, access, key );
}
UINT MSIREG_OpenUserDataComponentKey(LPCWSTR szComponent, LPCWSTR szUserSid, HKEY *key, BOOL create)
UINT MSIREG_DeleteUpgradeCodesKey( const WCHAR *code )
{
- WCHAR squashed_code[SQUASHED_GUID_SIZE], keypath[0x200];
+ WCHAR squashed_code[SQUASHED_GUID_SIZE];
+ REGSAM access = KEY_WOW64_64KEY | KEY_ALL_ACCESS;
+ HKEY hkey;
+ LONG ret;
if (!squash_guid( code, squashed_code )) return ERROR_FUNCTION_FAILED;
TRACE( "%s squashed %s\n", debugstr_w(code), debugstr_w(squashed_code) );
- strcpyW( keypath, szInstaller_UpgradeCodes );
- strcatW( keypath, squashed_code );
- return RegDeleteTreeW( HKEY_LOCAL_MACHINE, keypath );
+ if (RegOpenKeyExW( HKEY_LOCAL_MACHINE, szInstaller_UpgradeCodes, 0, access, &hkey )) return ERROR_SUCCESS;
+ ret = RegDeleteTreeW( hkey, squashed_code );
+ RegCloseKey( hkey );
+ return ret;
}
UINT MSIREG_DeleteUserUpgradeCodesKey(LPCWSTR szUpgradeCode)
reactos/dll/win32/msgsm32.acm # Synced to WineStaging-1.9.11
reactos/dll/win32/mshtml # Synced to WineStaging-1.7.55
reactos/dll/win32/mshtml.tlb # Synced to WineStaging-1.7.55
-reactos/dll/win32/msi # Synced to WineStaging-1.9.23
+reactos/dll/win32/msi # Synced to WineStaging-2.2
reactos/dll/win32/msimg32 # Synced to WineStaging-1.9.11
reactos/dll/win32/msimtf # Synced to WineStaging-1.9.23
reactos/dll/win32/msisip # Synced to WineStaging-1.9.11