Win32 question

I’ve got a wierd problem where the application opens a file for reading,
then passes that stdio file handle to SDL which then calls fread() on it.
It works fine when using the cross-compiler, but the fread() inside SDL
causes an access violation when the application is compiled with VC++.

In both cases the SDL DLL is compiled with VC++

Any ideas?
-Sam Lantinga (slouken at devolution.com)

I’ve had strange file access problems under dos/windows. I am able to
TYPE a file, but when I try to open it in my editor it fails. Possibly
check the ATTRIB settings on the file, maybe the fread is going
above and beyond what it needs to and is bothering to check those, even
when it could read the file if it wanted to. Also if somewhere there is
another open filehandle with write access you could get problems, I think
windows won’t allow writing and reading together. Maybe look for another
open filehandle in general.

-Dave

I’ve got a wierd problem where the application opens a file for reading,
then passes that stdio file handle to SDL which then calls fread() on it.
It works fine when using the cross-compiler, but the fread() inside SDL
causes an access violation when the application is compiled with VC++.

In both cases the SDL DLL is compiled with VC++

Any ideas?
-Sam Lantinga (slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec