#fseek() rets -1
04-Aug-93 20:51:30
Sb: #50479-#fseek() rets -1
Fm: PAUL BROPHY 70613,3304
To: Lee Hart [Microsoft] 76150,2536
>You had lseek fail on Windows NT? Did you report that in this forum so that
>we could fix the bug?
Lee, I did have llseek fail on NT. The reason I didn't report it is that I
don't consider it a bug (more like a documentation deficiency). I opened the
file using CreateFile which returns a HANDLE but llseek expects an HFILE
handle. GetLastError reported an invalid file handle. So I dug deeper into
the Win32 docs. Unfortunately (for me) the Beta docs aren't cross referenced
very well. I found no references to the function SetFilePointer in the
descriptions for CreateFile or ReadFile. I couldn't readily find a list of all
file functions (by category, type, etc.) but eventually stumbled across a
reference to it somewhere. Nowhere did I see anything that said "don't call a
function with a bad argument or bad things will happen". Oops, I hope the
county's product liability lawyers are'nt lurking about.
So the fault is really my own, since I have 8 gigapiles of manuals, books &
cheat sheets open at any given time. I often use the Win16 SDK texts since
they are in separate books (yes, this has caused me some grief (time to stock
up on Grief Release <g> or pray for updated manuals).
Thanks for the concern – Paul
There are 2 Replies.