Пример #1
0
        static void Main(string[] args)
        {
            if (args.Length == 0)
            {
                args = new[] { @"C:\Program Files (x86)\Steam\steamapps\common\Hades\x64\Hades.exe" }
            }
            ;
            string clientArgs = "";

            if (Debugger.IsAttached)
            {
                DebugHelper.DetachDebugger();
                clientArgs += "--launch-debugger";
            }
            RemoteHooking.CreateAndInject(args[0],
                                          clientArgs,
                                          InProcessCreationFlags: 0,
                                          InjectionOptions.DoNotRequireStrongName,
                                          typeof(EntryPoint).Assembly.Location,
                                          typeof(EntryPoint).Assembly.Location,
                                          out int processID);

            Process.GetProcessById(processID).WaitForExit();
        }
    }