• Advertisement

Archived

This topic is now archived and is closed to further replies.

"Memory could not be read"

This topic is 5119 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

I have an class which reads standard ini files. It''s actually exported from a dll, and works fine when I write stuff to an ini file. But when I try to read something from it, after I exit the app, I get a "memory could not be read" error. When I debug the app, I get this message :- Unhandled exception in TestIni.exe(FILEIO.DLL): 0xC0000005: Access Violation. and this "debug assertion failed" message when I run the app using a debug version of the dll:- ... Expression: _BLOCK_TYPE_IS_INVALID(pHead->nBlockUse) ... and when I click "Retry" in that message box, I get the following message :- The exception Breakpoint A breakpoint has been reached. (0x80000003) occurred in the application at location 0x0032416a. The interesting part is, when I directly use this class without exporting it from a dll, it works just fine. Any ideas why this is happening? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
hm.. no? :D




If that''s not the help you''re after then you''re going to have to explain the problem better than what you have. - joanusdmentia

davepermen.net

Share this post


Link to post
Share on other sites
I found that post, but I didn''t find it helpful. I have another class in the same dll, that reads ascii files, which works perfectly fine. I actually copied most of the code from the ini class. When the latter works fine, why doesn''t the former?

Share this post


Link to post
Share on other sites
The CRT of one of the dependent dlls was set to just DEBUG MULTITHREADED though the fileio project and the exe both had DEBUG MULTITHREADED DLL. Thanks.

Share this post


Link to post
Share on other sites

  • Advertisement