[comp.windows.ms.programmer] Question about file I/O in DLL's

markm@leland.Stanford.EDU (Mark Mavroudis) (05/17/91)

I've been having some problems doing file I/O when running in 
a DLL. I use sopen() to open the file (that works fine) and
then attempt to read from the file using _lread(). Yes, I have
a valid file handle and I'm using far pointers in my calls.
I am able to write to files but am unable to read. My question
is, how do I go about getting the error code that is normally
set in DOS (i.e. errno) from my DLL code. I'm sure that if I
knew what erwas occurring, I could solve the read problem.

As a secondary question, does anyone have a list of the functions
that are not valid for use in DLL's? I've found that functions
like atof(), which is in the library mdllcew.lib, are not
available to the DLL. Another is strtok(). If someone has the
list, and could post it, it would be much appreciated. I'm
using MSC 6.0 and the 5.1 linker (and of course, the 3.0 SDK).

As I'm sure most of you other Windows programmers have found,
Microsoft is trying to soak us for more money again with their
"new and improved" 'Support Advantage' program. If ever there
was a company that the FTC should come down hard on, it's
MickeySoft. 

Dave Veach c/o markm@leland.stanford.edu