diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-11-24 00:23:44 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-11-25 12:25:51 +0100 |
commit | c0a500b9f1b47ee1beea3c22ff029a03e657cb8a (patch) | |
tree | bbb4bb9b72f1c1ca46023a4c2c835d4e9aeedb6b /winaccessibility/source/service | |
parent | fd7cb4b05c1ac336f2430e05864bf98afe3030da (diff) |
winaccessibility: let CoCreateInstance calls find the components
The COM services are not found because they are not registered in the
registry via regsvr32 (doing that is unnecessary since the components
are only instantiated by winaccessibility code and undesirable since
that would likely register the IAccessible2 types too, breaking A11y
tools) and the special manifest resource #97 that ActivateActContext()
tries to load does not exist in UAccCOM.dll; this would need to be a
XML manifest, the *.rgs and *.tlb that are already included as
individual resources won't work.
After reading ATL headers for hours it is immediately obvious that the
COM components can simply be registered by a call to
CComModule::RegisterClassObjects() from DllMain; this just requires
actually loading the UAccCOM library from somewhere so the DllMain runs.
Change-Id: Id58b754835cd2f1bcada37e5639a6b6042a42fd5
(cherry picked from commit 732ec36edfd09d2091d70c4d71b5f182fe279c45)
Diffstat (limited to 'winaccessibility/source/service')
-rw-r--r-- | winaccessibility/source/service/msaaservice_impl.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/winaccessibility/source/service/msaaservice_impl.cxx b/winaccessibility/source/service/msaaservice_impl.cxx index e5e1231c0df3..5f3d5fc964f5 100644 --- a/winaccessibility/source/service/msaaservice_impl.cxx +++ b/winaccessibility/source/service/msaaservice_impl.cxx @@ -267,6 +267,14 @@ Reference< XInterface > SAL_CALL create_MSAAServiceImpl( Reference< XComponentCo } } + // load UAccCOM library so its DllMain can register its COM components + static HMODULE h = LoadLibrary("UAccCOM.dll"); + if (!h) + { + assert(false); + return 0; + } + Reference< XMSAAService > xAccMgr( new MSAAServiceImpl() ); AccessBridgeUpdateOldTopWindows( xAccMgr ); |