首页 > 解决方案 > 为什么这个字节没有改变?

问题描述

    using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Memory;

namespace xFUT22
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        public Mem m = new Mem();
        private void form1_load(object sender, EventArgs e)
        {
            if (!backgroundWorker1.IsBusy)
                backgroundWorker1.RunWorkerAsync();
        }

        private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
        {
            while (true)
            {
                int pID = m.GetProcIdFromName("FIFA22"); //Gaseste ID-ul jocului
                bool openProc = false; //verifica daca procesul e gasit
                if (pID > 0) openProc = m.OpenProcess(pID); //Porneste procesul, daca exista

                if (openProc) // De aici incepe modificarea memoriei
                {
                    if (TF.Checked)

                        m.WriteMemory("0x143DD9FF9", "byte", "0x45");
                    else

                        m.WriteMemory("0x143DD9FF9", "byte", "0x41");


                }




            }
        }
    }
}

我打开了游戏,我启动了我的应用程序,我选中了名为“TF”的框并且字节没有修改。

为什么?该内存地址仅处于读取/执行状态,但使用 CHEATENGINE 之类的程序我可以编辑字节,但使用我的程序,我不能。我究竟做错了什么?

标签: c#memory

解决方案


推荐阅读