如何从基于C ++的COM对象写入VB6立即窗口? [英] How do I write to the VB6 immediate window from C++ based COM object?

查看:196
本文介绍了如何从基于C ++的COM对象写入VB6立即窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开发了一个基于C ++的COM对象,以便在VB6应用程序中使用它。现在我需要添加一些日志来捕获一些bug。我从如何调试Visual Studio 6.0中的COM对象问题,我可以使用 OutputDebugString 函数。但是可以以某种方式写入VB6立即窗口?

I have developed a C++ based COM object to use it in a VB6 application. Now I need to add some logging to catch some of the bugs. I discovered from the answer to 'How to debug COM object in Visual Studio 6.0' question that I can use the OutputDebugString function. But is it possible to write to the VB6 immediate window somehow?

推荐答案

而不是试图写入直接窗口,使用Sysinternals(现为Microsoft Technet的一部分)的 DebugView 更为有用:

Rather than attempting to write to the immediate window, it would be generally more useful to use DebugView from Sysinternals (now part of Microsoft technet):


DebugView是一个应用程序,可让您监视
本地系统或网络上可通过$ b $获取的任何计算机的调试输出b TCP / IP。它能够显示内核模式和Win32调试
输出,因此您不需要调试器来捕获
应用程序或设备驱动程序生成的调试输出,也不需要修改
您的应用程序或驱动程序使用非标准调试输出API。

DebugView is an application that lets you monitor debug output on your local system, or any computer on the network that you can reach via TCP/IP. It is capable of displaying both kernel-mode and Win32 debug output, so you don't need a debugger to catch the debug output your applications or device drivers generate, nor do you need to modify your applications or drivers to use non-standard debug output APIs.

您可以在开发过程中以及在生产中使用它。 / p>

You can use this during development and also in production.


在Windows 2000,XP,Server 2003和Vista下DebugView将捕获:

Under Windows 2000, XP, Server 2003 and Vista DebugView will capture:


  • Win32 OutputDebugString

  • 内核模式DbgPrint

  • Windows XP中实现的DbgPrint的所有内核模式变体和
    Server 2003

这篇关于如何从基于C ++的COM对象写入VB6立即窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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