Is it safe to have a mixed-mode DLL serve out COM objects?

Gyorgy Bozoki <[email protected]> Mon, 17 Dec 2007 22:57:08 -0600
Newsgroups gmane.comp.windows.devel.dotnet.winforms
Message-ID <000001c84132$71c9cd00$6401a8c0@homepc>
Hi all,

I'm working on a mixed-mode DLL in C++ that calls into managed code,
implemented in C#. As it turnes out, the 3rd-party application that I need
to talk to provides some of its functionality through COM interfaces - I
need to implement some of those interfaces on my objects in C++ code.

As I'd prefer to have as few DLLs as possible (my objects will be inproc
servers), I'd like to use the mixed-mode DLL to serve out the COM objects
implementing these interfaces.

Is there anything wrong with this approach? I don't see anything wrong about
it, but it's been a while since I wrote COM code and never before in
mixed-mode.

Thanks for any advice,
Gyorgy Bozoki