I don't know what your immediate problem might be -- even trivial MC++
build problems make my head swim -- but have you considered skipping the
middleman (COM Interop) and simply hosting the CLR in your MFC app,
yourself?  It's far, far easier than it sounds.  Like, less than a dozen
lines of code.  Some Google starting points:  CorBindToRuntimeEx
ICorRuntimeHost

http://www.gotdotnet.com/team/clr/HostingInterfaces.aspx

Side question, for the panel: anyone know what's up with
ClrCreateManagedInstance?  I was poking around mscoree.h the other day, and
it picqued my curiosity.  It looks like this:

STDAPI ClrCreateManagedInstance(
  LPCWSTR pTypeName, REFIID riid, void **ppObject);

It's a little less than fully documented, but Sam Gentile's blog suggests
it might be a nifty way to bypass the need to register anything, to achieve
COM interop:

http://samgentile.com/blog/archive/2003/07/03/7868.aspx

I'm wondering what syntax is expected of that first "typename" parameter?
I'd expect it wants to see an assembly name in there somewhere, too...?

Whatever.  Better, perhaps, to stick to the better-documented
CorBindToCurrentRuntime(), and friends.

Cheers,
-Shawn
http://www.windojitsu.com/

===================================
This list is hosted by DevelopMentor�  http://www.develop.com
Some .NET courses you may be interested in:

NEW! Guerrilla ASP.NET, 26 Jan 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to