Introduction - If you have any usage issues, please Google them yourself
This the third, fourth (and last) part for building a thread deadlock detector. Please see the first and second article to understand wait is going on : A (working) implementation of API hooking (Part II)