Jump to content
  • Advertisement
Sign in to follow this  
Unreal

Problem with _CrtSetReportHook with VS.2005

This topic is 4672 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello! :D I have a problem with _CrtSetReportHook (also i have the same problem with _CrtSetReportHook2) I want to direct the debu output to a file.. so i made a function: static int report(int reportType, char *message, int *returnValue) in my class. And i add code to dump output to a file.. but the problem is that at the time it reaches the line: FILE *fp = fopen("./CRTDebug.txt", "a+"); I get runtime error: Unhandled exception at 0xblablabla (msvcr80d.dll) in project.exe: 0xC000005: Access violation reading location 0xblablabla and throws me a file "stream.c" pointing at this line: /* * if the stream is not inuse, return it. */ if ( !inuse( (FILE *)__piob ) ) { Dont ask for the full source inside my function(report()).. it doesnt matter. i tried to put only this line: FILE *fp = fopen("./CRTDebug.txt", "a+"); and i get the same error again. This is happening at visual studio 2005. If i run it under visual studio 6 then its runing and dumping perfectly! so.. what is going on? thanks for your time! :D

Share this post


Link to post
Share on other sites
Advertisement
Don't notice the "a+".. the same is happen with "w". I drop the ./ i also create the file my self.. but nothing.. :/

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!