June 27, 2005

Documentation change of StackWalk64

Due to the porting of my LeakFinder to x64, I run into a problem with StackWalk64

After contacting MS product support (SRQ050525601468) I got the answer that I was using the function incorrectly. The problem is now, that from my point of view, the usage of the function was correct regarding the documentation. So product support just changed the documentation, and now I am wrong. Here is the list of changes:

  1. If you provide a callback for ReadMemoryRoutine, GetModuleBaseRoutine and FunctionTableAccessRoutine then you can pass any non-null value for hProcess. A null value for hProcess is not a valid input.
  2. You need to pass a matching process handle to SymInitialize and StackWalk64 unless you are implementing your own callbacks for everything in StackWalk64. You’re passing in SymGetModuleBase64, for example, so StackWalk64 will use the given process handle when invoking SymGetModuleBase64. The handle passed to StackWalk64 must match the handle used in SymInitialize for such calls to work since you want SymGetModuleBase64 to use the information you recovered in SymInitialize.
  3. When you specify a ReadProcessMemory function, you also need to register a symbol callback and implement the CBA_READ_MEMORY callback.

Posted 2 years, 6 months ago on June 27, 2005
The trackback url for this post is http://blog.kalmbachnet.de/bblog/trackback.php/43/

Comments have now been turned off for this post