views:

271

answers:

1

I'm setting the Isolated COM project settings in a C++ VS2005 project to load an ocx component using the Registration-Free Activation method. If the ocx component is also used in a DLL library my application loads, do I need to set the Isolated COM settings in that DLL project's settings as well? Or would setting only the main application's embedded manifest be sufficient? Thanks!

A: 

As I understand it, isolation is per-process, not per-module. So, anything in the application's manifest applies to any process started from that application.

Think of what CoCreateInstance needs to do to support reg-free COM -- it needs to find a manifest file somehow and if it's present, not go to the registry for activation information.

Since there is no argument to CoCreateInstance telling it the path of the manifest, it needs to derive it from context.

There is no real context for a .DLL, but for an .EXE the current process handle can be used to derive the path of the executable, etc., so I suspect that's how they do it.

Kim Gräsman