Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


VB6 Retrieve Variable's Values?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Ally
Master Cheater
Reputation: 0

Joined: 20 Feb 2008
Posts: 261
Location: New York & Florida

PostPosted: Fri Aug 27, 2010 12:47 pm    Post subject: VB6 Retrieve Variable's Values? Reply with quote

Would it be possible to retrieve the value of a variable?
_________________
Click this to visit hackpacks website:


Click here to get Action Script Viewer V. 5.0 for Free!
Back to top
View user's profile Send private message
XaLeX
Expert Cheater
Reputation: 0

Joined: 19 Aug 2008
Posts: 226

PostPosted: Fri Aug 27, 2010 5:02 pm    Post subject: Reply with quote

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
View user's profile Send private message
Ally
Master Cheater
Reputation: 0

Joined: 20 Feb 2008
Posts: 261
Location: New York & Florida

PostPosted: Fri Aug 27, 2010 9:21 pm    Post subject: Reply with quote

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 >.>

_________________
Click this to visit hackpacks website:


Click here to get Action Script Viewer V. 5.0 for Free!
Back to top
View user's profile Send private message
XaLeX
Expert Cheater
Reputation: 0

Joined: 19 Aug 2008
Posts: 226

PostPosted: Sat Aug 28, 2010 2:05 am    Post subject: Reply with quote

erm.. cheat engine? Razz
Back to top
View user's profile Send private message
Jorg hi
I post too much
Reputation: 7

Joined: 24 Dec 2007
Posts: 2276
Location: Minnesota

PostPosted: Sat Aug 28, 2010 8:25 am    Post subject: Reply with quote

http://support.microsoft.com/kb/199824

Cool

_________________
CEF will always stay alive.
Back to top
View user's profile Send private message
XaLeX
Expert Cheater
Reputation: 0

Joined: 19 Aug 2008
Posts: 226

PostPosted: Sat Aug 28, 2010 8:38 am    Post subject: Reply with quote

Jorghi wrote:
http://support.microsoft.com/kb/199824

Cool

aren't those functions to be used from inside the code? i suppose he doesn't have it Razz
Back to top
View user's profile Send private message
Jorg hi
I post too much
Reputation: 7

Joined: 24 Dec 2007
Posts: 2276
Location: Minnesota

PostPosted: Sat Aug 28, 2010 9:17 am    Post subject: Reply with quote

XaLeX wrote:
Jorghi wrote:
http://support.microsoft.com/kb/199824

Cool

aren't those functions to be used from inside the code? i suppose he doesn't have it Razz


Its hard to tell what this guy wants..

Visual Basic 4 is fun.

_________________
CEF will always stay alive.
Back to top
View user's profile Send private message
tombana
Master Cheater
Reputation: 2

Joined: 14 Jun 2007
Posts: 456
Location: The Netherlands

PostPosted: Sat Aug 28, 2010 12:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
Ally
Master Cheater
Reputation: 0

Joined: 20 Feb 2008
Posts: 261
Location: New York & Florida

PostPosted: Sat Aug 28, 2010 12:54 pm    Post subject: Reply with quote

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.

_________________
Click this to visit hackpacks website:


Click here to get Action Script Viewer V. 5.0 for Free!
Back to top
View user's profile Send private message
tombana
Master Cheater
Reputation: 2

Joined: 14 Jun 2007
Posts: 456
Location: The Netherlands

PostPosted: Sun Aug 29, 2010 6:40 am    Post subject: Reply with quote

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
View user's profile Send private message
Ally
Master Cheater
Reputation: 0

Joined: 20 Feb 2008
Posts: 261
Location: New York & Florida

PostPosted: Sun Aug 29, 2010 10:09 am    Post subject: Reply with quote

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.

_________________
Click this to visit hackpacks website:


Click here to get Action Script Viewer V. 5.0 for Free!
Back to top
View user's profile Send private message
XaLeX
Expert Cheater
Reputation: 0

Joined: 19 Aug 2008
Posts: 226

PostPosted: Sun Aug 29, 2010 10:19 am    Post subject: Reply with quote

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
View user's profile Send private message
Jorg hi
I post too much
Reputation: 7

Joined: 24 Dec 2007
Posts: 2276
Location: Minnesota

PostPosted: Sun Aug 29, 2010 10:25 am    Post subject: Reply with quote

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
View user's profile Send private message
XaLeX
Expert Cheater
Reputation: 0

Joined: 19 Aug 2008
Posts: 226

PostPosted: Sun Aug 29, 2010 10:30 am    Post subject: Reply with quote

Jorghi wrote:
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
View user's profile Send private message
Jorg hi
I post too much
Reputation: 7

Joined: 24 Dec 2007
Posts: 2276
Location: Minnesota

PostPosted: Sun Aug 29, 2010 11:03 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites