在Vista 64和COM上进行调试 [英] Debugging on Vista 64 and COM

查看:85
本文介绍了在Vista 64和COM上进行调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过exe构建并启动时,它以x86运行-它的名称在任务管理器中为* 32,并且可以通过COM与32位应用程序进行通信.我可以附加到此过程并成功调试它.但是,如果我运行Visual Studio(例如f5),则该应用程序无法找到COM目标,因此即使我可以对其进行调试,它也无法运行.但是,此行为仅限于我的Vista 64位计算机.在XP和Vista 32上尝试时,我没有问题.


推荐答案

由于某种原因,我昨天无法发布,所以我有一位同事发布了此问题.

要总结并添加一些其他信息.

1.从exe(在x86和任何CPU模式下)运行时,该应用程序在Vista 64上均可正常运行,因为它可以连接到其COM目标.
2.该应用程序只能在通过可执行文件启动时将过程附加到Visual Studio上,才能在Vista 64上进行调试,以便该过程可以附加到COM Target.
3.在Vista 32和XP上,可以在调试模式下运行该应用程序在Visual Studio 2005中可以成功连接到COM目标.
4.在Vista 64上,找不到COM目标.默认行为是创建一个新实例,然后该实例成功连接到该实例.
5.如果应用程序在Vista 64上的VS2005中运行时创建的COM目标没有在退出时被杀死,则重新运行时该应用程序

从上面可以看出,调试过程正在某种容器"中运行,而没有现有COM目标的可见性,但是具有任何COM目标的可见性在此容器"中创建的.如上所述,尽管这与在Vista 32和XP上看到的行为有所不同.

并假设上面的假设是正确的,此包含"是权限的结果,还是需要做的事情与Vista 64本身.同样,我该如何解决呢?

注意-我很清楚第2点是一种解决方法,但我想知道我遇到的问题是由什么引起的.

干杯
汤姆
For some reason I wasn't able to post yesterday so I got a colleague to post this question.

To summaries and add a little further info.

1. The app works fine on Vista 64 when run from the exe (in both x86 and Any CPU modes) in that it can connect to its COM target.
2. The app can be debugged from Visual Studio on Vista 64 ONLY if the process is attached to when started via the executable so that it can attach to the COM Target.
3. On Vista 32 and XP the app can be run in debug mode within Visual Studio 2005 and it successfully connects to the COM Target.
4. On Vista 64 the COM target is not found. The default behaviour is to create a new instance which it then succeeds in connecting to.
5. If a COM target created by the app when run within VS2005 on Vista 64 is not killed on exit then the app when re-run will find this target and re-attach.

From the above it suggests that the debugged process is running in some sort of 'container' without visibility of an existing COM Target, but with visibility of any COM target created within this 'container'. As stated though this is different to the behaviour seen on Vista 32 and XP.

As such, and assuming that the assumption above is correct, is this 'containment' the result of permissions, or something to do with Vista 64 itself. Equally how can I resolve this?

Note - I appreciate that point 2 is a workaround but I would like to know what the issue I am experiencing is caused by.

Cheers
Tom


这篇关于在Vista 64和COM上进行调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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