To partially answer my own question which is sort of hinted at
in the documentation: On WindowsNT/2K/XP you can
read a floppy using Windows API: CreateFile("\\.\\A:",...)
and ReadFile(...) which I guess is close enough to map
to the normal UNIX way of reading raw devices (/dev/fd0),
but on Windows95/98/Me you need to use CreateFile("\\.\\vwin32",...)
and then DeviceIoControl() to read the sectors from the disk.
Simple enough, just fill in a few magic numbers, a 0 to read, or
a 1 to write, and specify the device number (A: is 1, B: is 2, ...)
and then start sector (512 byte sectors) and number of sectors.
Searching www.google.com for vwin32.vxd tells the
story. The best short sample is code is
http://www.codeguru.com/system/ReadSector.html which seems
to work for all Windows versions (uses ReadFile or DeviceIoControl
where necessary).
Now if someone could just plug this into the "/dev/fd0" handling code.
I am also interested in how to do this for tapes, as "/dev/st0"
works for WindowsNT/2K/XP, but I'm sure you have to do similar
steps to read tapes. I haven't found that one yet.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- How to read TAR diskette on Windows98/Me Paul McBride
- Re: How to read TAR diskette on Windows98/Me P. McBride
- Re: How to read TAR diskette on Windows98/Me Christopher Faylor