Calling a .NET assembly through PURE UNMANAGED code
Messages   Related Types
This message was discovered on microsoft.public.dotnet.languages.vc.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.
Post a new message to this list...

Nadav (VIP)
Hi,

I am tiring to load an assembly from memory ( e.g.
System.Reflection.Assembly.Load( byte[] ), this works fine through managed
and mixed code. NOW, I am tiring to achieve the same thing through PURE
UNMANAGED code, I can't use com or com interop, does some one have an idea
how to achieve what was just described? ( through unmanaged code )
Is it possible to call a managed assembly through PURE UNMANAGED code? how?
( if at-all )

Again, I can't use COM so COM Interop will not satisfy my needs

--
Nadav
http://www.ddevel.com
Reply to this message...
 
    
William DePalo [MVP VC++] (VIP)
"Nadav" <Click here to reveal e-mail address> wrote in message
news:Click here to reveal e-mail address...
[Original message clipped]

Check the docs for CorBindToRuntimeEx(). It will load the CLR into the
calling process. This gets you an interface pointer of type ICorRuntimeHost.

> Again, I can't use COM so COM Interop will not satisfy my needs

Then you can't get there from here. :-)

In unmanaged code you interact with the runtime via COM. You need to do some
in an application domain? Then you need an interface pointer _AppDomain
where you get to use more COM is used. Once you have that what do you do if
you need to call a method on an object of a class? COM again.

Regards,
Will

Reply to this message...
 
 
System.AppDomain
System.Reflection.Assembly




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com