finding a spot in memory

Started by
3 comments, last by Themonkster 21 years, 6 months ago
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
Advertisement
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
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:Visual Basic .. ?

for Applications.
char a[99999],*p=a;int main(int c,char**V){char*v=c>0?1[V]:(char*)V;if(c>=0)for(;*v&&93!=*v;){62==*v&&++p||60==*v&&--p||43==*v&&++*p||45==*v&&--*p||44==*v&&(*p=getchar())||46==*v&&putchar(*p)||91==*v&&(*p&&main(0,(char**)(--v+2))||(v=(char*)main(-1,(char**)++v)-1));++v;}else for(c=1;c;c+=(91==*v)-(93==*v),++v);return(int)v;}  /*** drpizza@battleaxe.net ***/
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