ClrHosting icon indicating copy to clipboard operation
ClrHosting copied to clipboard

Clr Injection for x64 and x86. Inject C# into Managed or Unmanaged Processes.

Want a mod loader like this? Try CeLeRy, A Lightweight .NET CLR mod loader currently supporting .NET 8.0 --> https://github.com/Glatrix/CeLeRy

https://discord.gg/X9gdzuJBAZ

ClrHosting

Clr Injection for x64 and x86

Clr loader

(Only injects .NET Framework dlls)
static const LPCWSTR Assembly = L"\\CSharp.dll"; //dllname.dll (eg \\FolderName\\CSharp.dll
static const LPCWSTR Class = L"ISpace.IClass"; //namespace.class
static const LPCWSTR Method = L"IMain"; //method name
static const LPCWSTR Param = L"It works!!"; //string paramater (if applicable)

Put the C# dll, and the Clr hosting dll into the same folder.

C# Exmaple

namespace ISpace
{
    public class IClass
    {
        public static int IMain(string args)
        {
            AllocConsole(); //Open a console window from the same process.
            Console.WriteLine("<_C# Loaded_>"); //Proof its working.
            return 0;
        }

        [DllImport("kernel32")]
        static extern bool AllocConsole();
    }
}