Giter Club home page Giter Club logo

Comments (11)

erfg12 avatar erfg12 commented on June 7, 2024

One problem is you can't use integers to represent hex. Use hex bytes for your AoB scan string.

Also, post your VS console log while debugging your solution.

from memory.dll.

JKstring avatar JKstring commented on June 7, 2024

thank you ,it run

MemLib.AoBScan("0000000000000000", 0x7fffffffffffffff, "20 BD A0");
[DEBUG] memory scan starting... (base:0x0000000140000000 max:000000027e997000
search only be between base and max?
not like Cheat Engin?

and
MemLib.AoBScan("base", 0x7fffffffffffffff, "20 BD A0");

Program is operating at Administrative level. Now opening process id #11332.
Now storing module addresses for process id #11332.
引发的异常:“System.AggregateException”(位于 mscorlib.dll 中)

"base" can not use?

my English is not good, please forgive me

@erfg12

from memory.dll.

erfg12 avatar erfg12 commented on June 7, 2024

Doesn't matter if it runs before base. I guarantee the address you are looking for is not located before the base address as your program launch address and base address are the same address. It literally cannot be before it, it's not possible.

Show me some code.

from memory.dll.

JKstring avatar JKstring commented on June 7, 2024

Maybe the data I'm looking for is greater than max?

static bool is_open = false;
private void Form1_Load(object sender, EventArgs e)
        {
            int a = Win32.User32.RegisterHotKey(Handle, 100, 0, Win32.User32.VkKeyScan((byte)'Q'));
            System.Diagnostics.Process.GetCurrentProcess().PriorityClass = System.Diagnostics.ProcessPriorityClass.High;
            Win32.User32.SetActiveWindow(ip);
            Win32.User32.SetForegroundWindow(ip);
            Win32.User32.ShowWindow(ip, Win32.User32.SHOW_OPENWINDOW);
            openGame();
        }
private void openGame()
        {
            gameProcId = MemLib.getProcIDFromName("sao_hr");
            if (gameProcId > 0)
            {
                bool is_ok = MemLib.OpenProcess(gameProcId);
            }
        }
private void TestFunction()
        {
            if (gameProcId > 0)
            {
                var x = MemLib.AoBScan("base", 0x7fffffffffffffff, "20 BD A0");//MemLib.AoBScan("0x0000000000000000", 0x7fffffffffffffff, "20 BD A0");
                x.Wait();
                var t = x.Result;
                //int c = MemLib.readByte("sao_hr.exe+00AEAD58,48,100,0,1B0,510,9");
                int c = MemLib.readByte("2346cc29");
                if (c == 2)
                    MessageBox.Show("1");
                else
                    MessageBox.Show("0:" + c);
            }
        }
protected override void WndProc(ref Message m)
        {
            const int WM_HOTKEY = 0x0312;
            switch (m.Msg)
            {
                case WM_HOTKEY:
                    switch (m.WParam.ToInt32())
                    {
                        case 100:    
                            is_open = !is_open;
                            if (is_open) {
                                if (t == null || !t.IsAlive)
                                {
                                    (t = new System.Threading.Thread(() => { TestFunction(); /*AutoSSC();*/ })).Start();
                                }
                            }     
                            break;
                    }
                    break;
            }
            base.WndProc(ref m);
        }
private void Form1_FormClosed(object sender, FormClosedEventArgs e)
        {
            Win32.User32.UnregisterHotKey(Handle, 100);
            MemLib.closeProcess();
        }

I think I know,It's OK to use "base+0".

Thanks for your help!

from memory.dll.

Mizkii avatar Mizkii commented on June 7, 2024

private UIntPtr get64bitCode(string name, string path, int size = 16)
{
string theCode = LoadCode(name, path);
if (theCode == "")
return UIntPtr.Zero;
string newOffsets = theCode;
if (theCode.Contains("+"))
newOffsets = theCode.Substring(theCode.IndexOf('+') + 1);
byte[] memoryAddress = new byte[size];
if (!theCode.Contains("+") && !theCode.Contains(",")) return new UIntPtr(Convert.ToUInt64(theCode, 16));

from memory.dll.

erfg12 avatar erfg12 commented on June 7, 2024

Thanks @muhahah4 and @hollow87

Try the new version 1.2.10 and try AoB scan again @JKstring

from memory.dll.

JKstring avatar JKstring commented on June 7, 2024

Exception too.The test code is the 5F

target platform is X64 ,only use "base+0"
target platform is X86 ,always Exception

Exception:

Program is operating at Administrative level. Now opening process id #10932.
Now storing module addresses for process id #10932.
引发的异常:“System.AggregateException”(位于 mscorlib.dll 中)

I have a part of the unsafe code code that must run in X86, I temporarily disable it, can memory.dll modify the X64 program on the X86 target platform?

The memory I search may not be in game but in DirectX DLL, so can the search address be greater than max address?

@erfg12

from memory.dll.

hollow87 avatar hollow87 commented on June 7, 2024

If the target process is x64 you have to target the x64 architecture.

from memory.dll.

erfg12 avatar erfg12 commented on June 7, 2024

Exactly what @hollow87 said. When compiling, if you want to use the "Any CPU" option, be sure to uncheck the "prefer x86" checkbox: https://github.com/erfg12/memory.dll/wiki/64bit-Games

Otherwise, just compile with "x64" as your target.

from memory.dll.

JKstring avatar JKstring commented on June 7, 2024

OK.Thank help!
@erfg12 @hollow87

from memory.dll.

erfg12 avatar erfg12 commented on June 7, 2024

So, is everything working? If so, I'll close this issue out.

from memory.dll.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.