示例#1
0
        public void Run(RemoteHooking.IContext InContext, string inChannelName, EntryPointParameters _parameter)
        {
//#if DEBUG
//            // Instant launch debugger on debug build (does cause crash when the process is not already running)
//            Debugger.Launch();
//#endif

            if (inChannelName == null)
            {
                throw new ArgumentNullException(nameof(inChannelName));
            }

            try
            {
                BeginHook();
                ipc.IsInstalled(RemoteHooking.GetCurrentProcessId());
                RemoteHooking.WakeUpProcess();
            }
            catch (Exception extInfo)
            {
                ipc.ReportException(extInfo);
                return;
            }

            while (isAlive(_parameter.HostProcessId))
            {
                if (DateTime.Now > OldDateTime + new TimeSpan(0, 0, 2))
                {
                    NeedTakeScreen = true;
                }
                ipc.Ping();

                Thread.Sleep(100);
            }

            EndHook();
        }
示例#2
0
 public EntryPoint(RemoteHooking.IContext InContext, string InChannelName, EntryPointParameters _parameter)
 {
     ipc             = RemoteHooking.IpcConnectClient <InjectorInterface>(InChannelName);
     this.parameters = _parameter;
 }