View previous topic :: View next topic |
Author |
Message |
Ally Master Cheater
Reputation: 0
Joined: 20 Feb 2008 Posts: 261 Location: New York & Florida
|
Posted: Fri Aug 27, 2010 12:47 pm Post subject: VB6 Retrieve Variable's Values? |
|
|
Would it be possible to retrieve the value of a variable?
_________________
|
|
Back to top |
|
 |
XaLeX Expert Cheater
Reputation: 0
Joined: 19 Aug 2008 Posts: 226
|
Posted: Fri Aug 27, 2010 5:02 pm Post subject: |
|
|
Not by name, as names are just used by the compiler to distinguish variables. You need to know the variable's memory address, then you can read it with ReadProcessMemory.
|
|
Back to top |
|
 |
Ally Master Cheater
Reputation: 0
Joined: 20 Feb 2008 Posts: 261 Location: New York & Florida
|
Posted: Fri Aug 27, 2010 9:21 pm Post subject: |
|
|
XaLeX wrote: | Not by name, as names are just used by the compiler to distinguish variables. You need to know the variable's memory address, then you can read it with ReadProcessMemory. |
How could I find the memory address >.>
_________________
|
|
Back to top |
|
 |
XaLeX Expert Cheater
Reputation: 0
Joined: 19 Aug 2008 Posts: 226
|
Posted: Sat Aug 28, 2010 2:05 am Post subject: |
|
|
erm.. cheat engine?
|
|
Back to top |
|
 |
Jorg hi I post too much
Reputation: 7
Joined: 24 Dec 2007 Posts: 2276 Location: Minnesota
|
|
Back to top |
|
 |
XaLeX Expert Cheater
Reputation: 0
Joined: 19 Aug 2008 Posts: 226
|
Posted: Sat Aug 28, 2010 8:38 am Post subject: |
|
|
Jorghi wrote: | http://support.microsoft.com/kb/199824
 |
aren't those functions to be used from inside the code? i suppose he doesn't have it
|
|
Back to top |
|
 |
Jorg hi I post too much
Reputation: 7
Joined: 24 Dec 2007 Posts: 2276 Location: Minnesota
|
|
Back to top |
|
 |
tombana Master Cheater
Reputation: 2
Joined: 14 Jun 2007 Posts: 456 Location: The Netherlands
|
Posted: Sat Aug 28, 2010 12:34 pm Post subject: |
|
|
Retrieving the value of a variable in VB6 ?
Something like this:
Code: |
Dim MyVariable As Integer
MyVariable = 5
MsgBox( MyVariable )
|
See? In that last line I retrieved the value of a variable.
Could you be more specific in what you mean and what you want?
|
|
Back to top |
|
 |
Ally Master Cheater
Reputation: 0
Joined: 20 Feb 2008 Posts: 261 Location: New York & Florida
|
Posted: Sat Aug 28, 2010 12:54 pm Post subject: |
|
|
tombana wrote: | Retrieving the value of a variable in VB6 ?
Something like this:
Code: |
Dim MyVariable As Integer
MyVariable = 5
MsgBox( MyVariable )
|
See? In that last line I retrieved the value of a variable.
Could you be more specific in what you mean and what you want? |
Literally, it's what I said. I want to name a variable and the project to tell me the value of the variable I commanded.
_________________
|
|
Back to top |
|
 |
tombana Master Cheater
Reputation: 2
Joined: 14 Jun 2007 Posts: 456 Location: The Netherlands
|
Posted: Sun Aug 29, 2010 6:40 am Post subject: |
|
|
Ally wrote: | Literally, it's what I said. I want to name a variable and the project to tell me the value of the variable I commanded. |
Oh wait, you mean 'name a variable' like dynamically at runtime? Like a textbox where you enter a variable name of a variable in your own program and the program retrieves the value of that? I don't think that's possible in VB6. Maybe a language like php can do that.
|
|
Back to top |
|
 |
Ally Master Cheater
Reputation: 0
Joined: 20 Feb 2008 Posts: 261 Location: New York & Florida
|
Posted: Sun Aug 29, 2010 10:09 am Post subject: |
|
|
tombana wrote: | Ally wrote: | Literally, it's what I said. I want to name a variable and the project to tell me the value of the variable I commanded. |
Oh wait, you mean 'name a variable' like dynamically at runtime? Like a textbox where you enter a variable name of a variable in your own program and the program retrieves the value of that? I don't think that's possible in VB6. Maybe a language like php can do that. |
Yes, that's exactly what I mean. I didn't think it was possible either.
_________________
|
|
Back to top |
|
 |
XaLeX Expert Cheater
Reputation: 0
Joined: 19 Aug 2008 Posts: 226
|
Posted: Sun Aug 29, 2010 10:19 am Post subject: |
|
|
As I have already said before, it's possible, but you can't do it "by name". Use CE to find out the address in which the variable you're interested in is stored, and read that. (Side note: you'll most likely need to use pointers so go through the CE Tutorial if you haven't done so already)
|
|
Back to top |
|
 |
Jorg hi I post too much
Reputation: 7
Joined: 24 Dec 2007 Posts: 2276 Location: Minnesota
|
Posted: Sun Aug 29, 2010 10:25 am Post subject: |
|
|
Now I kind of understand this now.
Just create an 2demension Array to store the name & value exp
Dim cnt = 0;
Function addvar(varname,value)
Array[cnt][0] = varname;
Array[cnt][1] = value
cnt + =1;
return cnt; 'The ID of the variable'
End Function
Function getValueByName(varname)
For i...in Array 'search array
if (array[i][0] = varname)
return array[i][1];
end if
Next
Function getValueById(id)
return array[id][1];
Next
Function geNameByID(id)
return array[id][0];
Next
This is pseudo code.. you should easily be able to convert to VB6.
_________________
CEF will always stay alive. |
|
Back to top |
|
 |
XaLeX Expert Cheater
Reputation: 0
Joined: 19 Aug 2008 Posts: 226
|
Posted: Sun Aug 29, 2010 10:30 am Post subject: |
|
|
I think the epic fail lies in the fact that he's trying to access a variable of another application by name.
|
|
Back to top |
|
 |
Jorg hi I post too much
Reputation: 7
Joined: 24 Dec 2007 Posts: 2276 Location: Minnesota
|
Posted: Sun Aug 29, 2010 11:03 am Post subject: |
|
|
Then he can just link the 2 apps together using a library. When the first application runs, the second application automatically runs.. but the Exe to open the second application is actually an application that makes it visible.............................
Or he could use the localConnection.
Problem solved..
_________________
CEF will always stay alive. |
|
Back to top |
|
 |
|