在Delphi当中调试COM+组件

How to debug a COM+ component in Delphi.
如何在Delphi当中调试COM+组件


Abstract: Debugging a COM+ component on Windows 2000.
摘要:在Windows 2000当中调试一个COM+组件(WinXP/Win2003适用)

Assuming you have already created a COM+ component in Delphi, these are steps for debugging:
假定你已经在Delphi当中建议了一个COM+组件,下面是调试步骤:

1. In Delphi, go into the menu option Project ¦ Options ¦ Linker and setting the Include remote debug symbols option.
1.在Delphi当中,找到Project菜单,点击Options...项,然后在弹出的对话框当中找到Linker栏,并且设置(选中)Include remote debug symbols 选项

2. Go into the menu option Run ¦ Parameters.
2.转到菜单Run,点击Parameters...项,
  On the Local tab, under Host Application enter C:/WINNT/system32/dllhost.exe  (In WinXP/Win2k3: %windir%/system32/dllhost.exe)
  在弹出的对话框当中,在Host Application下的输入框内,输入 C:/WINNT/system32/dllhost.exe (这里的C盘请使用实际的操作系统路径替代,在Winxp或者Win2003当中,则输入C:/WINDOWS/system32/dllhost.exe)
  Under Parameters enter  /ProcessID:{GUID}
  Parameters下的输入框内输入 /ProcessID:{GUID}
  where GUID is the Application ID for your application.
  这个GUID是你的应用程序

This GUID can be obtained by going into Control Panel ¦ Administrative Tools ¦ Component Services
Locate the COM+ application under Component Services ¦ Computer and open its properties.
On the first page below, the description box, is the Application ID.
这个GUID可以通过打开控制面板,找到管理工具,然后打开组件服务,展开计算机,找到COM+应用程序并打开它的属性。
在第一页下方,描述框下面就是这个应用程序ID号。(需要说明的是这个应用程序,是指的COM+当中的应用程序,即组件的一个管理分组,我们组件安装在其中。也就是它的GUID,而并不是我们的COM组件自己的CLSID)


After you have entered these parameters you can run the app (F9) to begin debugging.
完成这些参数的输入,你就可以运行应用程序(按F9)开始调试.
(这个时候你可能看到你所设置的断点好象没有生效,但是当你把断点调置在一个接口代码当中,再用一个外部应用程序去调用时,它就生效了。)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值