Filestream.Seek + floppy drive
Hi, what i'm trying to do is to access floppy drive and read some data. To do this i'm using CreateFile p/invoke with filename "\\\\.\\A:" (that's because Filestream.Open doesn't support floppy device reading) and Filestream.Read with handle parameter returned from CreateFile. Everything works perfect except when i try to seek position using Filestream.Seek, it returns with IOException - invalid parameter. I've tried with p/invoke SetFilePointer from win32 but it returns with the same error (ERROR_INVALID_PARAMETER). Funny thing is that the same function works in pure c++ code... Does anyone know why this is happening and how to fix this?
Re: Filestream.Seek + floppy drive
Odd... Then I have not had use for a floppy drive for many years now. I think I would consider reading the entire file into memory and do the seek in memory instead.
Re: Filestream.Seek + floppy drive
Yeah it seems it is the only way to bypass this bug...
Re: Filestream.Seek + floppy drive
Quote:
Originally Posted by
Marduk
Yeah it seems it is the only way to bypass this bug...
Better performance reading it into memory rather than hitting the floppy drive too...