LibreOffice Module extensions (master) 1
|
#include <stdio.h>
#include "StdAfx2.h"
#include "resource.h"
#include <initguid.h>
#include <so_activex.h>
#include <so_activex_i.c>
#include "SOActiveX.h"
#include <comphelper\documentconstants.hxx>
#include <sal/types.h>
#include <exception>
Go to the source code of this file.
Macros | |
#define | X64_LIB_NAME L"so_activex_x64.dll" |
#define | X32_LIB_NAME L"so_activex.dll" |
#define | REG_DELETE_KEY_A(key, aPath, nKeyAccess) RegDeleteKeyA( key, aPath ) |
#define | SUPPORTED_EXT_NUM 30 |
#define | SUPPORTED_MSEXT_NUM 7 |
Functions | |
BOOL WINAPI | DllMain (HINSTANCE hInstance, DWORD dwReason, LPVOID) |
STDAPI | DllCanUnloadNow () |
STDAPI | DllGetClassObject (REFCLSID rclsid, REFIID riid, LPVOID *ppv) |
static LSTATUS | createKey (HKEY hkey, const char *aKeyToCreate, REGSAM nKeyAccess, const char *aValue=nullptr, const char *aChildName=nullptr, const char *aChildValue=nullptr) |
static LSTATUS | createKey (HKEY hkey, const wchar_t *aKeyToCreate, REGSAM nKeyAccess, const wchar_t *aValue=nullptr, const wchar_t *aChildName=nullptr, const wchar_t *aChildValue=nullptr) |
EXTERN_C | __declspec (dllexport) HRESULT STDAPICALLTYPE DllUnregisterServerNative(int nMode |
static HRESULT | DllRegisterServerNative_Impl (int nMode, bool bForAllUsers, REGSAM nKeyAccess, const wchar_t *pProgramPath, const wchar_t *pLibName) |
if (bFor64Bit) hr = DllRegisterServerDoc_Impl( nMode, bForAllUsers, n64KeyAccess ) | |
if (SUCCEEDED(hr)) hr = DllRegisterServerDoc_Impl( nMode, bForAllUsers, n32KeyAccess ) | |
static HRESULT | DeleteKeyTree (HKEY hkey, const char *pPath, REGSAM nKeyAccess) |
static HRESULT | DllUnregisterServerNative_Impl (int nMode, bool bForAllUsers, REGSAM nKeyAccess) |
STDAPI | DllUnregisterServerNative (int nMode, BOOL bForAllUsers, BOOL bFor64Bit) |
static HRESULT | DllRegisterServerDoc_Impl (int nMode, bool bForAllUsers, REGSAM nKeyAccess) |
static HRESULT | DllUnregisterServerDoc_Impl (int nMode, bool bForAllUsers, REGSAM nKeyAccess) |
STDAPI | DllUnregisterServerDoc (int nMode, BOOL bForAllUsers, BOOL bFor64Bit) |
STDAPI | DllRegisterServer () |
STDAPI | DllUnregisterServer () |
Variables | |
CComModule | _Module |
const REGSAM | n64KeyAccess = KEY_ALL_ACCESS | KEY_WOW64_64KEY |
const REGSAM | n32KeyAccess = KEY_ALL_ACCESS |
const bool | bX64 = false |
const char *const | aFileExt [] |
const sal_Unicode *const | aMimeType [] |
const int | nForModes [] |
const char *const | aClassID = "{67F2A879-82D5-4A6D-8CC5-FFB3C114B69D}" |
const char *const | aTypeLib = "{61FA3F13-8061-4796-B055-3697ED28CB38}" |
const char *const | aInterIDWinPeer = "{BF5D10F3-8A10-4A0B-B150-2B6AA2D7E118}" |
const char *const | aProxyStubWinPeer = "{00020424-0000-0000-C000-000000000046}" |
const char *const | aInterIDDispInt = "{9337694C-B27D-4384-95A4-9D8E0EABC9E5}" |
const char *const | aProxyStubDispInt = "{00020424-0000-0000-C000-000000000046}" |
const char *const | aInterIDActApprove = "{029E9F1E-2B3F-4297-9160-8197DE7ED54F}" |
const char *const | aProxyStubActApprove = "{00020424-0000-0000-C000-000000000046}" |
const char *const | aLocalPrefix = "Software\\Classes\\" |
EXTERN_C BOOL | bForAllUsers |
EXTERN_C BOOL BOOL | bFor64Bit |
EXTERN_C BOOL BOOL const wchar_t * | pProgramPath |
return | hr |
const char *const | aMSFileExt [] = { ".dot", ".doc", ".xlt", ".xls", ".pot", ".ppt", ".pps" } |
const char *const | aMSMimeType [] |
const int | nForMSModes [] = { 1, 1, 2, 2, 4, 4, 4 } |
#define REG_DELETE_KEY_A | ( | key, | |
aPath, | |||
nKeyAccess | |||
) | RegDeleteKeyA( key, aPath ) |
Definition at line 72 of file so_activex.cxx.
#define SUPPORTED_EXT_NUM 30 |
Definition at line 155 of file so_activex.cxx.
#define SUPPORTED_MSEXT_NUM 7 |
Definition at line 559 of file so_activex.cxx.
#define X32_LIB_NAME L"so_activex.dll" |
Definition at line 62 of file so_activex.cxx.
#define X64_LIB_NAME L"so_activex_x64.dll" |
Definition at line 61 of file so_activex.cxx.
EXTERN_C __declspec | ( | dllexport | ) |
|
static |
Definition at line 225 of file so_activex.cxx.
Referenced by DllRegisterServerDoc_Impl(), and DllRegisterServerNative_Impl().
|
static |
Definition at line 248 of file so_activex.cxx.
|
static |
Definition at line 451 of file so_activex.cxx.
References DeleteKeyTree(), and REG_DELETE_KEY_A.
Referenced by DeleteKeyTree(), DllUnregisterServerDoc_Impl(), and DllUnregisterServerNative_Impl().
STDAPI DllCanUnloadNow | ( | void | ) |
Definition at line 93 of file so_activex.cxx.
References _Module.
STDAPI DllGetClassObject | ( | REFCLSID | rclsid, |
REFIID | riid, | ||
LPVOID * | ppv | ||
) |
Definition at line 101 of file so_activex.cxx.
References _Module.
BOOL WINAPI DllMain | ( | HINSTANCE | hInstance, |
DWORD | dwReason, | ||
LPVOID | |||
) |
Definition at line 78 of file so_activex.cxx.
STDAPI DllRegisterServer | ( | void | ) |
Definition at line 722 of file so_activex.cxx.
References bX64, DllRegisterServer(), FALSE, pProgramPath, SAL_N_ELEMENTS, and TRUE.
Referenced by DllRegisterServer().
|
static |
Definition at line 571 of file so_activex.cxx.
References aClassID, aLocalPrefix, aMSFileExt, aMSMimeType, bForAllUsers, createKey(), DllUnregisterServerDoc(), nForMSModes, and SUPPORTED_MSEXT_NUM.
|
static |
Definition at line 272 of file so_activex.cxx.
References aClassID, aFileExt, aInterIDActApprove, aInterIDDispInt, aInterIDWinPeer, aLocalPrefix, aMimeType, aProxyStubActApprove, aProxyStubDispInt, aProxyStubWinPeer, aTypeLib, bForAllUsers, createKey(), DllUnregisterServerNative(), nForModes, pProgramPath, and SUPPORTED_EXT_NUM.
STDAPI DllUnregisterServer | ( | void | ) |
Definition at line 758 of file so_activex.cxx.
References bX64, DllUnregisterServerDoc(), DllUnregisterServerNative(), FALSE, and TRUE.
Definition at line 707 of file so_activex.cxx.
References bFor64Bit, bForAllUsers, DllUnregisterServerDoc_Impl(), hr, n32KeyAccess, and n64KeyAccess.
Referenced by DllRegisterServerDoc_Impl(), and DllUnregisterServer().
|
static |
Definition at line 654 of file so_activex.cxx.
References aLocalPrefix, aMSFileExt, aMSMimeType, bForAllUsers, DeleteKeyTree(), nForMSModes, and SUPPORTED_MSEXT_NUM.
Referenced by DllUnregisterServerDoc().
Definition at line 547 of file so_activex.cxx.
References bFor64Bit, bForAllUsers, DllUnregisterServerNative_Impl(), hr, n32KeyAccess, and n64KeyAccess.
Referenced by DllRegisterServerNative_Impl(), and DllUnregisterServer().
|
static |
Definition at line 468 of file so_activex.cxx.
References aClassID, aFileExt, aInterIDActApprove, aInterIDDispInt, aInterIDWinPeer, aLocalPrefix, aMimeType, aTypeLib, bForAllUsers, DeleteKeyTree(), nForModes, and SUPPORTED_EXT_NUM.
Referenced by DllUnregisterServerNative().
if | ( | bFor64Bit | ) | = DllRegisterServerDoc_Impl( nMode, bForAllUsers, n64KeyAccess ) |
Referenced by IUnknownWrapper::directInvoke().
if | ( | SUCCEEDED(hr) | ) | = DllRegisterServerDoc_Impl( nMode, bForAllUsers, n32KeyAccess ) |
CComModule _Module |
Definition at line 48 of file so_activex.cxx.
Referenced by DllCanUnloadNow(), DllGetClassObject(), and DllMain().
const char* const aClassID = "{67F2A879-82D5-4A6D-8CC5-FFB3C114B69D}" |
Definition at line 207 of file so_activex.cxx.
Referenced by DllRegisterServerDoc_Impl(), DllRegisterServerNative_Impl(), and DllUnregisterServerNative_Impl().
const char* const aFileExt[] |
Definition at line 156 of file so_activex.cxx.
Referenced by DllRegisterServerNative_Impl(), and DllUnregisterServerNative_Impl().
const char* const aInterIDActApprove = "{029E9F1E-2B3F-4297-9160-8197DE7ED54F}" |
Definition at line 219 of file so_activex.cxx.
Referenced by DllRegisterServerNative_Impl(), and DllUnregisterServerNative_Impl().
const char* const aInterIDDispInt = "{9337694C-B27D-4384-95A4-9D8E0EABC9E5}" |
Definition at line 215 of file so_activex.cxx.
Referenced by DllRegisterServerNative_Impl(), and DllUnregisterServerNative_Impl().
const char* const aInterIDWinPeer = "{BF5D10F3-8A10-4A0B-B150-2B6AA2D7E118}" |
Definition at line 211 of file so_activex.cxx.
Referenced by DllRegisterServerNative_Impl(), and DllUnregisterServerNative_Impl().
const char* const aLocalPrefix = "Software\\Classes\\" |
Definition at line 223 of file so_activex.cxx.
Referenced by DllRegisterServerDoc_Impl(), DllRegisterServerNative_Impl(), DllUnregisterServerDoc_Impl(), and DllUnregisterServerNative_Impl().
const sal_Unicode* const aMimeType[] |
Definition at line 162 of file so_activex.cxx.
Referenced by DllRegisterServerNative_Impl(), and DllUnregisterServerNative_Impl().
const char* const aMSFileExt[] = { ".dot", ".doc", ".xlt", ".xls", ".pot", ".ppt", ".pps" } |
Definition at line 560 of file so_activex.cxx.
Referenced by DllRegisterServerDoc_Impl(), and DllUnregisterServerDoc_Impl().
const char* const aMSMimeType[] |
Definition at line 561 of file so_activex.cxx.
Referenced by DllRegisterServerDoc_Impl(), and DllUnregisterServerDoc_Impl().
const char* const aProxyStubActApprove = "{00020424-0000-0000-C000-000000000046}" |
Definition at line 220 of file so_activex.cxx.
Referenced by DllRegisterServerNative_Impl().
const char* const aProxyStubDispInt = "{00020424-0000-0000-C000-000000000046}" |
Definition at line 216 of file so_activex.cxx.
Referenced by DllRegisterServerNative_Impl().
const char* const aProxyStubWinPeer = "{00020424-0000-0000-C000-000000000046}" |
Definition at line 212 of file so_activex.cxx.
Referenced by DllRegisterServerNative_Impl().
const char* const aTypeLib = "{61FA3F13-8061-4796-B055-3697ED28CB38}" |
Definition at line 208 of file so_activex.cxx.
Referenced by DllRegisterServerNative_Impl(), and DllUnregisterServerNative_Impl().
Definition at line 271 of file so_activex.cxx.
Referenced by DllUnregisterServerDoc(), and DllUnregisterServerNative().
EXTERN_C BOOL bForAllUsers |
Definition at line 271 of file so_activex.cxx.
Referenced by DllRegisterServerDoc_Impl(), DllRegisterServerNative_Impl(), DllUnregisterServerDoc(), DllUnregisterServerDoc_Impl(), DllUnregisterServerNative(), and DllUnregisterServerNative_Impl().
const bool bX64 = false |
Definition at line 71 of file so_activex.cxx.
Referenced by DllRegisterServer(), and DllUnregisterServer().
return hr |
Definition at line 446 of file so_activex.cxx.
Referenced by UnoConversionUtilities< class >::anyToVariant(), CSOActiveX::CallbackCreateXInputStream(), CSOActiveX::CallDispatchMethod(), CSOActiveX::CallLoadComponentFromURL1PBool(), CSOActiveX::Cleanup(), InterfaceOleWrapper::convertDispparamsArgs(), convertSelfToCom(), UnoConversionUtilities< class >::convertValueObject(), CSOActiveX::CreateFrameOldWay(), CSOActiveX::CSOActiveX(), IUnknownWrapper::directInvoke(), SODispatchInterceptor::dispatch(), UnoConversionUtilities< class >::dispatchExObject2Sequence(), DllUnregisterServerDoc(), DllUnregisterServerNative(), ExecuteFunc(), JScriptValue::Get(), IUnknownWrapper::getDispid(), GetIDispByFunc(), UnoConversionUtilities< class >::getImplementedInterfaces(), GetPropertiesFromIDisp(), CSOActiveX::GetUrlStruct(), JScriptValue::GetValue(), IUnknownWrapper::getValue(), CSOActiveX::GetVersionConnected(), IUnknownWrapper::invokeWithDispIdComTlb(), IUnknownWrapper::invokeWithDispIdUnoTlb(), UnoConversionUtilities< class >::isJScriptArray(), CSOActiveX::Load(), CSOActiveX::LoadURLToFrame(), o2u_attachCurrentThread(), CSOActiveX::OnDrawAdvanced(), PutPropertiesToIDisp(), SODispatchInterceptor::queryDispatch(), SODispatchInterceptor::queryDispatches(), JScriptValue::Set(), CSOActiveX::SetLayoutManagerProps(), IUnknownWrapper::setValue(), CSOActiveX::TerminateOffice(), UnoConversionUtilities< class >::variantToAny(), writeBackOutParameter(), and writeBackOutParameter2().
const REGSAM n32KeyAccess = KEY_ALL_ACCESS |
Definition at line 65 of file so_activex.cxx.
Referenced by DllUnregisterServerDoc(), and DllUnregisterServerNative().
const REGSAM n64KeyAccess = KEY_ALL_ACCESS | KEY_WOW64_64KEY |
Definition at line 64 of file so_activex.cxx.
Referenced by DllUnregisterServerDoc(), and DllUnregisterServerNative().
const int nForModes[] |
Definition at line 200 of file so_activex.cxx.
Referenced by DllRegisterServerNative_Impl(), and DllUnregisterServerNative_Impl().
const int nForMSModes[] = { 1, 1, 2, 2, 4, 4, 4 } |
Definition at line 568 of file so_activex.cxx.
Referenced by DllRegisterServerDoc_Impl(), and DllUnregisterServerDoc_Impl().
Definition at line 437 of file so_activex.cxx.
Referenced by DllRegisterServer(), and DllRegisterServerNative_Impl().