Mega Code Archive

 
Categories / Delphi / Examples
 

Debugging a dll in windows xp

Question: I used to debug DLLs in Delphi using Delphi's menu item 'Run Parameters' where I set the 'Host Application' to be any program which would load my DLL. This does not work on Windows XP any more. Answer: Run the program that loads the DLL from the Delphi IDE (yes, this means that it has to be a Delphi host application). After this, switch back to the Delphi IDE and press Ctrl-Alt-M to list all modules. Sometimes there will be your DLL with path, but if not, then right click on the DLL, select 'Reload Symbol Table' and set the full path to the DLL. Then the breakpoints will be active. If the DLL will be compiled in the system path (any directory on %PATH%) this problem dont occur.