Пример #1
0
        public void Disconnect()
        {
            sInstance = null;
            _server.ReportMessage("Uninstalling and releasing");

            // Remove hooks
            //OnSelectPlayerChangeMenuHook.Dispose();
            EasyHook.LocalHook.Release();
        }
Пример #2
0
        //Connects client and pings server to show injected DLL is responsive
        public InjectionEntryPoint(EasyHook.RemoteHooking.IContext context, string channelName)
        {
            sInstance = this;
            _server   = EasyHook.RemoteHooking.IpcConnectClient <ServerInterface>(channelName);
            _server.Ping();
            _server.ReportMessage("InjectionEntryPoint constructed");

            //Stand up a server in our process so we can know when to disconnect
            try
            {
                EasyHook.RemoteHooking.IpcCreateServer <DLLServer>(ref channelName2, System.Runtime.Remoting.WellKnownObjectMode.Singleton);
            }
            catch (Exception e)
            {
                _server.ReportException(e);
            }
        }