如何调试自己的COM组件? [英] How can i debug own COM component?

查看:420
本文介绍了如何调试自己的COM组件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要调试COM组件.我有组件的代码.我需要在函数上设置断点以停止应用程序调试.如何在Visual Studio 6.0中做到这一点?当我放置断点时,应用程序不会停止.你能帮我吗?

I need to debug COM component. I have the code of the component. I need to put breakpoint to the function to stop application to debug. How can i do it in Visual Studio 6.0? Application does not stop, when i put the breakpoint. Can you help me?

推荐答案

你好,谢尔盖,

我猜你不从VS内部运行COM组件.要调试COM组件,您必须将调试器附加到组件的过程中.


已添加:

http://www.codeguru.com/forum/showthread.php?t=322238



干杯,


曼弗雷德(Manfred)
Hello Sergey,

I guess your not running the COM component from within VS. To debug the COM component you''d have to attach the debugger to the process of the component.


Added:

http://www.codeguru.com/forum/showthread.php?t=322238



Cheers,


Manfred




有很多解决方案可以调试您的com.

我个人将调用添加到"DebugBreak();".在COM主类构造函数上,并启动一个示例程序,将显示调试窗口,然后选择现有的VC会话(已加载com代码的会话).
VC在DebugBreak行上破坏代码...

它适用于所有程序,例如服务,COM,ActiveX DirectShow筛选器...

再见...
Hi,

There''s a lot of solution to debug your com.

Personally I add a call to "DebugBreak ();" on the COM main class constructor and I start a sample programme, the debug windows appear and I select the existing VC session (session with the com code loaded).
Vc break the code on DebugBreak line...

It''s work with all programs like service, COM, ActiveX DirectShow filter...

Bye...


创建一个使用COM对象的EXE,打开COM项目,执行它,它将询问该exe,将其指向创建的将使用此COM的exe.对象,您可以做任何您想做的事
Create an EXE that uses the COM Object, open the COM Project, Execute it and it will ask for the exe, point it to the exe created which will use this COM Object and you can do whatever you wannna do


这篇关于如何调试自己的COM组件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆