summaryrefslogtreecommitdiff
path: root/setup_native/source/win32/customactions/patch/swappatchfiles.cxx
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2006-06-20 02:36:43 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2006-06-20 02:36:43 +0000
commitfb46e6ef9bc56a4f15e8469db1d439e4d798422e (patch)
tree2b12fda56e6c64d676ff439b85d62ae500024fb6 /setup_native/source/win32/customactions/patch/swappatchfiles.cxx
parentca25c4cbaa96d15b60e8826efb38d460d4aebf13 (diff)
INTEGRATION: CWS warnings01 (1.7.6); FILE MERGED
2006/04/20 14:25:29 sb 1.7.6.3: #i53898# Made code warning-free again after resync to SRC680m162. 2006/04/07 20:57:29 sb 1.7.6.2: RESYNC: (1.7-1.9); FILE MERGED 2006/01/31 13:35:16 sb 1.7.6.1: #i53898# Made code warning-free.
Diffstat (limited to 'setup_native/source/win32/customactions/patch/swappatchfiles.cxx')
-rwxr-xr-xsetup_native/source/win32/customactions/patch/swappatchfiles.cxx33
1 files changed, 6 insertions, 27 deletions
diff --git a/setup_native/source/win32/customactions/patch/swappatchfiles.cxx b/setup_native/source/win32/customactions/patch/swappatchfiles.cxx
index 4a36142e4a7f..5dec1493d970 100755
--- a/setup_native/source/win32/customactions/patch/swappatchfiles.cxx
+++ b/setup_native/source/win32/customactions/patch/swappatchfiles.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: swappatchfiles.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: rt $ $Date: 2006-03-06 14:03:30 $
+ * last change: $Author: hr $ $Date: 2006-06-20 03:36:43 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -33,9 +33,12 @@
*
************************************************************************/
+#pragma warning(push, 1) /* disable warnings within system headers */
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <msiquery.h>
+#pragma warning(pop)
+
#include <malloc.h>
#include <assert.h>
@@ -162,30 +165,6 @@ static inline void SetMsiProperty(MSIHANDLE handle, const std::_tstring& sProper
MsiSetProperty(handle, sProperty.c_str(), TEXT("1"));
}
-static bool RegistryKeyHasUpgradeSubKey(HKEY hRootKey, const std::_tstring& regKey, const std::_tstring& upgradeKey)
-{
- HKEY hKey;
- if (RegOpenKey(hRootKey, regKey.c_str(), &hKey) == ERROR_SUCCESS)
- {
- DWORD nSubKeys;
- DWORD lLongestSubKey;
-
- if (RegQueryInfoKey(
- hKey, NULL, NULL, NULL, &nSubKeys, &lLongestSubKey, NULL, NULL, NULL, NULL, NULL, NULL) == ERROR_SUCCESS)
- {
- LPTSTR buffer = reinterpret_cast<LPTSTR>(_alloca(lLongestSubKey + 1));
-
- for (DWORD i = 0; i < nSubKeys; i++)
- {
- LONG ret = RegEnumKey(hKey, i, buffer, lLongestSubKey + 1);
- if ((ret == ERROR_SUCCESS) && (buffer == upgradeKey))
- return true;
- }
- }
- }
- return false;
-}
-
static BOOL MoveFileEx9x( LPCSTR lpExistingFileNameA, LPCSTR lpNewFileNameA, DWORD dwFlags )
{
BOOL fSuccess = FALSE; // assume failure
@@ -490,7 +469,7 @@ extern "C" UINT __stdcall IsOfficeRunning( MSIHANDLE handle )
if ( IsValidHandle(hFind) )
{
- BOOL fSuccess;
+ BOOL fSuccess = false;
bool fRenameSucceeded;
do