It looks like you're mixing standard C io functions with Windows IO functions, which usually leads to trouble. The standard output handle on Windows isn't exactly like a normal file handle, and doesn't sort all the states that a regular handle does.
- File, FileDescriptor, Handle, Windows mmierzwa
- Re: File, FileDescriptor, Handle, Windows Varriount