Call Stack And Variables

stijn koopal
06-09-2005, 03:55 AM
Hello

I got two questions:

1 ) Is there any function or API that will get everything from the callstack in an variable. I mean the list that the vb ide gives you when you press call stack....

2 ) Is there a way to list all your variables in a project ( private and public scope ), something like this

for each variable in Project
debug.print variable
next

George7a
06-09-2005, 06:43 AM
I don't think this is not possible.
The only way is to handle your own call stack...

Create your own 'stack' object (with push, pop, etc). Each time you enter/leave a procedure, you 'push' the procedure name onto the stack, then 'pop' the name off again once you leave the procedure. This'll keep track of where you are in the call stack.
Of course, you need to hard-code in each procedure name.

However, Dan Fergus offers a workaround using dgbhelp.dll in his article Get Debug Info From Production App -- http://www.ftponline.com/vsm/2002_05/magazine/columns/blackbelt/default_pf.aspx (requires registration).

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum