本文介绍了如何加载CLR到过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一些问题,这困扰了我很长一段时间。
- 什么是CLR之间的关系并通过操作系统创建一个进程?
- 什么步骤的CLR加载时,我们双击控制台应用程序或Windows窗体应用程序?
- 在我发现了两个方法:_CorExeMain()和_CorBindToRuntimeEx()。什么是他们的角色?
解决方案
请参阅托管的公共语言运行库,加载公共语言运行库到一个进程 _CorExeMain功能,的。
我觉得基本的答案是,在CLR必须在过程(主机)上运行。如果双击,一个过程中创建(initally纯粹非托管)然后在CLR加载到过程(例如,使用CorBindToRuntimeEx的)。
I have some question which puzzled me for a long time.
- What is the relationship between CLRand one process created by OS?
- What steps the CLR is loaded when we double-click an "Console Application" or "Windows Forms Application"?
- I found two methods: _CorExeMain() and _CorBindToRuntimeEx(). What's the role of them?
解决方案
Please see Hosting the Common Language Runtime, Loading the Common Language Runtime into a Process, _CorExeMain Function, CorBindToRuntimeEx Function.
I think the basic answer is, the CLR must run in a process (host). If you "double-click", a process is created (initally purely unmanaged) then the CLR is loaded into the process (e.g. with CorBindToRuntimeEx).
这篇关于如何加载CLR到过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!