Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Debugging COM Dll

Posted on 2002-04-18
6
Medium Priority
?
553 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
Technology Partners: 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 400 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: 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.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

718 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