diff options
author | Tobias Krause <tkr@openoffice.org> | 2009-11-10 07:31:09 +0000 |
---|---|---|
committer | Tobias Krause <tkr@openoffice.org> | 2009-11-10 07:31:09 +0000 |
commit | 021e02cc8743c3b5af0754f8c43627e3d30cf8ed (patch) | |
tree | b5245939fb778ba095c3716e6ac01200c420cbbe /setup_native | |
parent | e16ad188b3c787401ff1658b20f5bcc753b854c1 (diff) |
#105892# define KEY_WOW64_64KEY for mingw
Diffstat (limited to 'setup_native')
-rwxr-xr-x | setup_native/source/win32/customactions/reg64/reg64.cxx | 12 |
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); } |