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?
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.
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...
Best Regards,
BioPhysEngr http://blog.biophysengr.net
--
All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.
Bookmarks