Solved

Debugging COM Dll

Posted on 2002-04-18
6
543 Views
Last Modified: 2010-04-04
Hi,
  I read in so many sites that it's possible to debug a dll in delphi by giving the host appln in Run parameters -and setting the breakpoint in code..But i'm not able to do it..
My dll is an activex dll that uses an ISAPI Dll..
I set the output dir to the virtual folder and set the host appln as internetexplorer.exe..
But it's not working..?
There are detailed docs available for debugging ISAPI dlls.but not for COM objects..
Kindly help..

Thanks and Regards
Latha
0
Comment
Question by:premaa
6 Comments
 
LVL 12

Expert Comment

by:Lee_Nover
ID: 6951386
in delphi IDE set the projects Run->Parameters
set the Host Application to explorer.exe
then run Task Manager and terminate explorers process
then in delphi IDE simply run the project
it will then launch explorer as shell
you should be able to debug COM then

if your shell isn't explorer.exe then change it to your shell
sometimes when terminating the explorer shell it gets relaunched ..
0
 

Author Comment

by:premaa
ID: 6952959
Hi ,

 Thanks for the immediate response..
I meant the internet explorer..iexplorer.exe
The explorer is launced and the asp file is
also opened..the asp file calls the dll function
when i set the breakpoint it's not stopping..
I've set the output dir to the virtual folder..
is that the problem? or shld i make the working
folder itself virtual and then try?
getting an access violation at bordbk50.dll when i do a program reset..

Thanks and Regards
Prema
0
 
LVL 12

Expert Comment

by:Lee_Nover
ID: 6953287
dunno bout this
but if you have a com object then I guess it's the same
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

Author Comment

by:premaa
ID: 6953299
Thanks for trying to help....

Regards
Prema
0
 

Accepted Solution

by:
MimsyBoro earned 100 total points
ID: 7927890
To Debug A COM Object:
1. Compile with all the debug options (No Optimization, Frame Stacking, Debug Info, Map Symbols, Remote Debug Info the works...)
2. Set your breakpoints,
3. Run the application calling your COM Object

If the application running your COM Object is an ISAPI DLL or maybe a ASP Page you have two options:
a. Make another version of the COM Object that is Out-Of-Process (You do this by creating a new Appication and then calling New\Com Object).
Then you run this program before loading the ASP of ISAPI and they will connect to your COM Object

if you don't want to make an out-of-proc version there is an easier but longer method:
0. First make another virtual directory that points to the same location. Give it the same name but add on the word "Debug" (or anything else you like to distinguish the two)
1. Select the Virtual Directory you created that are calling this COM Object in the IIS control panel
2. Change it's Application Level to High. Make sure it can execute scripts.
3. Open up the Control Panel\Component Services
4. Find your Virtual Directory (usually under Component Services\Computers\My Computer\IIS MyVirtualDir) and open the property sheet
5. Under Identity Change the Identity to Interactive User
6. Under Advanced check launch in Debugger
7. Copy from the text-box "Debugger Path" the command line paramaters (usaully somthing like "/ProcessID:{3D14228D-FBE1-11D0-995D-00C04FD919C1}"
8. Set the run paramaters in Delphi to
Application: C:\winnt\system32\dllhost.exe
Paramaters: <the paramters you copied above>
Now run...
good luck
0
 
LVL 1

Expert Comment

by:pnh73
ID: 9003530
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept answer from MimsyBoro

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Paul (pnh73)
EE Cleanup Volunteer
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Show Listview image from database (String field) 5 137
Delphi 2 69
Firemonkey DbLookupComboBox equivalent ? 2 55
How to make Sign in, using Clientdataset? 1 28
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question