public static void BeginInjection(Int32 InTargetPID)
        {
            InjectionWait WaitInfo;

            lock (InjectionList)
            {
                if (!InjectionList.TryGetValue(InTargetPID, out WaitInfo))
                {
                    WaitInfo = new InjectionWait();

                    InjectionList.Add(InTargetPID, WaitInfo);
                }
            }

            WaitInfo.ThreadLock.WaitOne();
            WaitInfo.Error = null;
            WaitInfo.Completion.Reset();

            lock (InjectionList)
            {
                if (!InjectionList.ContainsKey(InTargetPID))
                {
                    InjectionList.Add(InTargetPID, WaitInfo);
                }
            }
        }
Beispiel #2
0
        public static void BeginInjection(int targetPID)
        {
            InjectionWait waitInfo;

            lock (InjectionList)
            {
                if (!InjectionList.TryGetValue(targetPID, out waitInfo))
                {
                    waitInfo = new InjectionWait();

                    InjectionList.Add(targetPID, waitInfo);
                }
            }

            waitInfo.ThreadLock.WaitOne();
            waitInfo.Error = null;
            waitInfo.Completion.Reset();

            lock (InjectionList)
            {
                if (!InjectionList.ContainsKey(targetPID))
                {
                    InjectionList.Add(targetPID, waitInfo);
                }
            }
        }