Hi again,
Using my own code all alone worked fine. On every machine with the same compiler and linker settings ...
The issue could be solved with adjusting the "C++ / Code Generation / Runtime library" setting in the VS project settings ... from "/MDd" to "/MD"
Of course i do not know, why exactly that happened, but that dll i called was built with another "Runtime library" than the Executable and that seemed to cause that serious problem ... anyway, to me it seems like the dll must have damaged the heap because it was built with other dependencies, now calling the same dependencies that the executable used ... that might happen, or not?
And that is usually avoided by the linker that throws tons of "undefined external" errors if for example i try linking a 64bit lib into a 32bit executable, or not?
Anyway, it was not code from the std. libs ( by the way never considered that to be really possible ) but i am quite happy: It wasn't mine as well ...
@jlb: To clarify ... if i backtrace the crash from where it occures ( in "seekg " method ) up to my own code ... what i did ... i end up right in the line that i posted initially ... once again:
1 2 3 4 5 6 7 8
|
ifstream fips(path);
if (fips.bad() || !fips.is_open()){
return -1;
}
fips.seekg(0, fips.end); // This crashes ...
std::streamoff length = fips.tellg();
fips.seekg(0, fips.beg);
|
which i found puzzeling.
... so i do not know ... maybe in this special case, how a better knowledge of this debugger should have helped me any further ... the point is: the code is and was OK ...
Thanks for the answers and replies, thanks for thinking about my problem, and best regards so far,
...