diff options
-rw-r--r-- | setup_native/source/win32/customactions/reg4msdoc/reg4msdocmsi.cxx | 17 | ||||
-rw-r--r-- | setup_native/source/win32/customactions/reg4msdoc/register.cxx | 44 |
2 files changed, 4 insertions, 57 deletions
diff --git a/setup_native/source/win32/customactions/reg4msdoc/reg4msdocmsi.cxx b/setup_native/source/win32/customactions/reg4msdoc/reg4msdocmsi.cxx index 0eea790bb632..1d458d918785 100644 --- a/setup_native/source/win32/customactions/reg4msdoc/reg4msdocmsi.cxx +++ b/setup_native/source/win32/customactions/reg4msdoc/reg4msdocmsi.cxx @@ -2,9 +2,9 @@ * * $RCSfile: reg4msdocmsi.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: tra $ $Date: 2004-05-26 17:05:52 $ + * last change: $Author: vg $ $Date: 2005-03-23 14:04:09 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -176,17 +176,11 @@ extern "C" UINT __stdcall InstallExecSequenceEntry(MSIHANDLE handle) if (reg4) { Register4MsDoc(handle, reg4); - - if (IsModuleSelectedForInstallation(handle, TEXT("gm_o_Activexcontrol"))) - RegisterActiveX4MsDoc(handle, reg4); } if (unreg4) { Unregister4MsDoc(handle, unreg4); - - if (IsModuleInstalled(handle, TEXT("gm_o_Activexcontrol"))) - UnregisterActiveX4MsDoc(handle, unreg4); } return ERROR_SUCCESS; } @@ -198,30 +192,23 @@ extern "C" UINT __stdcall DeinstallExecSequenceEntry(MSIHANDLE handle) if (IsCompleteDeinstallation(handle)) { Unregister4MsDocAll(handle); - UnregisterActiveX4MsDocAll(handle); return ERROR_SUCCESS; } if (IsModuleSelectedForDeinstallation(handle, TEXT("gm_p_Wrt_Bin"))) { Unregister4MsDoc(handle, MSWORD | HTML_EDITOR); - UnregisterActiveX4MsDoc(handle, MSWORD); } if (IsModuleSelectedForDeinstallation(handle, TEXT("gm_p_Calc_Bin"))) { Unregister4MsDoc(handle, MSEXCEL); - UnregisterActiveX4MsDoc(handle, MSEXCEL); } if (IsModuleSelectedForDeinstallation(handle, TEXT("gm_p_Impress_Bin"))) { Unregister4MsDoc(handle, MSPOWERPOINT); - UnregisterActiveX4MsDoc(handle, MSPOWERPOINT); } - if (IsModuleSelectedForDeinstallation(handle, TEXT("gm_o_Activexcontrol"))) - UnregisterActiveX4MsDocAll(handle); - return ERROR_SUCCESS; } diff --git a/setup_native/source/win32/customactions/reg4msdoc/register.cxx b/setup_native/source/win32/customactions/reg4msdoc/register.cxx index 2e01b4b900a9..c476cc19b1ff 100644 --- a/setup_native/source/win32/customactions/reg4msdoc/register.cxx +++ b/setup_native/source/win32/customactions/reg4msdoc/register.cxx @@ -2,9 +2,9 @@ * * $RCSfile: register.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: tra $ $Date: 2004-05-26 17:05:52 $ + * last change: $Author: vg $ $Date: 2005-03-23 14:04:24 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -381,43 +381,3 @@ int FixReturnRegistrationState(MSIHANDLE handle) return registration_state; } - -// ActiveX control registration - -inline HINSTANCE LoadActiveXLibrary(MSIHANDLE handle) -{ - std::string axpath = UnicodeToAnsiString( - (GetOfficeInstallationPath(handle) + TEXT("program\\so_activex.dll"))); - return LoadLibraryExA(axpath.c_str(), NULL, LOAD_WITH_ALTERED_SEARCH_PATH); -} - -inline bool IsValidHandle(HINSTANCE hinst) -{ return ((hinst != INVALID_HANDLE_VALUE) && (hinst != NULL)); } - -typedef int (__stdcall *DllDocProc)(int, BOOL); - -void RegisterActiveX4MsDoc(MSIHANDLE handle, int nPref) -{ - HINSTANCE hinst = LoadActiveXLibrary(handle); - if (IsValidHandle(hinst)) - { - DllDocProc DllRegisterServerDoc = (DllDocProc)GetProcAddress(hinst, "DllRegisterServerDoc"); - if (DllRegisterServerDoc) - DllRegisterServerDoc(nPref, IsAllUserInstallation(handle)); - FreeLibrary(hinst); - } -} - -void UnregisterActiveX4MsDoc(MSIHANDLE handle, int nPref) -{ - HINSTANCE hinst = LoadActiveXLibrary(handle); - if (IsValidHandle(hinst)) - { - DllDocProc DllUnregisterServerDoc = (DllDocProc)GetProcAddress(hinst, "DllUnregisterServerDoc"); - if (DllUnregisterServerDoc) - DllUnregisterServerDoc(nPref, IsAllUserInstallation(handle)); - FreeLibrary(hinst); - } -} - - |