⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 msgtracer.shtml

📁 mfc资源大全包含MFC编程各个方面的源码
💻 SHTML
字号:
<HTML>

<!-- Header information-->
<HEAD>
   <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
   <!-- add your name in the CONTENT field below -->
   <META NAME="Author" CONTENT="Tom Moor">
   <TITLE>Debugging - Message Tracer</TITLE>
</HEAD>

<!-- Set background properties -->
<body background="/fancyhome/back.gif" bgcolor="#FFFFFF">

<!-- A word from our sponsors... -->
<table WIDTH="100%">
<tr WIDTH="100%"><td align=center><!--#exec cgi="/cgi/ads.cgi"--><td></tr>
</table>



<CENTER><H3><FONT COLOR="#AOAO99">
<!-- Article Title -->Message Tracer
</FONT></H3></CENTER>
<HR>

<!-- Author and contact details -->
This article was contributed by <!-- Author Email --><A HREF="mailto:jeskes@msg.de"><!-- Author Name -->Sigi Jeske</A>.

<p><!-- The 'p' starts a paragraph of normal text -->

The purpose of MsgTrace is to display tracing output.
<BR>
MsgTrace displays tracing output of any application	that uses Win32's OutputDebugString() function. 
(e.g TRACE() macros, all MFC output, ...)
<BR>
MsgTrace can start monitoring the debug output of any running application.
An applications can initiate its monitoring or the monitoring can be started using the MsgTrace.

<p><H4>MsgTrace consists of the following projects</H4>
MsgTracer: The tracing program where all output is displayed<BR>
MsgTracerPS: A proxy/stub DLL to allow access to the tracing component from other applications<BR>
MsgTracerLib: A small static library that must be linked to debuggee applications that will
auto-attach to MsgTracer<BR>
MsgTracerTest: A small testing application that shows how to use MsgTrace<BR>


<p><H4>How to install MsgTrace</H4>
<PRE><TT><FONT COLOR="#990000">
1. Copy the MsgTracer.exe and MsgTracerPS.dll onto your system
2. Register both executables:
   MsgTracer.exe /RegServer
   regsvr32 MsgTracerPS.dll
</FONT></TT></PRE>

If you want to use the auto-attach feature copy inc/lib files
<PRE><TT><FONT COLOR="#990000">
 MsgTracerLib.h
 MsgTracerLib.lib
</FONT></TT></PRE>
to a destiniation directory where your development environment can see them


<p><H4>Use MsgTrace with already built applications</H4>

<PRE><TT><FONT COLOR="#990000">
1. Start debuggees that you want to monitor (MsgTrace can monitor as many debugees as you want)
2. Start MsgTracer.exe: the Tracer-Output-Window somes up and shows you an empty output list
3. Open processes dialog: either via menu [Tracing]/[Processes] or press on the monitor bitmap in the toolbar
4. Select process you want to monitor and press [Attach]
</FONT></TT></PRE>
The process is attached to MsgTracer and shows all debugging output in the output list<BR>
Unfortunately you cannot detach anymore!


<p><H4>Use Auto-Attach-Feature with new applications</H4>
<PRE><TT><FONT COLOR="#990000">
1. Include "MsgTracerLib.h"<BR>
2. Use the macro MSG_TRACE_ATTACHCURRENTPROCESS(); to automatically attach process to MsgTracer
   Use MSG_TRACE_WRITE( "Hello World" ); to trace the string "Hello World"
   Use MSG_TRACE_PRINTF( ( "Hello %d nd %s", 42, "World" ) ); to trace the string "Hello 42 nd World"<BR>
4. Link Debug version with MsgTracerLib.lib<BR>
</FONT></TT></PRE>

<!-- Zipped source -->
<p><!-- first the filename (zip files) --><A HREF="MsgTracer.zip">Download source - 179 KB</A>

<!-- Posted / Update  date mm/dd/yy - add to the list -->
<p>Date Posted: 06.21.98<!-- date here -->



<P><HR>

<!-- Codeguru contact details -->
<TABLE BORDER=0 WIDTH="100%">
<TR>
<TD WIDTH="33%"><FONT SIZE=-1><A HREF="http://www.codeguru.com">Goto HomePage</A></FONT></TD>

<TD WIDTH="33%">
<CENTER><FONT SIZE=-2>&copy; 1998 Zafir Anjum</FONT>&nbsp;</CENTER>
</TD>

<TD WIDTH="34%">
<DIV ALIGN=right><FONT SIZE=-1>Contact me: <A HREF="mailto:zafir@home.com">zafir@home.com</A>&nbsp;</FONT></DIV>
</TD>
</TR>
</TABLE>

<!-- Counter -->
<CENTER><FONT SIZE=-2><!--#exec cgi="/cgi/counters/counter.cgi"--></FONT></CENTER>


</BODY>
</HTML>



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -