I have an application that is implemented in c++. The application has a plugin API where you can compile dll's and put them into a certain location, and they will be auto-loaded into the host application when it starts up, customizing functionality.
Is there a way to compile a dll using ATL in such a way that the plugin dll will "transform" the application into a COM exe server.
The following ATL attribute code would work if it were an inproc server, but it's not an inproc:
[module(dll, ...)];
For an exe server I need:
[module(exe, ...)];
However, the compiler gives me errors on that because I'm actually compiling a dll, so I'm forced to use the following:
[module(unspecified, ...)];
This compiles fine, and MSDN for the "unspecified" option says:
Disables injection of ATL code related to the module attribute: the injection of ATL Module class, global instance _AtlModule and entry point functions. ... attributes in the project.
So, first, is it even possible to make an exe into a COM server via a plugin dll? Second, if so, what would be the right "ATL Module class, global instance _AtlModule and entry functions" to add to the project to get it to work right.
- The application is a standard windows application, so its primary entry point is a WinMain() function.
- The plugin dll would be delay-loaded, so it's not instantaneously loaded with the exe.
I'm a bit of a COM amateur, and the COM/ATL documentation is so deep and so vast and so wide, I don't even know where to start.