Original Post
I've implemented an exception handler in my program which is able to dump the stack and list the name of any function pointer it finds. It does this by comparing pointers: 1) At the beginning of execution, record the stack pointer immediately, to know where the stack begins. 2) Save each function's name and pointer in an array. It's important to save them in the order they appear. 3) On an exception, get the current stack pointer, and read 32-bit words from there to the initial stack pointer (grabbed in step 1). 4) If the word read is between the pointer to one function and the next, print that function's name. (If anyone knows a better way, I'd love to hear it; this is rather hackish.) This seems to work well, but there is one problem - it won't list functions in the Windows API. I've seen other programs do this, so there must be some way; how would I go about doing it?