Hold it right there! You may think this has already been asked millions of time and has been answered as many time as the Earth has spun around the Sun, but please bear with me on this one.
My task is simple: In my C++ (Windows) program, I want to be able to execute some managed (C# or VB.NET etc) codes.
Wait! Before you CTRL-T, go grab a random link from Google and slap it in my face, and say "Learn to search!", please continue reading:
I started from here http://sites.google.com/site/robertgiesecke/ which allowed me to export C# functions as C style functions, and then use it in C++. It works all right. But now I have two binaries, the native exe and the managed dll.
How can I embed the dll into the exe and map it into the memory, and finally call it from there? In other words, I want to have only one single exe containing both the native exe and the managed dll.
Of course I have already tried this http://www.joachim-bauch.de/tutorials/loading-a-dll-from-memory/
Unfortunately that doesn't work, the code fails to finish the "attach" process at the end. I'm guessing it's because of the dll's managed form.
Thanks for reading.
EDIT: I really don't want to use C++/CLI by all means :(