lundi 6 juillet 2015

Loading assemblies from memory when hosting the CLR in unmanaged programs

I managed to host the CLR in an unmanaged program thanks to rich documentation. However when hosting the CLR, it appears that one is restricted to load assemblies from harddrive - When running a managed application one can load assemblies from memory by calling Assembly.Load() though.

Is there any way to execute an assembly in the hosted CLR from memory? Like:

  1. Write managed assembly to memory
  2. Initiate CLR
  3. Start CLR
  4. Execute managed assembly from memory
  5. Wait for the managed assembly to return
  6. Stop CLR

I've searched the web and MSDN for hours but couldn't find a solution to this problem! A workaround I came up with would involve yet another assembly that calls Assembly.Load() - However I'm afraid that this may be overkill.

Thanks in advance for any hints or tips!





Aucun commentaire:

Enregistrer un commentaire