Again about physical disks.

Serguei DACHIAN Serguei.Dachian@univ-lemans.fr
Tue Mar 23 03:24:00 GMT 1999


> > I got and installed the DLL, include files (which were with DLL) and also
> > your version of mount utility.  I can't still read my floppy (without
> > speaking about hard drives).  Here is my bash session:
> > [...]
> > P.S.  Your readme say that some feateres are for NT only.  Does it mean
> > that i will not be able to read /dev/fd0 and/or /dev/hda ???
> 
> Sorry, I haven't noticed, you're on a Win9X system. The used
> methods to access partitions and hard drives are only
> useful on NT. Thanks to M$ :-(
>
So what finally these all means: is there no ANY way to read a physical
sector from a physical disk under CygWin on a Win9x system ???

I've also tried to use native Windows API call DeviceIOControl, but
CreateFile (one needs to open disk with this one at first) fails. The
following code:
-------------------------------------------------
HANDLE myDiskHandle;
   if ( (myDiskHandle = CreateFile (disk,
                                    GENERIC_READ,
                                    FILE_SHARE_WRITE,
                                    NULL,
                                    OPEN_EXISTING,
                                    FILE_ATTRIBUTE_NORMAL,
                                    NULL)
       ) == INVALID_HANDLE_VALUE )
  {
    printf("Error opening disque !!!\n");
  }
------------------------------------------------
fails (that is prints "Error opening disque !!!") with any of:
char disk[]="\\\\.\\PHYSICALDRIVE2" ;
char disk[]="\\\\.\\A:" ;
char disk[]="\\\\.\\C:" ;

I think this is again Win9x problem, because SDK documentation is not clear
about it.

So finally I state once more my question.  Is there ANY (at least one)
method to read a physical disk from a physical drive using CygWin on a Win9x
system???

Any help whould be greatly appreciated.

Regards,
                Serguei.
___________________________________________________________________________
Serguei DACHIAN
Laboratoire de Statistique et Processus,
Universite du Maine, Av. Olivier Messiaen
72085 Le Mans CEDEX 9, FRANCE
Tel.   : +33 (0)2 43 83 37 18
Fax.   : +33 (0)2 43 83 35 79
E-mail : Serguei.Dachian@univ-lemans.fr
WWW    : http://www.univ-lemans.fr/sciences/statist/cvs/thesard.html#dachian


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com



More information about the Cygwin mailing list