Some time ago, I started to write things with VC7, do something, I feel that the smart sensing of VC7 is really better than VC6. One day, I plan to use VC7 to make a hook program, so I will first use VC6 a program in VC7. Rewriting again, the result is a serious mistake. It is very strange, watching the class of the hook, there seems to be no mistake, add a MessageBox in the hook, then call, find you can show Message, it seems to be Setwindowshookex outline, after a few steps, still did not find something big. Last look at the statement of the function, suddenly think of the article about PASCAL and C's different stacking methods, my function declaration is not extern C, but I remember that as long as the call between the things written in different languages, I don't have problems, and I haven't missed it in VC6. I didn't have a big hope to try it, load the hook , Actually succeed! Write it according to the specification, try to avoid these unnecessary bugs ...