Example #1
0
        /// <summary>
        /// 写内存整数型
        /// </summary>
        /// <param name="pID">进程ID</param>
        /// <param name="bAddress">0x地址</param>
        /// <param name="value">写入值</param>
        /// <returns>false失败 true成功</returns>
        public static bool WriteMemoryInt32(int pID, int bAddress, int value)
        {
            int handle = GetProcessHandle(pID);
            int num2   = MProcess._MemoryWriteInt32(handle, bAddress, ref value, 4, 0);

            MProcess.CloseHandle(handle);
            return(num2 != 0);
        }
Example #2
0
        /// <summary>
        /// 读内存整数型
        /// </summary>
        /// <param name="pID">进程ID</param>
        /// <param name="bAddress">0x地址</param>
        /// <returns>0失败</returns>
        public static int ReadMemoryInt32(int pID, int bAddress)
        {
            int num    = 0;
            int handle = GetProcessHandle(pID);
            int num3   = MProcess._MemoryReadInt32(handle, bAddress, ref num, 4, 0);

            MProcess.CloseHandle(handle);
            if (num3 == 0)
            {
                return(0);
            }
            else
            {
                return(num);
            }
        }