   Problem with _CrtSetReportHook with VS.2005
  Hello! :DI 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 0xblablablaand 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
  does the file exist allready??  try dropping the ./ infront of the filename.CheersChris   ;  Don't notice the "a+".. the same is happen with "w". I drop the ./  i also create the file my self.. but nothing.. :/   