Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-Id: <5.1.0.14.2.20021111200729.0269dd50@pop3.norton.antivirus> X-Sender: pbmcbride/pop DOT rcn DOT com AT pop3 DOT norton DOT antivirus (Unverified) Date: Mon, 11 Nov 2002 20:31:58 -0500 To: cygwin AT cygwin DOT com From: "P. McBride" Subject: Re: How to read TAR diskette on Windows98/Me Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed 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/