Exemplo n.º 1
0
        public static bool Initialize(int processId)
        {
            try {
                Process.GetProcessById(processId);
                if (!GameMemory.Open(processId))
                {
                    return(false);
                }

                BaseAddress  = (uint)GameMemory.MainModule.BaseAddress;
                WindowHandle = Process.GetProcessById(processId).MainWindowHandle;

                return(true);
            } catch (ArgumentException) {
                return(false);
            } catch (Exception) {
                return(false);
            }
        }