Esempio n. 1
0
        public void Dispose()
        {
            if (hasInjectedDll)
            {
                DllRegistrar.EjectFakeTrackIRDll();
            }

            freePieTrackIRMutex.Dispose();

            if (trackIRWorker != null)
            {
                trackIRWorker.Dispose();
            }
        }
Esempio n. 2
0
        private WorkerProcess <TrackIRWorker> SetupRealTrackIRDll()
        {
            string realDllPath = DllRegistrar.GetRealTrackIRDllPath(Environment.CurrentDirectory);

            if (realDllPath == null)
            {
                return(new WorkerProcess <TrackIRWorker>());
            }

            freepieData.Write(x => x.TrackIRData, new TrackIRData {
                LastUpdatedTicks = DateTime.Now.Ticks
            });
            var worker = new WorkerProcess <TrackIRWorker>(Path.Combine(realDllPath, NPClientName).Quote() + " " + Process.GetCurrentProcess().MainWindowHandle.ToInt64() + " " + doLog);

            worker.Start();
            return(worker);
        }
Esempio n. 3
0
        void SetupFakeTrackIR()
        {
            if (File.Exists(Path.Combine(Environment.CurrentDirectory, NPClientName)))
            {
                if (doLog)
                {
                    InitDllLogging();
                }

                DllRegistrar.InjectFakeTrackIRDll(Environment.CurrentDirectory + @"\");
                hasInjectedDll = true;
            }
            else
            {
                Debug.WriteLine("No fake trackir dll found in current directory - obviously not spoofing.");
            }
        }