Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. Accesing ICorRuntimeHost.

Accesing ICorRuntimeHost.

Scheduled Pinned Locked Moved .NET (Core and Framework)
comquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    igor1960
    wrote on last edited by
    #1

    I'm trying to figure out: If there is anyway other then COM Interop to access ICorRuntimeHost interface implemented by running MSCOREE directly from managed application. Again, I'm not interested in possible solution that involves COM creation of CorRuntimeHost as it's not safe (or maybe it is?)... "...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..." Me

    S 1 Reply Last reply
    0
    • I igor1960

      I'm trying to figure out: If there is anyway other then COM Interop to access ICorRuntimeHost interface implemented by running MSCOREE directly from managed application. Again, I'm not interested in possible solution that involves COM creation of CorRuntimeHost as it's not safe (or maybe it is?)... "...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..." Me

      S Offline
      S Offline
      Stephane Rodriguez
      wrote on last edited by
      #2

      Igor, take a look at the System.AppDomain class. The Hosting Interface.doc paper from one of the subfolders of the .NET SDK is a good read too. If you are executing managed code, then a CLR instance is already started (for that app domain). That's probably why System.AppDomain doesn't provide methods like Start()/Stop(), contrary to ICorRuntimeHost.


      RSS feed

      I 1 Reply Last reply
      0
      • S Stephane Rodriguez

        Igor, take a look at the System.AppDomain class. The Hosting Interface.doc paper from one of the subfolders of the .NET SDK is a good read too. If you are executing managed code, then a CLR instance is already started (for that app domain). That's probably why System.AppDomain doesn't provide methods like Start()/Stop(), contrary to ICorRuntimeHost.


        RSS feed

        I Offline
        I Offline
        igor1960
        wrote on last edited by
        #3

        Stephane, Start/Stop is not of interest to me. I'm trying to figure out if it's possible to change MaxThreads in .NET ThreadPool class, which is static through safe .NET facilities. However, the only solution I've found so far is through COM Interop: http://www.csharphelp.com/archives3/archive487.html I don't get it: why SetMaxThreads is not exposed?: What a pain... "...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..." Me

        S 1 Reply Last reply
        0
        • I igor1960

          Stephane, Start/Stop is not of interest to me. I'm trying to figure out if it's possible to change MaxThreads in .NET ThreadPool class, which is static through safe .NET facilities. However, the only solution I've found so far is through COM Interop: http://www.csharphelp.com/archives3/archive487.html I don't get it: why SetMaxThreads is not exposed?: What a pain... "...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..." Me

          S Offline
          S Offline
          Stephane Rodriguez
          wrote on last edited by
          #4

          importing the COM signature seems to be the only way to go since : - it's native code in the end - SetMinThreads(wt,ct); doesn't seem to help much Rotor's source code (sscli/clr/src/vm/win32threadpool.cpp) seems in debug mode to lookup the CLR config file for a "MaxThreadpoolThreads" keyword in it, and replaces the default "25 * nbCPUs" value with it, if any. I don't know at this point if the commercial CLR does it too.


          RSS feed

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups