![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello, I am trying to find good information on hosting the CLR from my native c++ program. I'm successfully using CorBindToRuntimeEx to host the CLR and executing functions in a test CLR assembly using ExecuteInDefaultAppDomain. That's all great, but my problem is that the execute function seems rather limited. It accepts a string argument and returns an int, and that's it. So my question is, how can more information about state be passed back and forth between the assembly and the hosting program? I've exercised my search engine pretty heavily looking for examples and I keep thinking, there must be a way to share data! Anyone successfully done this or have info about it? Thanks in advance, -Dave |
#3
| |||
| |||
|
|
There's a book out that goes into great detail on hosting the CLR: "Customizing the Microsoft® .NET Framework Common Language Runtime" http://www.microsoft.com/mspress/books/6895.aspx -- Chris Mullins "Dave Farquharson" <gamerfarquharson (AT) hotmail (DOT) com> wrote in message news:OzxiImtKIHA.3916 (AT) TK2MSFTNGP02 (DOT) phx.gbl... Hello, I am trying to find good information on hosting the CLR from my native c++ program. I'm successfully using CorBindToRuntimeEx to host the CLR and executing functions in a test CLR assembly using ExecuteInDefaultAppDomain. That's all great, but my problem is that the execute function seems rather limited. It accepts a string argument and returns an int, and that's it. So my question is, how can more information about state be passed back and forth between the assembly and the hosting program? I've exercised my search engine pretty heavily looking for examples and I keep thinking, there must be a way to share data! Anyone successfully done this or have info about it? Thanks in advance, -Dave |
#4
| |||
| |||
|
#5
| |||
| |||
|
|
Hello Dave, Have you yet looked at defining "#pragma managed" and "#pragma unmanaged" sections of code in C++? You can use these to generate a "mixed-mode" DLL which you can then load from C++. This approach seems to work fine, although apparently NOT when the calling C++ is in a native lib loaded by Java JNI. Am trying to find out why... Regards, Keith EggHeadCafe - .NET Developer Portal of Choice http://www.eggheadcafe.com |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |