File access across DLL
I have a console app that will link with a DLL.
In the app, I open a fiel stream with this:
hFile = fopen( filename, "r" );
and pass the handle to the DLL.
In the DLL, I use fread() to read the file.
In fread(), a calling to _lock_str() throw an exception.
Why? is it something related to locking and unlocking of my stream?
[375 byte] By [
ytkok] at [2007-11-20 7:06:23]

# 2 Re: File access across DLL
How to use shared version?
include different header file? add macro definition? or linking with other library?
ytkok at 2007-11-10 23:00:57 >

# 3 Re: File access across DLL
How to use shared version?
include different header file? add macro definition? or linking with other library?Yep, the latter case. In fact, typically you specify the /MD(d) compiler option for this. And in the case compiler uses msvcrt(d).lib.
# 5 Re: File access across DLL
And in my turn, I've being built the sample, and it works perfectly. :D