   Using C# classes in C++(win32 app)
  I'm looking for some good (internet) resources on building C# classes that I can use from my C++ code.Right now I have an old(er) Win32 app, and I want to start moving pieces to C#.  I can't throw the /clr switch on it yet because it relies on Crystal Reports 5, and that seems to break when I try to compile the app as managed. <-- *see bottom note*Thanks for any help on this,JF**  About Crystal Reports..If *anyone* uses Crystal Reports (5/7/9) in Windows C++ code, and has found a way to use it in a "managed"(/clr compiled) C++ program let me know how you did it.  I can't get past a call to PEOpenEngine().   
  hi! the only options to consume c# code from native c++ is to make the c# class(es) COM callable via .net COM Interop (good search term for google) and COM callable wrappers. Creating the COM component from your c# code is really easy in VC# : go to settings and check "register for COM Interop" option. (you could do this manually with the regasm.exe tool and the /tlb option (search msdn)). You can then call your managed code from native c++ using the well-known COM style. step by step COM Interop guide on c-sharpcorner.com this guide uses VB code for the COM server but it doesn't really matter. making native and managed work together is described quite nicely in this article. if you need something specific, i might be able to help. i just built such a thing couple of weeks ago. cheers,simon   ;  Thanks for the tip.  I've gotten it working.I found this to be good help :http://blogs.msdn.com/deeptanshuv/archive/2005/06/26/432870.aspxEdit:Make sure you keep the .dll with the executable! :)  I kept getting a EEFileLoadException and it took me 20min to realize I had forgotten to put the .dll in my debug directory.