예제 #1
0
파일: Worker.cs 프로젝트: CairoLee/svn-dump
        public static bool AttachInstance(string ProcessName)
        {
            // need the Keys in the Dictionary asap...
            ReCache();

            Process[] processesByName = Process.GetProcessesByName(ProcessName);
            if (processesByName.Length == 0)
            {
                return(false);
            }

            mMemReader.ReadProcess = processesByName[0] as Process;
            if (mMemReader.OpenProcess() == false)
            {
                return(false);
            }
            mMemReader.loadPointer(Constants.CharPointer);

            return(true);
        }