summaryrefslogtreecommitdiff
path: root/setup_native
diff options
context:
space:
mode:
authorTobias Krause <tkr@openoffice.org>2009-11-10 07:31:09 +0000
committerTobias Krause <tkr@openoffice.org>2009-11-10 07:31:09 +0000
commit021e02cc8743c3b5af0754f8c43627e3d30cf8ed (patch)
treeb5245939fb778ba095c3716e6ac01200c420cbbe /setup_native
parente16ad188b3c787401ff1658b20f5bcc753b854c1 (diff)
#105892# define KEY_WOW64_64KEY for mingw
Diffstat (limited to 'setup_native')
-rwxr-xr-xsetup_native/source/win32/customactions/reg64/reg64.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/setup_native/source/win32/customactions/reg64/reg64.cxx b/setup_native/source/win32/customactions/reg64/reg64.cxx
index cecb633167a7..09ac5f6ce983 100755
--- a/setup_native/source/win32/customactions/reg64/reg64.cxx
+++ b/setup_native/source/win32/customactions/reg64/reg64.cxx
@@ -223,8 +223,9 @@ wchar_t* GetBasisInstallLocation( MSIHANDLE hMSI )
bool QueryReg64Table(MSIHANDLE& rhDatabase, MSIHANDLE& rhView)
{
OutputDebugStringFormat(L"QueryReg64Table - START\n" );
- wchar_t szSelect[400];
- wsprintf(szSelect, L"SELECT * FROM %s",TABLE_NAME);
+ int const arraysize = 400;
+ wchar_t szSelect[arraysize];
+ StringCbPrintfW(szSelect, arraysize * sizeof(wchar_t), L"SELECT * FROM %s",TABLE_NAME);
OutputDebugStringFormat( szSelect );
UINT ret = MsiDatabaseOpenView(rhDatabase,szSelect,&rhView);
@@ -250,8 +251,15 @@ bool QueryReg64Table(MSIHANDLE& rhDatabase, MSIHANDLE& rhView)
//---------------------------------------
bool DeleteRegistryKey(HKEY RootKey, const wchar_t* KeyName)
{
+
+// 10.11.2009 tkr: MinGW doesn't know anything about RegDeleteKeyEx.
+#if (WINVER >= 0x0502)
int rc = RegDeleteKeyEx(
RootKey, KeyName, KEY_WOW64_64KEY, 0);
+#else
+ int rc = RegDeleteKey(
+ RootKey, KeyName);
+#endif
return (ERROR_SUCCESS == rc);
}