clr-hosting

Is it possible to host the CLR in a C program?

北战南征 提交于 2019-12-01 02:47:02
问题 Every example I can find is in C++, but I'm trying to keep my project in C. Is it even possible to host the CLR in a C program? If so, can you point me to an example? 回答1: As the above comments hint, there is a set of COM APIs for hosting the CLR, and you should be able to call these COM APIs from both C and C++. As an example, below is a quick piece of (untested) C code that shows how to start up the CLR and execute a static method of a class in a managed assembly (which takes in a string as

What is CLR hosting?

喜夏-厌秋 提交于 2019-11-27 12:39:14
What is CLR hosting? What is the use case for that? CesarGon See here for information about CLR hosting that was relevant for CLR v2 (.NET 2.0, 3.0 and 3.5). For information about the newer CLR Hosting API in .NET 4.0, see here . Basically, the CLR acts as a library that can be loaded and "hosted" by a process. You can develop an app that loads and hosts the CLR if you wish; that would allow your app to contain a whole CLR virtual machine, load assemblies and run .NET managed code all within it. SQL Server 2008, for example, can do this. You can write .NET code that is stored in a SQL Server

What is CLR hosting?

人走茶凉 提交于 2019-11-26 16:05:38
问题 What is CLR hosting? What is the use case for that? 回答1: See here for information about CLR hosting that was relevant for CLR v2 (.NET 2.0, 3.0 and 3.5). For information about the newer CLR Hosting API in .NET 4.0, see here. Basically, the CLR acts as a library that can be loaded and "hosted" by a process. You can develop an app that loads and hosts the CLR if you wish; that would allow your app to contain a whole CLR virtual machine, load assemblies and run .NET managed code all within it.