OutputDebugString to a file???

Hello all

Is it possible to redirect all the output of OutputDebugString to a
flat file? I am thinking of creating a listener that captures the
output (from OutputDebugString fn.) from my app and writes them to a
flat file. But I am not sure how to go about creating a listener.
Googled results in some .NET listeners, however my requirement is for
VC++ app.

any pointers would be much appreciated

-Jam

0
jamni18 (1)
7/28/2006 8:19:28 AM
vc.mfc 33608 articles. 0 followers. Follow

4 Replies
572 Views

Similar Articles

[PageSpeed] 6

"Jam" <jamni18@gmail.com> wrote in message
news:1154074768.449365.205840@s13g2000cwa.googlegroups.com...
>
> Is it possible to redirect all the output of OutputDebugString to a
> flat file? I am thinking of creating a listener that captures the
> output (from OutputDebugString fn.) from my app and writes them to a
> flat file. But I am not sure how to go about creating a listener.
> Googled results in some .NET listeners, however my requirement is for
> VC++ app.
>
> any pointers would be much appreciated

You write a debugger, which doesn't actually do any debugging but does
capture the strings from the debugee and display and/or save them as you
wish. I did one once - I forget the details, but I suspect that there's some
code you can download somewhere if you don't want to work it out for
yourself.

--
Tim Ward
Brett Ward Limited - www.brettward.co.uk


0
tw2 (223)
7/28/2006 9:03:22 AM
Tim Ward wrote:
> "Jam" <jamni18@gmail.com> wrote in message
> news:1154074768.449365.205840@s13g2000cwa.googlegroups.com...
> >
> > Is it possible to redirect all the output of OutputDebugString to a
> > flat file? I am thinking of creating a listener that captures the
> > output (from OutputDebugString fn.) from my app and writes them to a
> > flat file. But I am not sure how to go about creating a listener.
> > Googled results in some .NET listeners, however my requirement is for
> > VC++ app.
> >
> > any pointers would be much appreciated
>
> You write a debugger, which doesn't actually do any debugging but does
> capture the strings from the debugee and display and/or save them as you
> wish. I did one once - I forget the details, but I suspect that there's some
> code you can download somewhere if you don't want to work it out for
> yourself.
>
Why bother? You can just get debugvw off of www.sysinternals.com
> --
> Tim Ward
> Brett Ward Limited - www.brettward.co.uk

0
rquirk1 (136)
7/28/2006 1:57:07 PM
"Jam" <jamni18@gmail.com> wrote in message 
news:1154074768.449365.205840@s13g2000cwa.googlegroups.com...
> Hello all
>
> Is it possible to redirect all the output of OutputDebugString to a
> flat file? I am thinking of creating a listener that captures the
> output (from OutputDebugString fn.) from my app and writes them to a
> flat file. But I am not sure how to go about creating a listener.
> Googled results in some .NET listeners, however my requirement is for
> VC++ app.
>
> any pointers would be much appreciated

DbgView from sysinternals.com captures the strings to a listbox and 
optionally saves them to a file.  I'm not sure they have source code to this 
(probably not).

-- David


0
dc2983 (3207)
7/28/2006 1:57:42 PM
There are a number of third-party applications that capture debug output and log it to the
screen or to a file.  I think there's one on www.sysinternals.com but a google search
should pop up quite a few.
					joe

On 28 Jul 2006 01:19:28 -0700, "Jam" <jamni18@gmail.com> wrote:

>Hello all
>
>Is it possible to redirect all the output of OutputDebugString to a
>flat file? I am thinking of creating a listener that captures the
>output (from OutputDebugString fn.) from my app and writes them to a
>flat file. But I am not sure how to go about creating a listener.
>Googled results in some .NET listeners, however my requirement is for
>VC++ app.
>
>any pointers would be much appreciated
>
>-Jam
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15979)
7/28/2006 5:44:12 PM
Reply:

Similar Artilces:

Limitation on inf and cat file name length?
Hi Driver Experts: I have a simple question: Must the inf and cat file names be in 8.3 format? Can they be longer than 8 chars? Any difference on 64-bit OS? Thanks in advance. Polaris there are no file name length restrictions in general. 64 bit XP (which is really server 2003 64 bit under the covers) has some restrictions on cat file name length, I think around 28 chars d -- This posting is provided "AS IS" with no warranties, and confers no rights. "Polaris" <etpolaris@hotmail.com> wrote in message news:uo#FMe5fKHA.6096@...

Retrieving exe file from email
Is there a way to get to the "exe" attachment blocked automatically by the Outlook? I have send an "exe" file from my friend's computer to my email, and forgot to rename the extension before mailing it. Now, the Outlook on my computer has blocked the access to this file, and I have no possibility to retrive it and save. I cannot even resent it somewhere else with the attachment, nothing. The attachmement is simply not accessible. Outlook has swallwed it, and does not allow any accesss to it. This seems to me like a very stupid solution to the security -- Microsof...

Old Wk3 Files
For Excel 2010, is there any way to get it to read old Lotus files? On Wed, 19 Jan 2011 17:28:40 -0800 (PST), Frank <FRBChemE@aol.com> wrote: >For Excel 2010, is there any way to get it to read old Lotus files? Run the old lotus app in a DOSBox DVM, and export the file in ASCII delimited format. If it already in ASCII form, you can import it directly. I am pretty sure there are some free apps in Linux that will open them as well. You would burn a Linux Live distro disk (Ubuntu Live DVD), boot that, and then run the compatible app within that session, open the old file, an...

EDB file to PST file?
Is there a utility (FREE) that I can convert an edb file to PST? I have some EDB files I want to take out some mail out of but not restore the whol thing. I test some COSTLY utilies but on need this for one time only. Thanks Mike What version of Exchange? Perhaps you could build a recovery server and do a disaster recovery scenario? -- Martin Blackstone MVP - Exchange http://www.swinc.com/resource/exchange.htm http://www.swinc.com/resource/e2kfaq_appxc.htm "Mike" <massey@rmci.net> wrote in message news:psst001mj15vod5fphqpfjc7hk39975d5l@4ax.com... > Is there a utilit...

import file so that it is a actual csv file, no excel cell version
How can I import a spreadsheet file from finance.yahoo.com for the history prices of a stock and import it into my charting software. My charting software reads ASCII "DOHLCV" or D,O,H,L,C,V or "Date", "O", "H", "L", "C", "V" . I have tried for a week trying to manipulate the data to be read by my charting software but it will not take it. When downloading data it automatically opens excel 97 spreadsheet and inserts the data. I save it as a CSV file but my charting program will not read it and when I open the fil...

Cannot open or save a tif file
Since 2 days i cannot open of save a tif file attached to a email. Can some one help? I am using outlook 2003 and windows xp Thanks Hans Do you have any more informaton or an error message? Can you save other types of files? Can you save a tif file from a different email? "hans" <hans_jeucken@hotmail.com> wrote in message news:258E9706-81FD-4FCB-8A50-2E8F68D26EFA@microsoft.com... > Since 2 days i cannot open of save a tif file attached to a email. > Can some one help? > I am using outlook 2003 and windows xp > > Thanks Hans The error message says that i d...

large files
client can not send a large jpeg. about 10mb. Is there a setting or a permission that I can adjust to allow this. Rick, Could be but more likely that an isp at your end or the other end have a max 6mb limit for mail. Any bigger and you should really be ftp'ing or using snail mail (heaven forbid). Why has it got to be 10M? Mark "rick" <rtamboli@sbcglobal.net> wrote in message news:c12c01c3ee5e$05b60fa0$a101280a@phx.gbl... > client can not send a large jpeg. about 10mb. Is there a > setting or a permission that I can adjust to allow this. ...

Transfer Outlook Express file to Outlook
Does anyone know how to transfer my address book from Outlook Express to Outlook? Thanks <anonymous@discussions.microsoft.com> wrote in message news:b18f01c3eccc$94a969c0$a101280a@phx.gbl... > Does anyone know how to transfer my address book from > Outlook Express to Outlook? > > Thanks Export as CSV file: import in outlook ...

How to: Open *.MSG File from Hard Drive via Code
I need to : Open *.MSG File from Hard Drive via Code and extract the file attachment. I have hundreds of these emails that we need the attachments extracted from. But the .msg files are on a hard drive. Someone help me out here.... I need the code to open and access the mailitem.... how do I open a .msg file? Use the CreateItemFromTemplate() method for that. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "B...

recover delete file option
I am looking for infomation on how to partially disable the Recover Deleted Items functionality in Outlook. I want the "dumpster" to operate as usual, retaining deleted items for a specified number of days for each mailbox store, but i want to grant only administrators the ability to recover deleted items. My company needs to be able to recover deleted items for litigation purposes but didn't want the users to be able to intentionally or accidentally destroy evidence. Thanks for any help. not possible, that I'm aware of...the mailbox owner can delete at will...you can eith...

Excel 2003 file freezes laptop
I took a laptop away from the office and tried to open a large spreadsheet on the local C: drive. Each time I tried the laptop froze and had to be rebooted. When I connected back to the LAN at work, and opened the same file on the local C: drive I had no problems. What could cause this? If there is any corruption is there a way to decompile or something as you would in Access? Thanks, Mich ...

Great Plains 9 Restore
Hi, I am trying to upgrade from great plains 9 to great plains 9 sp2. So, we have setup up a test server where I have installed GP 9 and restored the data. At the moment I am just reading the KB923671 from customer source and one of the prequisites that you need to do before installing the service pack deals with Reports.dic and Forms.dic My question is when you install GP on such a scanario does one have to copy/restore the Reports.dic and Forms.dic files from the live system [or from the backups]. Or are they irrelevant? Thanks Sanjay, The FORMS.DIC and REPORTS.DIC are irreleva...

Money Updates: "Money encountered an error processing the download file ('SMRTINET.ini').
My M04 has not been doing Money Updates (other parts of update are doing so: quotes, accounts) for a month now. The Call Summary for Money Updates says Money encountered an error processing the download file ('SMTINET.INI'). Out of curiosity I looked for such a file name on the computer--none. We have two accounts on Money. The other account is NOT encountering any such problem--Money Updates are working fine for it. No changes for either account of any seeming relevance preceded the loss of updates on the one account. Questions: (1) Does anyone know how to fix this? (2) Thes...

CFile create a hidden file
Is it possible to create a hidden file with MFC class CFile. I tried to use CFile::open(filename, CFile::hidden), but the created file is not hidden. Thanks and regards, Thomas hi, you can use the SDK createfile ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.WIN32COM.v10.en/fileio/fs/createfile.htm "milonass" wrote: > Is it possible to create a hidden file with MFC class CFile. > I tried to use CFile::open(filename, CFile::hidden), but the created file is > not hidden. > > Thanks and regards, > Thomas ex. HANDLE HFile = CreateFile(_T"C:\\...

OutputDebugString to a file???
Hello all Is it possible to redirect all the output of OutputDebugString to a flat file? I am thinking of creating a listener that captures the output (from OutputDebugString fn.) from my app and writes them to a flat file. But I am not sure how to go about creating a listener. Googled results in some .NET listeners, however my requirement is for VC++ app. any pointers would be much appreciated -Jam "Jam" <jamni18@gmail.com> wrote in message news:1154074768.449365.205840@s13g2000cwa.googlegroups.com... > > Is it possible to redirect all the output of OutputDebugStrin...

Repaired file
I am in Excel 2002. Whenever I make changes in some of my Excel template, and save them I get an error that says. "Microsoft Excel has encountered a problem and needs to close. We are sorry for the inconvenience." The information you were working on might be lost. Microsoft Excel can try to recover it for you. The box Revover my work and restart Excel is checked. This dialog box also gives me the option of sending an error report to Microsoft. My file name across the title bar now says "Repaired" I need to be able to make this error go away in my file. I can...

DAO360.DLL file
I am attempting to install Microsoft Publisher 2002 onto my Windows 98SE system. I have received a message to the effect that I only have version 3.60.2927.2 and I require 3.60.3706.0. Where can I get this file? This article, although addressing Access, it will be applicable to Publisher as well. You need to refresh your MDAC components. "Error in loading DLL" error message when you run a Microsoft Access wizard in Access 2002 http://support.microsoft.com/default.aspx?scid=kb;en-us;833220 -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnew...

file
I have an excel file that an employee tried to save and somehow has an error message on it that it will not save because locked by another station. I have done everything from trying to find out who last used it to deleting it and starting over and nothing works. PLEASE HELP amy Maybe Debra Dalgleish has the answer: http://www.contextures.com/xlfaqApp.html#ReadOnly or http://www.contextures.com/xlfaqApp.html#AlreadyOpen amy wrote: > > I have an excel file that an employee tried to save and > somehow has an error message on it that it will not save > because locked by a...

"File As" remains blank
In Contacts, Outlook 2003 treats "File As" as if it is blank, no matter what. This happened after sync'ing with a Pocket PC 2003, using ActiveSync 3.7.1 If I create a new .pst, I am OK till the next sync. After that any new contact is broken. What can I do????? ...

write data in .txt file
I am recieving data from remote server.And around 40 number of market it is receving.And i need only few of them i am trying to store that market like "EURUSD",USDJPY","GBPUSD" in a txt file. Whenever it comes to this market it will write data in that txt file. Can you help me to write little code. this is event code: m_MainEdit=m_MainEdit + "<Price Change>" + SessionId +RequestId + a ; m_MainEdit=m_MainEdit + Market +Bid + b + Ask + High ; if(Market="EURUSD") { // code for this function // create file EUEUSD...

Saving a backup of an Excel file
In Office 2000 and Office 95 Excel, I could have the computer make automatic backups of my Excel files as they were saved. I don't seem to be able to do this in XP even though on the tools menu at Save As... in Options it has a check box for backup. Any help with this???? tools>options>save "Sharyn Fisher" <sjfisher@lourdes.k12.pa.us> wrote in message news:05e101c381fa$3fa37570$a101280a@phx.gbl... > In Office 2000 and Office 95 Excel, I could have the > computer make automatic backups of my Excel files as they > were saved. > > I don't see...

.net xml file for Excel
Hi I have a .net web application and am trying to create an xml file to be opened in Excel on the client machine. I am placing data from a dataset into a text document so I think this is the correct approach. I printed out a small sample excel file saved as xml and noticed several tags near the top such as Workbook xmlns = "". I am using the xmlwriter, does it have all of this built in or should I just create a string and write it to the text file before entering the elements that represent the data I want for each cell? thanks. -- Paul G Software engineer. problem solved ...

Unalbe to open 2003 file with 2007 beta 2
I have a website I built with Publisher 2003. I installed 2007 beta 2, and now I can't open the 2003 file. It says the file has an error. I followed the instructions in the KB for file recognition, and it still won't open the 2003 file. I like 2007, but don't want to recreate all of the work I did in 2003. I would have talked you out of using the beta for a website. You can't be certain what changes will occur between now and the released version. -- JoAnn Paules MVP Microsoft [Publisher] "Mishkajb" <Mishkajb@discussions.microsoft.com> wrote in messa...

Scan Files
XP,Home Edition,SP3 in current computer In the near future I will have a new pc with Norton protection..Recently experienced malware threats but my pc seems to working ok for now..I basically have 90 to 95 % of personal files on backup being done before the computer was infected..However, if I decide I need to transfer some files I may want to use into the new pc how do I be sure those new files are clean..I have Norton in current pc which came with the pc in 2003 which I have never updated and I use it to scan and seems to work ok..Would this be the thing to do before I trans...

merging files
I have a seperate account for my wife and I in money. I would like to merge the 2 accounts....does anyone know of a way to do this? See http://www.bollar.org/msmoney/#Q90. "Brock" <anonymous@discussions.microsoft.com> wrote in message news:033901c3ac96$55d266f0$a101280a@phx.gbl... > I have a seperate account for my wife and I in money. I > would like to merge the 2 accounts....does anyone know of > a way to do this? ...