Solved

Debugging COM Dll

Posted on 2002-04-18
6
550 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses
Course of the Month8 days, 17 hours left to enroll

617 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