Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Debugging COM Dll

Posted on 2002-04-18
6
Medium Priority
?
557 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

885 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