close
  • .NET CLR hosting簡介:這篇很有價值。執行.NET程式時,PE檔Import Table裡的"mscoree.dll"只是一個入口,用來將程式導引到真正的VM(CLR),這個被稱做shim,不管java或.net都有類似的機制。某些軟體需要支援.NET/Java,這樣的軟體可以讓.NET CLR或Java VM寄宿在自己身上,這樣的軟體被稱為CLR Host或JVM Host。要成為Host,就需要使用Hosting API,.NET CLR的Hosting API被稱為CLR Hosting API,是COM介面。首先要實作IHostingControl,與裏面的GetHostManager(),CLR會呼叫此method來得知實作了幾個Hosting Manager並取得該Hosting Manager。.Net Framework CLR有11個Hosting Manager:Assembly Loading Manager、Host Protection MNager、Failure Policy Manager、Memory Manager、Garbage Collection Manager、Threading Manager、Synchronization Manager、Thread Pool Manager、I/O Completion Manager、Debugging Manager、CLR Event Manager。已經有許多軟體使用CLR Hosting,像SQL Server 2005、IIS...等。

arrow
arrow
    全站熱搜

    elleryq 發表在 痞客邦 留言(0) 人氣()