public void Run(EasyHook.RemoteHooking.IContext InContext, string ChannelName, string[] args) { AppDomain currentDomain = AppDomain.CurrentDomain; AppDomain hookManagerDomain = AppDomain.CreateDomain("hookManagerDomain"); string assemblyFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); hookManagerDomain.ExecuteAssembly(assemblyFolder + "\\HookManager.exe", args: args); try { while (true) { Thread.Sleep(100); Interface.Ping(); } } catch { AppDomain.Unload(hookManagerDomain); AppDomain.Unload(currentDomain); } }
/// <summary> /// The main entry point for the application. /// </summary> /// public Main(EasyHook.RemoteHooking.IContext InContext, string ChannelName, string[] args) { Interface = RemoteHooking.IpcConnectClient <QuestorLauncherInterface.QuestorLauncherInterface>(ChannelName); Interface.Ping(); }
/// <summary> /// The main entry point for the application. /// </summary> /// public Main(EasyHook.RemoteHooking.IContext InContext, string ChannelName, string[] args) { Interface = RemoteHooking.IpcConnectClient<QuestorLauncherInterface.QuestorLauncherInterface>(ChannelName); Interface.Ping(); }