Hi
I have written a c++ code. It works well frequently but sometimes I see strange errors especially about out file streams. For example, this time I dealt with this messages:

'GABC.exe': Loaded 'G:\GABC\Debug\GABC.exe', Symbols loaded.
'GABC.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll'
'GABC.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll'
'GABC.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_597c3456\msvcp90d.dll', Symbols loaded.
'GABC.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_597c3456\msvcr90d.dll', Symbols loaded.
'GABC.exe': Loaded 'C:\WINDOWS\system32\shimeng.dll'
'GABC.exe': Unloaded 'C:\WINDOWS\system32\shimeng.dll'
First-chance exception at 0x7c919064 in GABC.exe: 0xC0000005: Access violation reading location 0x00000038.
First-chance exception at 0x7c919064 in GABC.exe: 0xC0000005: Access violation reading location 0x00000038.
First-chance exception at 0x7c919064 in GABC.exe: 0xC0000005: Access violation reading location 0x00000038.
First-chance exception at 0x7c919064 in GABC.exe: 0xC0000005: Access violation reading location 0x00000038.
First-chance exception at 0x7c919064 in GABC.exe: 0xC0000005: Access violation reading location 0x00000038.
Heap corruption detected at 006131C0
The program '[3704] GABC.exe: Native' has exited with code 0 (0x0).


I have perceived that it is because of my "fprintf" command but I can't understand why this was working well before and also on Linux yet but now fails in XP. I would be grateful if anybody could help me.

Thanks

Well you'd need to post some code to get a better diagnosis.

Are you using windows 7 ? If yes, thats ur problem !
Windows 7 doesnt let you access system32 files through an external program!! Hence, Access violation reading location 0x00000038.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.