Solved

How to capture TRACE macros

Posted on 1998-01-25
2
466 Views
Last Modified: 2013-11-20
How is it possible for an application to capture
TRACE mocros from an other application ?

I have try to use _CrtReportHook but this function only
capture the TRACE macros for his application and not for an other application (Both application are compiled in debug version) and I doesn't want to use MSVC++ 5.0 because on some machines I haven't install it.
0
Comment
Question by:mike_marquet
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Expert Comment

by:chris_a
ID: 1314810
I use a program from MSJ called TRACEWIN written by Paul DiLascia. This seems to pick up stray debug messages from other applications so it might do what you want.

The gist of hooking the messages seems to be "afxDump.m_pFile = &theTracer;" which is in the header that you include in your c app.

You should be able to find this on the web someplace.

Chris
0
 

Accepted Solution

by:
petern012698 earned 50 total points
ID: 1314811
The TRACE macro uses the DebugOutputString WIN32 function call.  To capture this output you need to debugthe applciation to which you want to look at the trace and then call WaitForDebugEvent and handle the event type OUTPUT_DEBUG_STRING_EVENT and this will give you the string that has been written.
You normally create a seperate thread to wait for this event.
Regards
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Process filename extension 3 208
NotAlone Challenge 20 88
Use of condition with 'serial' in ansible 2 87
Problem to Office 1 43
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question