public Main( RemoteHooking.IContext context, string channelName , HookParameter parameter ) { }
public void Run( RemoteHooking.IContext context, string channelName , HookParameter parameter ) { frameCount = 0; server = RemoteHooking.IpcConnectClient <HookServer>(channelName); server.isHook = false; try { var process = Process.GetCurrentProcess(); var modules = process.Modules; foreach (ProcessModule item in modules) { string moduleName = item.ModuleName; try { if (LocalHook.GetProcAddress(moduleName, "luaL_newstate") != IntPtr.Zero) { HookAllLuaFun(moduleName); break; } } catch { } } } catch (Exception ex) { MessageBox.Show(ex.Message); return; } server.isHook = true; while (true) { Thread.Sleep(10); frameCount++; if (!server.isHook) { Uninstall(); break; } } }