Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Mixing CAtlExeModuleT and CAtlDllModuleT

8 views
Skip to first unread message

JoMyFrie...@gmail.com

unread,
Jul 19, 2005, 2:57:42 PM7/19/05
to
I am in the process of converting an Acrobat Plug-In, which uses COM to
expose its functionality to external applications from ATL3 to ATL7.
The problem is that the old version of the plugin uses functionality
that has been split up between CAtlExeModuleT and CAtlDllModueT.
Acrobat Plug-Ins are Dlls, but upon initialization they register
themselves with Acrobat, and only the process that registers with
Acrobat can use acrobat functionality. I can't use CAtlExeModuleT ,
because WinMain is already implemented in Acrobat somewhere and not my
plugin. I can't use CAtlDllModuleT, because COM objects created
through it will be created in-process and the processes they are
created in are not registered with Acrobat.

So, basically what I need as a CAtlDllModuleT such that COM
applications creating instances of the classes it defines will be
created Out-Of-Process.


I've tried using CAtlDllModuleT and running
AtlComModuleRegisterClassObjects(&ATL::_AtlComModule,
CLSCTX_LOCAL_SERVER, REGCLS_MULTIPLEUSE) To get it to register the
classes as out-of-process, but the objects are still created in-process

I've also tried running using CAtlExeModuleT and running
CAtlExeModuleT::WinMain upon plugin initialization, but the classes do
not register correctly and attempts to create instances from external
applications give the error, "Unable to create ActiveX Object"

I've tried using the appObject attribute along with classes using
CAtlDllModuleT, but the classes are still instantiated out-of-process.

Does anyone know how I can get CAtlDllModuleT to create objects
out-of-process, or am I going to have to figure out a way to get the
depricated CComModule working in ATL7?

Thank you in advance.

0 new messages