Suppose: To debug hook.dll hook.h hook.lib
1. Establish a new project test, copy the HOOK's entire engineering directory to the TEST directory
2. In the Test engineering, you need to use the "::" "./hook/hook.h" in this source file in the source file in the TEST project (or stdafx.h ", you can use" :: "to use" :: "to the hook. H in all export functions, variables, and class 3. In Test's Project -> Link-> Object / Library Modules Add ./HOOK/debug/hook.lib
4. After compiling Test, I found that hook.dll was found. This requires setting PATH. You can add E: / TEST / HOOK / DEBUG / can also set the path in Autoeexe.bat in engineering -> debug-> working directory.
5. The Hook.DSP project is added to the TEST project through the project -> Insert Project Into Workspace.
6. Set the hook project to act engineering, in Engineering> Debug> Executable for Debug Session: E: /TEST/debug/test.exe
7. Set breakpoints now, press F5 to be commissioned normally
Note: When the debug DLL is mapped to another application (non-TEST) process space and runs, the breakpoint set in this DLL is invalid, of course, can be viewed by MessageBox, if the DLL is an MFC extended DLL, then You can also use trace or AFXDUMP to view variables.