`
looyo
  • 浏览: 58974 次
  • 性别: Icon_minigender_1
  • 来自: 南京
文章分类
社区版块
存档分类
最新评论

在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)开始调试.
(这个时候你可能看到你所设置的断点好象没有生效,但是当你把断点调置在一个接口代码当中,再用一个外部应用程序去调用时,它就生效了。)

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics