finding a spot in memory
Hey ppl,
Just wondering if there is anyway of finding where something is in memory.
Example a textbox on a form.
Is there anyway of finding the memory location of the said textbox or the value of.
I am using vba for this also.
Don''t know if it can be done but worth a shot.
Cheers
vba?
Visual Basic .. ?
If it is then...well....I don''t reallt know if this would work as I don''t know much VB...but I know there are lots of ways to do that in other Basic languages (QBasic being one of them)...look through the language docs...there might be a function that does exactly what you want, though doubtful).
C/C++ can only pass variables "by value"...which is why they have things like pointers...In Basic (and many other languages) variables can be passed "by value" and/or "by refrence"...in essence when you pass a function some text, you are really passing a pointer (refrence) to the memory location the text is stored at...the language itself takes care of the rest...again look through the language docs, Basic has lots of in-built library functions, which should allow you to do what you want.
I remember useing PEEK on the stack to find the memory location of arrays in Basic back in the Apple days...which might work
Visual Basic .. ?
If it is then...well....I don''t reallt know if this would work as I don''t know much VB...but I know there are lots of ways to do that in other Basic languages (QBasic being one of them)...look through the language docs...there might be a function that does exactly what you want, though doubtful).
C/C++ can only pass variables "by value"...which is why they have things like pointers...In Basic (and many other languages) variables can be passed "by value" and/or "by refrence"...in essence when you pass a function some text, you are really passing a pointer (refrence) to the memory location the text is stored at...the language itself takes care of the rest...again look through the language docs, Basic has lots of in-built library functions, which should allow you to do what you want.
I remember useing PEEK on the stack to find the memory location of arrays in Basic back in the Apple days...which might work
Well, you could write a function in C that takes a pointer as an argument, make a DLL, and call that function from VB passing the object by reference.
quote:
DrPizza quote:
"Visual Basic .. ?"
for Applications.
Ah...thank you
How many different "flavors" of VB are there?
In 98'' I took a local college class titled "Advanced Visual Basic"...It had a prerec titled "Introduction to Visual Basic", but I was able to get my instructer in my "C" class to wave the requirement...after about six weeks I dropped the class, as it was supposedly "advanced" yet, we hadn''t even started covering arrays! I have nothing against the VB language (other then it creates some monseriously bloated apps), or even the people who use it...but I always wondered about that class, which seemed so much more like a intro to programing type class then what the title suggested...I shiver to think of what the real "Introduction to Visual Basic" covered
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement