I use unmanaged CLR Hosting APIs for loading CLR in windows native apps like notepad, calc etc. In case CLR is already hosted in the application ( like any .NET app ) I used CorBindToCurrentRuntime function published by mscoree.dll to get the handle to ICorRuntimeHost
object and do some stuff by enumerating AppDomains. Things were working fine until I migrated my project from VS2003 to VS2005 IDE. I had to do this I faced some issues with my existing code when tried to get handle to Runtimehost using existing hosting APIs
in CLR 4 process. I decided to check if new API i.e. "CLRCreateInstance" is exposed by mscoree.dll then use it to get handle to ICorRuntimeHost else use old function. In order to use this I included metahost.h file in my project and build my application.
Now, for some reason I'm not able to get handle to ICorRuntimeHost interface inside .NET 1.1 application. If I use polcy file to run .NET 1.1 app as part of .NET 2.0 CLR, then call to "CorBindToCurrentRuntime"succeed and return the correct handle.
Can anyone suggest what could possibly go wrong if I migrate from VS2003 to VS2005 IDE.
I thought if it could be because of some .net framework dependeny introduced when I built my c++/native project using VS2005, but I could not find one. My C++ project is a native project and doesn't depend on clr.
Code Used to get
View Complete Post