How to create an ISAPI DLL and debug it in delphi - WeOnlyDo Discussion board

How to create an ISAPI DLL and debug it in delphi (General questions)

by bencoder, Thursday, August 14, 2008, 16:44 (5944 days ago) @ wodDamir

Well, alright!

You need IIS on your computer.
!!! Start the IIS Admin and WWW-Publishing Service with your UserAccount-Settings !!!

1. Open Delphi Project. (I open it in Delphi2007)

2. Specify in Project/Options... (last menupoint) -> Directories -> OutputDirectory a valid Directory, equivalent to the one specified.

3. Go to DELPHI_PROGRAM_DIR /lib/ and temporarly(!) replace the ComObj.dcu and OleServer.dcu with their equivalent in the debug-subdirectory. (That makes debugging easier)

4. Compile/Generate the application.

5. Go to IIS Administration Tool: My Workplace -> (right click) manage -> Services and Application -> Internet Information Services -> [Choose the Website] -> (right click) Properties -> Basicdirectory (lower 3rd register from left) -> Configuration... -> Add -> [Select the compiled DLL and an Extension e.g. wod ] -> [Checkbox: Check file exists DONT CHECK] -> OK -> OK

6. Make sure WWW-Publishing Service (usually last Service) is Running.

7. Open URL: http://localhost/somefilename.wod -> Blank Page is success :-)

8. Set a breakpoint in the WebModuleDestroy-Method.

9. In Delphi: Menu Run/Attach to Process.../[select the inetinfo.exe] -> Connect

10. Wait until all modules are loaded and click Run...(|>) if a breakpoint stopps the loading process.

11. Now stop the WWW-Service. The Debugger should halt at the breakpoint.

12. Debug...

Hope this is detailed enough and that is works :)


Complete thread: