Exemple #1
0
        public int ReadIntValue(int handle, int add)
        {
            int[] r = new int[1];

            try
            {
                Windows32API.ReadProcessMemory(handle, add, r, 4, 0);
                return(r[0]);
            }
            catch (Exception)
            {
                return(-1);
            }
        }
Exemple #2
0
        public string ReadStringValue(int handle, int add)
        {
            byte[] b = new byte[1];

            try
            {
                Windows32API.ReadProcessMemory(handle, add, b, 4, 0);

                var temp = Encoding.Unicode.GetString(b);
                return(temp.Split('\0')[0]);
            }
            catch (Exception)
            {
                return("");
            }
        }