Behemoth1987 Posted March 7, 2009 Posted March 7, 2009 (edited) Hello everyone. I'm new here;) I'm writing macro but I have problem with multi pointers pointer is : 0x008189a0 lvl 1 offset is:0xA0 lvl 2 offset is:0x54 Anyone could give me simple example "How To Use" multi pointers?...Thx. I try this but It's show me "0" when in CE value is"1" so pls help me:) #include <NomadMemory.au3> Global $WindowTitle = "Window Name" Global $PID = WinGetProcess($WindowTitle) Global $Ptr = 0x008189a0 Global $Off1 = DEC("A0") Global $Off2 = DEC("54") $Handle = _MemoryOpen($PID) $baseADDR = _MemoryRead($Ptr, $Handle) $LVL1 = '0x' & Hex($baseADDR + $Off1) $baseADDR = _MemoryRead($LVL1, $Handle) $LVL2 = '0x' & Hex($baseADDR + $Off2) $baseADDR = _MemoryRead($LVL2, $Handle) MsgBox("1","Z", $baseADDR) Edited March 10, 2009 by Behemoth1987
Richard Robertson Posted March 7, 2009 Posted March 7, 2009 There's no such thing as a multi pointer. What you are doing is either reading two values that happen to be declared near each other or are part of a struct. Have you tried just adding the two offsets to the original to get two separate addresses?
Skrip Posted March 7, 2009 Posted March 7, 2009 There's no such thing as a multi pointer.He means multi-level pointers. [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]
Behemoth1987 Posted March 7, 2009 Author Posted March 7, 2009 He means multi-level pointers. Yes i mean multi-level pointers...In CE it looks like that:Step 1: Add Address ManualyStep 2:Select "Pointer"Step 3: Address 008189a0 Offset A0Step 4: Click on Add pointer Step 5 : Address 008189a0 Offset 54Then I have got my adress with value = 1 But the question is How can I do this by using _MemoryRead or _MemoryPointerRead?Thx4Help.
Richard Robertson Posted March 7, 2009 Posted March 7, 2009 There's no such thing as a multi level pointer either. It's just one address. One address can never be anything more. Like I said, try adding the offset manually and using the newly computed addresses.
Behemoth1987 Posted March 7, 2009 Author Posted March 7, 2009 Ok when I do that in CE Step 1: Add Address Manualy Step 2:Select "Pointer" Step 3: Address 008189a0 Offset A0 Step 4: Click on Add pointer Step 5 : Address 008189a0 Offset 54 In step 3 CE gives me and address for example: address_1=00D961C8 then when I click Add Pointer and write second address "008189a0" CE gives address_2=006A8984 after that write second offset "54" and CS gives address_3=00E7D630 Now I try same thing in autoit... #include <NomadMemory.au3> Global $WindowTitle = "Window Name" Global $PID = WinGetProcess($WindowTitle) Global $Ptr = 0x008189a0 Global $Off1 = DEC("A0") Global $Off2 = DEC("54") $Handle = _MemoryOpen($PID) $baseADDR = _MemoryRead($Ptr, $Handle) $LVL1 = '0x' & Hex($baseADDR + $Off1) $baseADDR = _MemoryRead($LVL1, $Handle);Address 008189a0 + Offset A0 = Address_1 = 00D961C8 $LVL2 = '0x' & Hex($baseADDR + $Off2) $baseADDR = _MemoryRead($LVL2, $Handle);Address_1 + Offset 54 = Address_3 <> 00E7D630 MsgBox("1","Z", $baseADDR) Any idea what's wrong with that? Maybe I need to try something with Address_2 part...but I have no idea what should I write...Help pls^^
Richard Robertson Posted March 7, 2009 Posted March 7, 2009 I'm about to give up because you don't listen. Use the two addresses of 0x00818A40 and 0x008189F4. Read those. Stop using the add operator in code. The addresses you came up with were completely wrong.
Behemoth1987 Posted March 7, 2009 Author Posted March 7, 2009 Shit...I'm so fking stupid^^ THX bro Love You you help me much:D... it's sooo easy:) working code: #include <NomadMemory.au3> Global $WindowTitle = "Name" Global $PID = WinGetProcess($WindowTitle) Global $Ptr = 0x008189a0;pointer Global $Off1 = DEC("54");offset 1 Global $Off2 = DEC("A0");offset 2 $Handle = _MemoryOpen($PID);open memory $baseADDR = _MemoryRead($Ptr, $Handle);read base address $LVL1 = '0x' & Hex($baseADDR + $Off1);add offset 1 to base address $baseADDR = _MemoryRead($LVL1, $Handle);make new base address $LVL2 = '0x' & Hex($baseADDR + $Off2);add offset 2 to new base address $baseADDR = _MemoryRead($LVL2, $Handle); make final address MsgBox("Info","Resoult", $baseADDR) ; shows value of final address _MemoryClose($Handle)
Richard Robertson Posted March 7, 2009 Posted March 7, 2009 (edited) You were supposed to offset from the new value? That makes very little sense. I'm actually surprised something like that worked. I completely misunderstood from the beginning. That's just plain weird code. Edited March 7, 2009 by Richard Robertson
Behemoth1987 Posted March 7, 2009 Author Posted March 7, 2009 (edited) I fight with that for 2 days, but it is easy, we need to make address normaly: pointer+offset then we got new base address that we can use for seccond offset, thats all;) Thx for your time and help. Edited March 7, 2009 by Behemoth1987
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now