Solved

Call Stack

Posted on 2001-06-19
3
191 Views
Last Modified: 2010-05-02
Hi,

I was wondering if it is possible to reproduce the call stack information in a compiled binary as if you had pressed CTRL+L in devel.,

i.e.

private sub whatever()
  on error goto errHandler

  ...

errHandler:
  if err.number <> 0 then
    msgbox callStack
  endif
end sub

public function callStack() as string
  //gathers and returns a string containing the call stack
end function

Any ideas?

Thanx

PS I will adjust the points as necassary.
0
Comment
Question by:wolfjjj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 6209300
i know that in  VB.net you will have this build-in, but in VB6- ?
listening & Learning
0
 
LVL 1

Accepted Solution

by:
morgan_peat earned 50 total points
ID: 6209575
We had this question not long ago.

The answer was something along the lines of:
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.
0
 
LVL 1

Author Comment

by:wolfjjj
ID: 6209586
It appears <= VB6 cant do what I've asked and morgan_peat has suggested a viable solution.

Thanx for you input.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question