资 源 简 介
thunk是一组动态生成的ASM指令,它记录了窗口类对象的this指针,并且这组指令可以当作函数,既也可以是窗口过程来使用。thunk先把窗口对象this指针记录下来,然后转向到静态stdProc回调函数,转向之前先记录HWND,然后把堆栈里HWND的内容替换为this指针,这样在stdProc里就可以从HWND取回对象指针,定位到WindowProc了-thunk is a group of dynamically generated ASM command, it records the window class object this pointer, and this group of commands can be used as a function of both the process can also be a window to use. thunk first window object this pointer record, and then shifted to the static callback function stdProc, before turning record HWND, and then the contents of the stack where HWND replace this pointer, so in stdProc can retrieve the object from the HWND pointer, locate the WindowProc