diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2005-03-23 13:04:24 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2005-03-23 13:04:24 +0000 |
commit | 8cf961bfb44e5c480550b59e6ced7404c14dd3e6 (patch) | |
tree | d0b5e9cce98dba4e0a0b3083919b1303a11d6ef7 /setup_native/source/win32/customactions/reg4msdoc/register.cxx | |
parent | ac1978d339026d152a63574e59eed2e458844245 (diff) |
INTEGRATION: CWS fwkfinal1 (1.1.50); FILE MERGED
2005/03/10 09:36:50 mav 1.1.50.1: #i43100# do not register ActiveX control for MS document types
Diffstat (limited to 'setup_native/source/win32/customactions/reg4msdoc/register.cxx')
-rw-r--r-- | setup_native/source/win32/customactions/reg4msdoc/register.cxx | 44 |
1 files changed, 2 insertions, 42 deletions
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); - } -} - - |