Sign in to follow this  
Followers 0
mr_unreliable

need help getting memory address of a variable

2 posts in this topic

hi gang,

In vb, if you wish to obtain the memory address of a variable,

you can use the VarPtr function.

Yes, yes, I do know that autoit doesn't have a varptr function,

but it DOES have dllcall.

The "api-way" to get the memory address of a variable is this:

Declare Function VarPtr Lib "msvbvm50.dll" (ByRef Var As Any) As Long

I can't see how to convert this to dllcall. As I understand it, it

has to be "ByRef" because you want to get the actual address of

the parameter, not the address of a copy of the parameter (i.e.,

"ByVal").

any help would be appreciated, jw

p.s. if you are tempted to "flame" me for wishing to deal with

absolute memory addresses, kindly stifle yourself. Although you

may not agree, there are legit reasons for doing this.

Share this post


Link to post
Share on other sites



hi gang,

In vb, if you wish to obtain the memory address of a variable,

you can use the VarPtr function.

Yes, yes, I do know that autoit doesn't have a varptr function,

but it DOES have dllcall.

The "api-way" to get the memory address of a variable is this:

Declare Function VarPtr Lib "msvbvm50.dll" (ByRef Var As Any) As Long

I can't see how to convert this to dllcall. As I understand it, it

has to be "ByRef" because you want to get the actual address of

the parameter, not the address of a copy of the parameter (i.e.,

"ByVal").

any help would be appreciated, jw

p.s. if you are tempted to "flame" me for wishing to deal with

absolute memory addresses, kindly stifle yourself. Although you

may not agree, there are legit reasons for doing this.

there are udf's in the scripts and scraps forum that may be of use to you for memory address interaction. Personally i don't flame anybody, but i'm not too sure how good of an idea it is to start off that defensively...

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0