home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / sector.zip / sector.doc < prev   
Text File  |  1994-04-12  |  1KB  |  56 lines

  1. Documentation SECTOR.DLL
  2.  
  3.  
  4. In the sector.dll are three functions as REXX-extension.
  5. The are loaded by :
  6.  
  7. call RxFuncAdd 'QDrive',   'sector', 'QDrive'
  8. call RxFuncAdd 'ReadSect', 'sector', 'ReadSect'
  9. call RxFuncAdd 'WritSect', 'sector', 'WritSect'
  10.  
  11.  
  12. QDrive has a driveletter as argument and returns some drive-info.
  13. Example :
  14.  
  15. di = QDRIVE('c:')
  16.  
  17. The string di contains 5 numbers :
  18. 1.) number of sectors of the drive
  19. 2.) number of cylinders of the drive
  20. 3.) number of heads
  21. 4.) number of sectors per track
  22. 5.) number of bytes per sector (disks=512, CDROM=2048 !!)
  23.  
  24.  
  25.  
  26. ReadSect read one sector. The first parameter is the drive-letter. The
  27. second parameter is the sector-number to read. The result is a 512 byte
  28. long string.
  29. Example:
  30.  
  31. buffer = ReadSect('a:',7)
  32.  
  33.  
  34.  
  35. WritSect writes one sector. The first parameter is the drive-letter. The
  36. second parameter is the sector-number to read. The third parameter is a
  37. 512 byte long string, which will be written to the specified sector.
  38. The result is 0 for no-error and 108 if the drive cannot be locked
  39. Example:
  40.  
  41. rc = WritSect('a:',7, buffer)
  42.  
  43.  
  44.  
  45.  
  46.  
  47. This Software may freely be distributed.
  48.  
  49. No warrenty at all. Be careful with WritSect (possible data-damage !)
  50.  
  51. If you need the sourcecode, just ask me.
  52.  
  53.  
  54. Copyright 1994 Thomas Christinck, Braunschweig     CIS 100031,41
  55.  
  56.