Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - driveinfo() return information about a disk drive http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 driveinfo()         Return information about a disk drive
------------------------------------------------------------------------------
 Declaration
   file.hdr

 Syntax
   func logical driveinfo extern
   param value uint  uDrive, ;
               ulong nSectorsPerCluster, ;
               ulong nClusters, ;
               ulong nBytesPerSector, ;
               ulong nClusterPerDrive

 Arguments
   uDrive is the drive number to retrieve information about.
   0 is the current drive, 1 is drive A:, 2 is drive B:, etc.

   nSectorsPerCluster receives the number of sectors per cluster.

   nClusters receives the number of available clusters.

   nBytesPerSector receives the number of bytes per sector.

   nClusterPerDrive receives the total number of clusters on the drive.

 Return
   A logical indicating if the specified drive exists and is ready.

 Description
   This function compiles information about a specified disk drive.
   The drive characteristics are placed into the function parameters.

 Example
   #define EXAMPLE_FILE
   #include example.hdr

   proc Test_driveinfo
   vardef
      uint nSecPerClust
      uint nClust
      uint nBytesPerSec
      uint nClustPerDrv
   enddef
   if driveinfo( 3, nSecPerClust, nClust, nBytesPerSec, nClustPerDrv )
      ? "Characteristics of drive C:"
      ?
      ? "  Clusters per drive: ", nClustPerDrv
      ? "  Available clusters: ", nClust
      ? "  Sectors per cluster:", nSecPerClust
      ? "  Bytes per sector:   ", nBytesPerSec
   else
      ? "Drive does not exist or is not ready"
   endif
   endproc

   proc main
   Test_driveinfo()
   endproc

See Also: equipment()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson