summaryrefslogtreecommitdiff
path: root/setup_native
diff options
context:
space:
mode:
authorMikhail Voitenko <mav@openoffice.org>2009-10-30 12:37:59 +0000
committerMikhail Voitenko <mav@openoffice.org>2009-10-30 12:37:59 +0000
commitd0ba52ecebf289ad7ff1edc99ec795c164b87456 (patch)
tree6a0205139c580c4c018fa81baec9fc55b46f5cbe /setup_native
parentfcce1711687b3a523b9f62111e556d7ac096e4b1 (diff)
#i106476# support 64-bit IE
Diffstat (limited to 'setup_native')
-rw-r--r--setup_native/source/win32/customactions/regactivex/regactivex.cxx37
1 files changed, 27 insertions, 10 deletions
diff --git a/setup_native/source/win32/customactions/regactivex/regactivex.cxx b/setup_native/source/win32/customactions/regactivex/regactivex.cxx
index c2a70b66b761..08d7b0eb78b6 100644
--- a/setup_native/source/win32/customactions/regactivex/regactivex.cxx
+++ b/setup_native/source/win32/customactions/regactivex/regactivex.cxx
@@ -51,8 +51,8 @@
// #define OWN_DEBUG_PRINT
-typedef int ( __stdcall * DllNativeRegProc ) ( int, BOOL, const char* );
-typedef int ( __stdcall * DllNativeUnregProc ) ( int, BOOL );
+typedef int ( __stdcall * DllNativeRegProc ) ( int, BOOL, BOOL, const char* );
+typedef int ( __stdcall * DllNativeUnregProc ) ( int, BOOL, BOOL );
BOOL UnicodeEquals( wchar_t* pStr1, wchar_t* pStr2 )
{
@@ -90,7 +90,7 @@ void WarningMessageInt( wchar_t* pWarning, unsigned int nValue )
#endif
//----------------------------------------------------------
-void RegisterActiveXNative( const char* pActiveXPath, int nMode, BOOL InstallForAllUser )
+void RegisterActiveXNative( const char* pActiveXPath, int nMode, BOOL InstallForAllUser, BOOL InstallFor64Bit )
{
#ifdef OWN_DEBUG_PRINT
MessageBoxW(NULL, L"RegisterActiveXNative", L"Information", MB_OK | MB_ICONINFORMATION);
@@ -112,7 +112,7 @@ void RegisterActiveXNative( const char* pActiveXPath, int nMode, BOOL InstallFor
#ifdef OWN_DEBUG_PRINT
MessageBoxA(NULL, pActiveXPath, "Library Path", MB_OK | MB_ICONINFORMATION);
#endif
- ( *pNativeProc )( nMode, InstallForAllUser, pActiveXPath );
+ ( *pNativeProc )( nMode, InstallForAllUser, InstallFor64Bit, pActiveXPath );
}
FreeLibrary( hModule );
@@ -120,7 +120,7 @@ void RegisterActiveXNative( const char* pActiveXPath, int nMode, BOOL InstallFor
}
//----------------------------------------------------------
-void UnregisterActiveXNative( const char* pActiveXPath, int nMode, BOOL InstallForAllUser )
+void UnregisterActiveXNative( const char* pActiveXPath, int nMode, BOOL InstallForAllUser, BOOL InstallFor64Bit )
{
// For Win98/WinME the values should be written to the local machine
OSVERSIONINFO aVerInfo;
@@ -133,7 +133,7 @@ void UnregisterActiveXNative( const char* pActiveXPath, int nMode, BOOL InstallF
{
DllNativeUnregProc pNativeProc = ( DllNativeUnregProc )GetProcAddress( hModule, "DllUnregisterServerNative" );
if( pNativeProc!=NULL )
- ( *pNativeProc )( nMode, InstallForAllUser );
+ ( *pNativeProc )( nMode, InstallForAllUser, InstallFor64Bit );
FreeLibrary( hModule );
}
@@ -313,6 +313,19 @@ BOOL MakeInstallForAllUsers( MSIHANDLE hMSI )
}
//----------------------------------------------------------
+BOOL MakeInstallFor64Bit( MSIHANDLE hMSI )
+{
+ BOOL bResult = FALSE;
+ wchar_t* pVal = NULL;
+ if ( GetMsiProp( hMSI, L"VersionNT64", &pVal ) && pVal )
+ {
+ bResult = UnicodeEquals( pVal , L"1" );
+ free( pVal );
+ }
+
+ return bResult;
+}
+//----------------------------------------------------------
extern "C" UINT __stdcall InstallActiveXControl( MSIHANDLE hMSI )
{
int nOldInstallMode = 0;
@@ -333,6 +346,8 @@ extern "C" UINT __stdcall InstallActiveXControl( MSIHANDLE hMSI )
#endif
BOOL bInstallForAllUser = MakeInstallForAllUsers( hMSI );
+ BOOL bInstallFor64Bit = MakeInstallFor64Bit( hMSI );
+
char* pActiveXPath = NULL;
if ( GetActiveXControlPath( hMSI, &pActiveXPath ) && pActiveXPath
&& GetDelta( hMSI, nOldInstallMode, nInstallMode, nDeinstallMode ) )
@@ -351,10 +366,10 @@ extern "C" UINT __stdcall InstallActiveXControl( MSIHANDLE hMSI )
// the control is installed in the new selected configuration
if ( current_state == INSTALLSTATE_LOCAL && nDeinstallMode )
- UnregisterActiveXNative( pActiveXPath, nDeinstallMode, bInstallForAllUser );
+ UnregisterActiveXNative( pActiveXPath, nDeinstallMode, bInstallForAllUser, bInstallFor64Bit );
if ( nInstallMode )
- RegisterActiveXNative( pActiveXPath, nInstallMode, bInstallForAllUser );
+ RegisterActiveXNative( pActiveXPath, nInstallMode, bInstallForAllUser, bInstallFor64Bit );
}
else if ( current_state == INSTALLSTATE_LOCAL && future_state == INSTALLSTATE_ABSENT )
{
@@ -362,7 +377,7 @@ extern "C" UINT __stdcall InstallActiveXControl( MSIHANDLE hMSI )
MessageBox(NULL, L"InstallActiveXControl, removing", L"Information", MB_OK | MB_ICONINFORMATION);
#endif
if ( nOldInstallMode )
- UnregisterActiveXNative( pActiveXPath, nOldInstallMode, bInstallForAllUser );
+ UnregisterActiveXNative( pActiveXPath, nOldInstallMode, bInstallForAllUser, bInstallFor64Bit );
}
}
@@ -393,6 +408,7 @@ extern "C" UINT __stdcall DeinstallActiveXControl( MSIHANDLE hMSI )
if ( current_state == INSTALLSTATE_LOCAL && GetActiveXControlPath( hMSI, &pActiveXPath ) && pActiveXPath )
{
BOOL bInstallForAllUser = MakeInstallForAllUsers( hMSI );
+ BOOL bInstallFor64Bit = MakeInstallFor64Bit( hMSI );
{
UnregisterActiveXNative( pActiveXPath,
@@ -402,7 +418,8 @@ extern "C" UINT __stdcall DeinstallActiveXControl( MSIHANDLE hMSI )
| CALC_COMPONENT
| WRITER_COMPONENT
| MATH_COMPONENT,
- bInstallForAllUser );
+ bInstallForAllUser,
+ bInstallFor64Bit );
}
free( pActiveXPath );