PRODUCT : Borland C++ NUMBER : 1392 VERSION : 3.x OS : WIN DATE : October 25, 1993 PAGE : 1/1 TITLE : Setting breakpoints in a DLL Trying to set a breakpoint in a DLL is very simple once the DLL and calling program are loaded in the proper order. The common mistake made is loading the calling program in an attempt to the DLL. Actually you need to do the reverse, load the DLL then execute the calling program. The following steps outline the chain of events you need to follow. 1. From the Windows Program Manager double-click on the TDW icon to run the debugger. 2. Next hit the F3 key to bring up the "Load Module" dialog and Alt-d to "Add DLL". In the "DLL name" field type in the full path and filename for your DLL. You will see the name of your DLL appear in the "DLL's & programs" list followed by a graphic character and two exclamation points. This indicates your DLL is loaded. Now hit the ESC key to exit this dialog. 3. Now use Alt-F to drop down the File menu and select "Open...". Select any Windows program to load, "Calc.exe" from the windows directory for example. Once the program has loaded enter F9 to run the program. This will take you out to Windows with the selected program running. 4. Once back in Windows Switch-Task (Alt-Tab) to the Program Manager and run the program that calls your DLL. When the calling program loads your DLL you will be dropped back into TDW. 5. Now that your back in the debugger you can set breakpoints in your DLL. After setting your breakpoints enter F9 to start the DLL running again. When your calling program hits the breakpoint in your DLL you will once again be dropped back into the debugger at the breakpoint. As you can see the process is simple once you know the proper order to load and execute the files. Have a exhilarating hacking session. DISCLAIMER: You have the right to use this technical information subject to the terms of the No-Nonsense License Statement that you received with the Borland product to which this information pertains.