home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / WIN_UTL2 / SAMDU260.ZIP / SABDU001.TXT < prev    next >
Text File  |  1994-04-01  |  98KB  |  2,733 lines

  1. >>SABDU001
  2. ------------------ SABDU001.DLL API: OverView ------------------------
  3.  
  4.             Dynamic Load Library Routines
  5.  
  6. The SABDU001 Dynameic Load Library contains a set of routines for
  7. creating and manipulating diskette type objects.  The sets of routines
  8. are:
  9.     DiskDrive               This are the ones that are usually used.
  10.                             They operate at the logical level.
  11.  
  12.     DDrive                  Drive object
  13.     FDrive                  File object
  14.     MDrive                  Memory object
  15.     VDrive                  Virtual object
  16.  
  17.     DebugOut                Debugging routines
  18.  
  19.     HandleStatus            Callback routine used to communicate
  20.                             progress during long running operations
  21.                             (i.e. formatting a diskette) and status.
  22. >>DDrive
  23. ------------------ SABDU001.DLL API: DDrive objects ------------------
  24.  
  25.  A DDrive (Diskette Drive) is a specialized version of the VDrive
  26.  (Virtual Drive).  It is an object that represents a physical drive.
  27.  
  28.  The following functions are available to manipulate it:
  29.      DDriveCreate        Creates a DDrive object
  30.      DDriveDelete        Deletes a DDrive object
  31.      DDriveFormatTrack   Formats a track
  32.      DDriveForceReset    Issues a reset to the drive
  33.      DDriveReadSectors   Reads a group of sectors from the drive
  34.      DDriveReset         Issues a reset to the drive if it was used
  35.      DDriveSetRead       Sets up for reading from the drive
  36.      DDriveSetWrite      Sets up for writing to the drive
  37.      DDriveWriteSectors  Writes a group of sectors to the drive
  38. >>DDriveCreate
  39. ------------------ SABDU001.DLL API: DDriveCreate --------------------
  40.  
  41.  VOID far * FAR PASCAL DDriveCreate (
  42.                                      char cDrive,
  43.                                      lpfnHANDLESTATUS lpfnNewHandleStatus
  44.                                     )
  45.  
  46.  cDrive              The letter of the drive.
  47.  lpfnNewHandleStatus Points to a callback routine that handles event
  48.                      notifications including errors.
  49.  
  50.  Creates a DDrive object associated with drive cDrive.
  51.  
  52.  Returns: Pointer to DDrive object.
  53.  
  54.  Example:
  55.          VOID far *pDriveA ;
  56.  
  57.          pDriveA = DDriveCreate ( 'A', lpfnHandleStatus ) ;
  58. >>DDriveDelete
  59. ------------------ SABDU001.DLL API: DDriveDelete --------------------
  60.  
  61.  VOID       FAR PASCAL DDriveDelete (
  62.                                      pDDrive
  63.                                     )
  64.  
  65.  pDDrive Points to DDrive object to be deleted.
  66.  
  67.  Deletes the DDrive object pointed to by pDDrive.
  68.  
  69.  Returns: VOID
  70.  
  71.  Example:
  72.          VOID far *pDriveA ;
  73.  
  74.          pDriveA = DDriveCreate ( 'A', lpfnHandleStatus ) ;
  75.          ...
  76.          DDriveDelete ( pDriveA ) ;
  77.          pDriveA = NULL ;
  78. >>DDriveSetRead
  79. ------------------ SABDU001.DLL API: DDriveSetRead -------------------
  80.  
  81.  UINT       FAR PASCAL DDriveSetRead (
  82.                                       VOID far *pDDrive,
  83.                                       UINT nTempType,
  84.                                       UINT nCylinders
  85.                                      )
  86.  
  87.  pDDrive    Points to the DDrive object.
  88.  nTempType  Defines the type of diskette expected:
  89.             FD0360 FD0720 FD1200 FD1440 FD2880
  90.  nCylinders Defines the number of cylinders.
  91.             NULL indicates default for type.
  92.  
  93.  Prepares the DDrive object pointed to by pDDrive for reading.
  94.  
  95.  Returns: zero if successfull, status code if not successfull.
  96.  
  97.  Example:
  98.          VOID far *pDriveA ;
  99.  
  100.          pDriveA = DDriveCreate ( 'A', lpfnHandleStatus ) ;
  101.          ...
  102.          DDriveSetRead ( pDriveA, FD0360, NULL ) ;
  103. >>DDriveSetWrite
  104. ------------------ SABDU001.DLL API: DDriveSetWrite ------------------
  105.  
  106.  UINT       FAR PASCAL DDriveSetWrite (
  107.                                        VOID far *pDDrive,
  108.                                        UINT nTempType,
  109.                                        UINT nCylinders
  110.                                       )
  111.  
  112.  pDDrive    Points to the DDrive object.
  113.  nTempType  Defines the type of diskette expected:
  114.             FD0360 FD0720 FD1200 FD1440 FD2880
  115.  nCylinders Defines the number of cylinders.
  116.             NULL indicates default for type.
  117.  
  118.  Prepares the DDrive object pointed to by pDDrive for writing.
  119.  
  120.  Returns: zero if successfull, status code if not successfull.
  121.  
  122.  Example:
  123.          VOID far *pDriveA ;
  124.  
  125.          pDriveA = DDriveCreate ( 'A', lpfnHandleStatus ) ;
  126.          ...
  127.          DDriveSetWrite ( pDriveA, FD0360, NULL ) ;
  128. >>DDriveReset
  129. ------------------ SABDU001.DLL API: DDriveReset ---------------------
  130.  
  131.  UINT       FAR PASCAL DDriveReset (
  132.                                     VOID far *pDDrive
  133.                                    )
  134.  
  135.  pDDrive    Points to the DDrive object.
  136.  
  137.  Resets the DDrive object pointed to by pDDrive.
  138.  
  139.  Returns: zero if successfull, status code if not successfull
  140.  
  141.  Example:
  142.          VOID far *pDriveA ;
  143.  
  144.          pDriveA = DDriveCreate ( 'A' ) ;
  145.          ...
  146.          DDriveReset ( pDriveA ) ;
  147. >>DDriveForceReset
  148. ------------------ SABDU001.DLL API: DDriveForceReset ----------------
  149.  
  150.  UINT       FAR PASCAL DDriveForceReset (
  151.                                          VOID far *pDDrive
  152.                                         )
  153.  
  154.  pDDrive    Points to DDrive object.
  155.  
  156.  Resets the DDrive object pointed to by pDDrive.
  157.  
  158.  Returns: zero if successfull, status code if not successfull.
  159.  
  160.  Example:
  161.          VOID far *pDriveA ;
  162.  
  163.          pDriveA = DDriveCreate ( 'A', lpfnHandleStatus ) ;
  164.          ...
  165.          DDriveForceReset ( pDriveA ) ;
  166. >>DDriveFormatTrack
  167. ------------------ SABDU001.DLL API: DDriveFormatTrack ---------------
  168.  
  169.  UINT       FAR PASCAL DDriveForceReset (
  170.                                          VOID far *pDDrive,
  171.                                          UNIT nCylinder,
  172.                                          UNIT nHead
  173.                                         )
  174.  
  175.  pDDrive    Points to DDrive Object
  176.  nCylinder  Number of Cylinder to be formatted
  177.  nHead      Number of Head to be formatted
  178.  
  179.  Formats a track.
  180.  
  181.  Returns: zero if successfull, status code if not successfull
  182.  
  183.  Example:
  184.          VOID far *pDriveA ;
  185.  
  186.          pDriveA = DDriveCreate ( 'A', lpfnHandleStatus ) ;
  187.          ...
  188.          DDriveFormatTrack ( pDriveA, nCylinder, nHead ) ;
  189. >>DDriveReadSectors
  190. ------------------ SABDU001.DLL API: DDriveReadSectors ---------------
  191.  
  192.  UINT       FAR PASCAL DDriveReadSectors (
  193.                                           VOID far *pDDrive,
  194.                                           UNIT nCylinder,
  195.                                           UNIT nHead,
  196.                                           UINT nSector,
  197.                                           UINT nCount,
  198.                                           LPBYTE lpcBuffer
  199.                                          )
  200.  
  201.  pDDRive    Points to DDrive object.
  202.  nCylinder  Cylinder to read from
  203.  nHead      Head to read with
  204.  nSector    Starting sector
  205.  nCount     Number of sectors to read
  206.  lpcBuffer  Buffer to contain the data read.
  207.  
  208.  Reads a group of sectors.
  209.  
  210.  Returns: zero if successfull, status code if not successfull.
  211.  
  212.  Example:
  213.          VOID far *pDriveA ;
  214.  
  215.          pDriveA = DDriveCreate ( 'A', lpfnHandleStatus ) ;
  216.          ...
  217.          DDriveReadSectors ( pDriveA, nCylinder, nHead, nSector,
  218.                              nCount, lpcBuffer ) ;
  219. >>DDriveWriteSectors
  220. ------------------ SABDU001.DLL API: DDriveWriteSectors --------------
  221.  
  222.  UINT       FAR PASCAL DDriveWriteSectors (
  223.                                            VOID far *pDDrive,
  224.                                            UNIT nCylinder,
  225.                                            UNIT nHead,
  226.                                            UINT nSector,
  227.                                            UINT nCount,
  228.                                            LPBYTE lpcBuffer
  229.                                           )
  230.  
  231.  pDDrive    Points to DDrive object.
  232.  nCylinder  Cylinder to write to
  233.  nHead      Head to write with
  234.  nSector    Starting sector
  235.  nCount     Number of sectors to write
  236.  lpcBuffer  Buffer that contains the data to be written.
  237.  
  238.  Writes a group of sectors from the drive pointerd to by pDDrive
  239.  
  240.  Returns: zero if successfull, status code if not successfull.
  241.  
  242.  Example:
  243.          VOID far *pDriveA ;
  244.  
  245.          pDriveA = DDriveCreate ( 'A' ) ;
  246.          ...
  247.          DDriveWriteSectors ( pDriveA, nCylinder, nHead, nSector,
  248.                               nCount, lpcBuffer ) ;
  249. >>DebugOut
  250. ------------------ SABDU001.DLL API: DebugOut objects ----------------
  251.  
  252.  A DebugOut object is a debugging aid:
  253.  
  254.  The following functions are available to manipulate it:
  255.      DebugOutCreate        Creates debug object
  256.      DebugOutOutputIf      Outputs a message
  257.      DebugOutScan          Scans command line for control information
  258.      DebugOutczDebugBuffer Returns pointer to debug buffer
  259. >>DebugOutCreate
  260. ------------------ SABDU001.DLL API: DebugOutCreate ------------------
  261.  
  262. VOID far * FAR PASCAL CEXPORT DebugOutCreate (
  263.                                               LPCSTR lpczCmdLine
  264.                                              ) ;
  265.  
  266.   Command line:
  267.                [/Dxxxxxxxx [/Myyyyyyyy] [/Ffilename]]
  268.  
  269.   xxxxxxxx is a hex string each bit of which can be used to control
  270.            the sending of trace messages
  271.  
  272.   yyyyyyyy is a hex string each bit of which indicates if a control
  273.            message should be displayed in a MessageBox
  274.  
  275.   filename trace file name
  276.  
  277.   Returns: Pointer to a debug object.
  278.  
  279. >>DebugOutScan
  280. ------------------ SABDU001.DLL API: DebugOutScan --------------------
  281.  
  282. VOID       FAR PASCAL CEXPORT DebugOutScan   (
  283.                                               LPCSTR lpczCmdLine
  284.                                              ) ;
  285.  
  286.   Command line:
  287.                [/Dxxxxxxxx [/Myyyyyyyy] [/Ffilename]]
  288.  
  289.   xxxxxxxx is a hex string each bit of which can be used to control
  290.            the sending of trace messages
  291.  
  292.   yyyyyyyy is a hex string each bit of which indicates if a control
  293.            message should be displayed in a MessageBox
  294.  
  295.   filename trace file name
  296.  
  297.   Returns: VOID
  298.  
  299. >>DebugOutOutputIf
  300. ------------------ SABDU001.DLL API: DebugOutOutputIf ----------------
  301.  
  302. VOID       FAR PASCAL CEXPORT DebugOutOutputIf (
  303.                                                 unsigned long ulDFlag,
  304.                                                 LPCSTR lpczText,
  305.                                                 LPCSTR lpczTitle,
  306.                                                 UINT nMFlags
  307.                                                ) ;
  308.  
  309.   ulDFlag   Matched with /D and /M from command line to determine if
  310.             message should be output to trace or displayed in a MessageBox.
  311.  
  312.   lpczText  Pointer to text of trace message
  313.   lpczTitle Pointer to title of trace message
  314.   nMFlags   MessageBox flags
  315.  
  316.   Displays a MessageBox or writes a trace record.
  317.  
  318.   Returns: VOID
  319.  
  320. >>DebugOutczDebugBuffer
  321. ------------------ SABDU001.DLL API: DebugOutczDebugBuffer -----------
  322.  
  323. char far * FAR PASCAL CEXPORT DebugOutczDebugBuffer (
  324.                                                      VOID
  325.                                                     ) ;
  326.  
  327.   Returns: Pointer to debug buffer that can be used to format messages.
  328.  
  329. >>DebugOutDebugFlags
  330. ------------------ SABDU001.DLL API: DebugOutczDebugBuffer -----------
  331.  
  332. char far * FAR PASCAL CEXPORT DebugOutDebugFlags (
  333.                                                   VOID
  334.                                                  ) ;
  335.  
  336.   Returns debug flags.
  337.  
  338. >>DiskDrive
  339. ------------------ SABDU001.DLL API: DiskDrive objects ---------------
  340.  
  341.  A DiskDrive is a wrapper that encapsolates a virtual (VDrive) object
  342.  and provides all of the functions needed to manipulate it
  343.  
  344.  The following functions are available to manipulate it:
  345.   DiskDriveChangeCurrentDirectory Changes the current directory
  346.   DiskDriveCompare                Compares two DiskDrive objects
  347.   DiskDriveCopy                   Copies a DiskDrive object
  348.   DiskDriveConvert                Converts a DiskDrive object
  349.   DiskDriveCreateDrive            Creates a DiskDrive object
  350.   DiskDriveCreateFile             Creates a DiskDrive object
  351.   DiskDriveCreateMemory           Creates a DiskDrive object
  352.   DiskDriveCreateVDrive           Creates a DiskDrive object
  353.   DiskDriveDelete                 Deletes a DiskDrive object
  354.   DiskDriveForceReset             Forces a reset of the assocated VDrive
  355.   DiskDriveFormat                 Formats a DiskDrive object
  356.   DiskDriveFormatTrack            Formats a track
  357.   DiskDriveGetAllocatedSectors    Returns number of allocated sectors
  358.   DiskDriveGetCurrentDirectory    Returns current directory in argument
  359.   DiskDriveGetRootDirectory       Reads the root directory
  360.   DiskDriveGetFileAllocationTable Reads a file allocation table
  361.   DiskDriveGetVolumeDate          Gets the volume date
  362.   DiskDriveGetVolumeLabel         Gets the volume label
  363.   DiskDriveChangeCurrentDirectory Changes the current directory
  364.   DiskDriveHasData                Returns TRUE if object valid
  365.   DiskDriveIsTruncated            Returns TRUE if object is truncated
  366.   DiskDriveLetter                 Returns DiskDrive object letter
  367.   DiskDriveNumberOfFATs           Returns the number of FATs
  368.   DiskDrivePutRootDirectory       Writes the root directory
  369.   DiskDrivePutFileAllocationTable Writes a file allocation table
  370.   DiskDriveReadClusters           Reads a group of clusters from DiskDrive
  371.   DiskDriveReadSectors            Reads a group of sectors from DiskDrive
  372.   DiskDriveReset                  Resets the associated VDrive if used
  373.   DiskDriveRootDirectoryEntries   Returns the number of entries in the root
  374.   DiskDriveSDU_FindFirst          Finds the first file that matches specs
  375.   DiskDriveSDU_FindNext           Finds the next file that matches specs
  376.   DiskDriveSectorsPerCluster      Retruns the number of sectors in a cluster
  377.   DiskDriveSectorsPerFAT          Returns the number of sectors in a FAT
  378.   DiskDriveSetRead                Sets the associated VDrive for reading
  379.   DiskDriveSetType                Sets the type (density) of VDrive
  380.   DiskDriveSetVolumeLabel         Sets the volume label
  381.   DiskDriveSetWrite               Sets the associated VDrive for writing
  382.   DiskDriveSetWriteFormatOption   Turns on/off WriteFormatOption
  383.   DiskDriveSetWriteVerifyOption   Turns on/off WriteVerifyOption
  384.   DiskDriveTruncate               Sets truncation mode on
  385.   DiskDriveTruncateReverse        Sets truncation mode off
  386.   DiskDriveType                   Returns type (density)
  387.   DiskDriveUsedCylinders          Returns cylinders used
  388.   DiskDriveUsedHeads              Returns heads used
  389.   DiskDriveUsedSectorSize         Returns sector size
  390.   DiskDriveUsedSectors            Returns sectors used
  391.   DiskDriveWriteBootSector        Writes boot sector of DiskDrive
  392.   DiskDriveWriteClusters          Writes a group of clusters to DiskDrive
  393.   DiskDriveWriteSectors           Writes a group of sectors to DiskDrive
  394. >>DiskDriveCreateDrive
  395. ------------------ SABDU001.DLL API: DiskDriveCreateDrive ------------
  396.  
  397.  UINT FAR PASCAL DiskDriveCreateDrive (
  398.                                        char cDrive
  399.                                        UINT nType,
  400.                                        UINT nCylinders,
  401.                                        lpfnHANDLESTATUS lpfnNewHandleStatus
  402.                                       )
  403.  
  404.  cDrive     Letter of drive.
  405.  nType      Defines the type of diskette
  406.             FD0360 FD0720 FD1200 FD1200H FD1440 FD1440H FD2880
  407.  nCylinders Number of cylinders
  408.             NULL indicates default for type
  409.  lpfnNewHandleStatus Pointer to routine to handle status callbacks
  410.  
  411.  Creates a DiskDrive object using a physical drive as the base for the
  412.  VDrive object within it.
  413.  
  414.  Returns: Pointer to DiskDrive object.
  415.  
  416.   Example:
  417.          VOID far *pDiskDriveA ;
  418.  
  419.          FARPROC lpfnNewHandleStatus ;
  420.  
  421.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  422.                                                   NewHandleStatus ) ;
  423.  
  424.          pDiskDriveA = DiskDriveCreateDrive (
  425.                                              'A',
  426.                                              FD1200,
  427.                                              80,
  428.                                              lpfnNewHandleStatus
  429.                                             )
  430. >>DiskDriveCreateMemory
  431. ------------------ SABDU001.DLL API: DiskDriveCreateMemory -----------
  432.  
  433.  UINT FAR PASCAL DiskDriveCreateMemory (
  434.                                         UINT nMemory
  435.                                         UINT nType,
  436.                                         UINT nCylinders,
  437.                                         lpfnHANDLESTATUS lpfnNewHandleStatus
  438.                                        )
  439.  
  440.  nMemory    Identifier for DiskDrive memory object
  441.  nType      Defines the type of diskette
  442.             FD0360 FD0720 FD1200 FD1200H FD1440 FD1440H FD2880
  443.  nCylinders Number of cylinders
  444.             NULL indicates default for type
  445.  lpfnNewHandleStatus Pointer to routine to handle status callbacks
  446.  
  447.  Creates a DiskDrive object using a memory object as the base for the
  448.  VDrive object within it.
  449.  
  450.  Returns: Pointer to DiskDrive memory object.
  451.  
  452.   Example:
  453.          VOID far *pDiskDriveA ;
  454.  
  455.          FARPROC lpfnNewHandleStatus ;
  456.  
  457.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  458.                                                   NewHandleStatus ) ;
  459.  
  460.          pDiskDriveA = DiskDriveCreateMemory (
  461.                                               1,
  462.                                               FD1200,
  463.                                               80,
  464.                                               lpfnNewHandleStatus
  465.                                              )
  466. >>DiskDriveCreateFile
  467. ------------------ SABDU001.DLL API: DiskDriveCreateFile -------------
  468.  
  469.  UINT FAR PASCAL DiskDriveCreateFile (
  470.                                       LPCSTR lpczFileName,
  471.                                       LPCSTR lpczApplicationTitle,
  472.                                       LPCSTR lpczVersion,
  473.                                       UINT nType,
  474.                                       UINT nCylinders,
  475.                                       lpfnHANDLESTATUS lpfnNewHandleStatus
  476.                                      )
  477.  
  478.  lpczFileName         Points to name of file to be used
  479.  lpczApplicationTitle Points to the application title
  480.  lpczVersion          Points to the version
  481.  nType      Defines the type of diskette
  482.             FD0360 FD0720 FD1200 FD1200H FD1440 FD1440H FD2880
  483.  nCylinders Number of cylinders
  484.             NULL indicates default for type
  485.  lpfnNewHandleStatus Pointer to routine to handle status callbacks
  486.  
  487.  Creates a DiskDrive object using a file object as the base for the
  488.  VDrive object within it.
  489.  
  490.  Returns: Pointer to DiskDrive file object.
  491.  
  492.   Example:
  493.          VOID far *pDiskDriveA ;
  494.  
  495.          FARPROC lpfnNewHandleStatus ;
  496.  
  497.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  498.                                                   NewHandleStatus ) ;
  499.  
  500.          pDiskDriveA = DiskDriveCreateFile (
  501.                                             "FileName.SDU",
  502.                                             "SAB Diskette Utility",
  503.                                             "2.00",
  504.                                             FD1200,
  505.                                             80,
  506.                                             lpfnNewHandleStatus
  507.                                            )
  508. >>DiskDriveCreateVDrive
  509. ------------------ SABDU001.DLL API: DiskDriveCreateVDrive -----------
  510.  
  511.  UINT FAR PASCAL DiskDriveCreateVDrive (
  512.                                         VOID far * pVDrive,
  513.                                         UINT nType,
  514.                                         UINT nCylinders,
  515.                                         lpfnHANDLESTATUS lpfnNewHandleStatus
  516.                                        )
  517.  
  518.  pVDrive    Pointer to VDrive object.
  519.  nType      Defines the type of diskette
  520.             FD0360 FD0720 FD1200 FD1200H FD1440 FD1440H FD2880
  521.  nCylinders Number of cylinders
  522.             NULL indicates default for type
  523.  lpfnNewHandleStatus Pointer to routine to handle status callbacks
  524.  
  525.  Creates a DiskDrive object using a virtual drive object as the
  526.  base for the VDrive object within it.
  527.  
  528.  Returns: Pointer to DiskDrive object.
  529.  
  530.   Example:
  531.          VOID far *pDiskDriveA ;
  532.          VOID far *pVDriveA ;
  533.  
  534.          FARPROC lpfnNewHandleStatus ;
  535.  
  536.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  537.                                                   NewHandleStatus ) ;
  538.          pVDriveA = DDriveDrive ( 'A', lpfnNewHandleStatus ) ;
  539.  
  540.          pDiskDriveA = DiskDriveCreateVDrive (
  541.                                               pVDriveA,
  542.                                               FD1200,
  543.                                               80,
  544.                                               lpfnNewHandleStatus
  545.                                              )
  546. >>DiskDriveDelete
  547. ------------------ SABDU001.DLL API: DiskDriveDelete -----------------
  548.  
  549.  VOID FAR PASCAL DiskDriveDelete (
  550.                                   VOID far * pCDiskDrive,
  551.                                  )
  552.  
  553.   pCDiskDrive Pointer to the DiskDrive object to be deleted.
  554.  
  555.   Deletes a DiskDrive object.
  556.  
  557.   Returns: VOID
  558.  
  559.   Example:
  560.          VOID far *pCDiskDriveA ;
  561.  
  562.          FARPROC lpfnNewHandleStatus ;
  563.  
  564.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  565.                                                   NewHandleStatus ) ;
  566.          pCDiskDriveA = DDriveDriveCreateDrive ( 'A',
  567.                                                lpfnNewHandleStatus ) ;
  568.          ...
  569.          DiskDriveDelete ( pCDiskDriveA ) ;
  570.          pCDiskDriveA = NULL ;
  571.  
  572. >>DiskDriveCopy
  573. ------------------ SABDU001.DLL API: DiskDriveCopy -------------------
  574.  
  575.  VOID FAR PASCAL DiskDriveCopy (
  576.                                 VOID far * pCDiskDriveTarget,
  577.                                 VOID far * pCDiskDriveSource
  578.                                )
  579.  
  580.   pCDiskDriveTarget Points to DiskDrive object to be copied to.
  581.   pCDiskDriveSource Points to DiskDrive object to be copied from.
  582.  
  583.   Copies a DiskDrive object ;
  584.  
  585.   Returns: VOID
  586.  
  587.   Example:
  588.          VOID far *pCDiskDriveA ;
  589.          VOID far *pCDiskDriveB ;
  590.  
  591.          FARPROC lpfnNewHandleStatus ;
  592.  
  593.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  594.                                                   NewHandleStatus ) ;
  595.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
  596.                                               lpfnNewHandleStatus ) ;
  597.          pCDiskDriveB = DiskDriveCreateDrive ( 'B',
  598.                                               DiskDriveType( pDiskDriveA ),
  599.                                               0, lpfnNewHandleStatus ) ;
  600.          DiskDriveCopy ( pCDiskDriveB, pCDiskDriveA ) ;
  601. >>DiskDriveCompare
  602. ------------------ SABDU001.DLL API: DiskDriveCompare ----------------
  603.  
  604.  BOOL FAR PASCAL DiskDriveCompare (
  605.                                    VOID far * pCDiskDriveTarget,
  606.                                    VOID far * pCDiskDriveSource
  607.                                   )
  608.  
  609.   pCDiskDriveTarget Points to DiskDrive object.
  610.   pCDiskDriveSource Points to DiskDrive object.
  611.  
  612.   Compares two DiskDrive objects.
  613.  
  614.   Returns: TRUE if they are the same -- FALSE if not.
  615.  
  616.   Example:
  617.          VOID far *pCDiskDriveA ;
  618.          VOID far *pCDiskDriveB ;
  619.  
  620.          FARPROC lpfnNewHandleStatus ;
  621.  
  622.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  623.                                                   NewHandleStatus ) ;
  624.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
  625.                                               lpfnNewHandleStatus ) ;
  626.          pCDiskDriveB = DiskDriveCreateDrive ( 'B', 0, 0,
  627.                                               lpfnNewHandleStatus ) ;
  628.          DiskDriveCompare ( pCDiskDriveB, pCDiskDriveA ) ;
  629. >>DiskDriveConvert
  630. ------------------ SABDU001.DLL API: DiskDriveConvert ----------------
  631.  
  632.  BOOL FAR PASCAL DiskDriveConvert (
  633.                                    VOID far * pCDiskDriveTarget,
  634.                                    VOID far * pCDiskDriveSource
  635.                                   )
  636.  
  637.   pCDiskDriveTarget Points to DiskDrive object to contain converted image
  638.   pCDiskDriveSource Points to DiskDrive object to be converted
  639.  
  640.   Converts a DiskDrive object ;
  641.  
  642.   Returns: zero if successfull, non-zero if not successfull.
  643.  
  644.   Example:
  645.          VOID far *pCDiskDriveA ;
  646.          VOID far *pCDiskDriveB ;
  647.  
  648.          FARPROC lpfnNewHandleStatus ;
  649.  
  650.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  651.                                                   NewHandleStatus ) ;
  652.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
  653.                                               lpfnNewHandleStatus ) ;
  654.          pCDiskDriveB = DiskDriveCreateDrive ( 'B',
  655.                                               0,
  656.                                               0, lpfnNewHandleStatus ) ;
  657.          DiskDriveConvert ( pCDiskDriveB, pCDiskDriveA ) ;
  658. >>DiskDriveDeleteFile
  659. ------------------ SABDU001.DLL API: DiskDriveDeleteFile -------------
  660.  
  661.  UINT FAR PASCAL DiskDriveDeleteFile (
  662.                                       VOID far * pCDiskDrive,
  663.                                       LPCSTR lpczFileName
  664.                                      )
  665.  
  666.   pCDiskDrive Points to DiskDrive object.
  667.   lpczFileName Name of file (including path) to be deleted.
  668.  
  669.   Deletes a file from a diskette image.
  670.  
  671.   Returns: zero if successfull, non-zero if not successfull
  672.  
  673.   Example:
  674.          VOID far *pCDiskDriveA ;
  675.  
  676.          char czFileName[] = "\directory\file.ext"
  677.  
  678.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
  679.                                               lpfnNewHandleStatus ) ;
  680.          DiskDriveDeleteFile ( pCDiskDriveA, czFileName ) ;
  681. >>DiskDriveCopyFile
  682. ------------------ SABDU001.DLL API: DiskDriveCopyFile ---------------
  683.  
  684.  UINT FAR PASCAL DiskDriveCopyFile (
  685.                                     VOID far * pCDiskDriveTarget,
  686.                                     LPCSTR lpczFileNameIn,
  687.                                     LPCSTR lpczFileNameOut,
  688.                                     UINT Flags
  689.                                    )
  690.  
  691.   pCDiskDriveTarget Pointer to DiskDrive object
  692.   lpczFileNameIn   Pointer to file name (including path)
  693.   lpczFileNameOut  Pointer to file name (including path)
  694.   Flags            Copy direction -- must be 1
  695.  
  696.   Copies a file
  697.  
  698.   Returns: zero if successfull, non-zero if copy failed
  699.  
  700.   Example:
  701.          VOID far *pCDiskDriveA ;
  702.  
  703.          FARPROC lpfnNewHandleStatus ;
  704.  
  705.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  706.                                                   NewHandleStatus ) ;
  707.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
  708.                                               lpfnNewHandleStatus ) ;
  709.          DiskDrivecopyFile ( pCDiskDriveA,
  710.                              "OLDFILE.DAT",
  711.                              "C:\DATA\NEWFILE.DAT",
  712.                              IMAGETOFILE ) ;
  713. >>DiskDriveSDU_FindFirst
  714. ------------------ SABDU001.DLL API: DiskDriveSDU_FindFirst ----------
  715.  
  716.  BOOL FAR PASCAL DiskDriveSDU_FindFirst (
  717.                                          VOID far *pCDiskImage,
  718.                                          LPCSTR lpczFileMask,
  719.                                          UINT Flags,
  720.                                          LPSDU_find_t lpstFind_T
  721.                                         )
  722.  
  723.   pCDiskImage  Pointer to DiskDrive object.
  724.   lpczFileMask Pointer to file mask (may include * and ?)
  725.   Flags        Attributes
  726.   lpstFind_T   Pointer to SDU_find_t structure
  727.  
  728.   Finds the first file based on file mask and attributes
  729.  
  730.   Returns: zero if succesfull, non-zero if file not found
  731.  
  732.   Example:
  733.          VOID far *pCDiskDriveA ;
  734.  
  735.          FARPROC lpfnNewHandleStatus ;
  736.  
  737.          char czFileMask[] = "\SUBDIR\FILENAME.EXT" ;
  738.  
  739.          UINT Flags = ATTR_READONLY ;
  740.  
  741.          SDU_find_t Find_T ;
  742.  
  743.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  744.                                                   NewHandleStatus ) ;
  745.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
  746.                                               lpfnNewHandleStatus ) ;
  747.          DiskDriveSDU_FindFirst ( pCDiskDriveA,
  748.                                   lpczFileMask,
  749.                                   Flags,
  750.                                   &Find_T ) ;
  751. >>DiskDriveSDU_FindNext
  752. ------------------ SABDU001.DLL API: DiskDriveSDU_FindNext ----------
  753.  
  754.  BOOL FAR PASCAL DiskDriveSDU_FindNext (
  755.                                         VOID far *pCDiskImage,
  756.                                         LPSDU_find_t lpstFind_T
  757.                                        )
  758.  
  759.   pCDiskImage Pointer to DiskDrive object.
  760.   lpstFind_T  Pointer to SDU_find_t structure
  761.  
  762.   Finds the next file based on file mask in lpstFind_T
  763.  
  764.   Returns: zero if successfull, non-zero if not successfull
  765.  
  766.   Example:
  767.          VOID far *pCDiskDriveA ;
  768.  
  769.          FARPROC lpfnNewHandleStatus ;
  770.  
  771.          SDU_find_t Find_T ;
  772.  
  773.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  774.                                                   NewHandleStatus ) ;
  775.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
  776.                                               lpfnNewHandleStatus ) ;
  777.          ...
  778.          DiskDriveSDU_FindNext ( pCDiskDriveA, &Find_T ) ;
  779. >>DiskDriveGetCurrentDirectory
  780. ------------------ SABDU001.DLL API: DiskDriveGetCurrentDirectory ----
  781.  
  782.  BOOL FAR PASCAL DiskDriveGetCurrentDirectory (
  783.                                         VOID far *pCDiskImage,
  784.                                         LPCSTR lpczOldCurrentDirectory
  785.                                        )
  786.  
  787.   pCDiskImage             Pointer to DiskDrive object.
  788.   lpczOldCurrentDirectory Pointer to buffer area that
  789.                           will get directory path
  790.  
  791.   Gets the current directory path.
  792.  
  793.   Returns: lpczOldCurrentDirectory
  794.  
  795.   Example:
  796.          VOID far *pCDiskDriveA ;
  797.  
  798.          FARPROC lpfnNewHandleStatus ;
  799.  
  800.          char czCurrentDirectory[_MAX_PATH]
  801.          char *lpczOldCurrentDirectory ;
  802.  
  803.          lpczOldCurrentDirectory = czCurrentDirectory ;
  804.  
  805.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  806.                                                   NewHandleStatus ) ;
  807.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
  808.                                               lpfnNewHandleStatus ) ;
  809.          DiskDriveGetCurrentDirectory ( pCDiskDriveA,
  810.                                         lpczOldCurrentDirectory ) ;
  811. >>DiskDriveChangeCurrentDirectory
  812. ------------------ SABDU001.DLL API: DiskDriveChangeCurrentDirectory -
  813.  
  814.  BOOL FAR PASCAL DiskDriveChangeCurrentDirectory (
  815.                                         VOID far *pCDiskImage,
  816.                                         LPCSTR lpczNewCurrentDirectory
  817.                                        )
  818.  
  819.   pCDiskImage  Pointer to DiskDrive object.
  820.   lpczNewCurrentDirectory Pointer to new current directory.
  821.  
  822.   Changes the current directory.
  823.  
  824.   Returns: lpczNewCurrentDirectory
  825.  
  826.   Example:
  827.          VOID far *pCDiskDriveA ;
  828.  
  829.          FARPROC lpfnNewHandleStatus ;
  830.  
  831.          char czCurrentDirectory[] = "\NEW\CURRENT\DIRECTORY" ;
  832.          char *lpczNewCurrentDirectory ;
  833.  
  834.          lpczNewCurrentDirectory = czCurrentDirectory ;
  835.  
  836.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  837.                                                   NewHandleStatus ) ;
  838.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
  839.                                               lpfnNewHandleStatus ) ;
  840.          DiskDriveChangeCurrentDirectory ( pCDiskDriveA,
  841.                                            lpczNewCurrentDirectory ) ;
  842. >>DiskDriveFormatTrack
  843. ------------------ SABDU001.DLL API: DiskDriveFormatTrack ------------
  844.  
  845.  UINT FAR PASCAL DiskDriveFormatTrack (
  846.                                        VOID far * pCDiskDrive,
  847.                                        UINT nCylinder,
  848.                                        UINT nHead,
  849.                                        lpfnHANDLESTATUS lpfnHandleStatus
  850.                                       )
  851.  pCDiskDrive Pointer to DiskDrive object.
  852.  nCylinder   Cylinder number
  853.  nHead       Head number
  854.  lpfnNewHandleStatus Pointer to routine to handle status callbacks
  855.  
  856.  Formats a track.
  857.  
  858.  Returns: zero if successfull, status code if not successfull
  859.  
  860.   Example:
  861.          VOID far *pCDiskDriveA ;
  862.  
  863.          FARPROC lpfnNewHandleStatus ;
  864.  
  865.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  866.                                                   NewHandleStatus ) ;
  867.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', FD1200, 80,
  868.                                               lpfnNewHandleStatus ) ;
  869.          DiskDriveFormatTrack ( pCDiskDriveB, 0, 1,
  870.                                 lpfnNewHandleStatus ) ;
  871. >>DiskDriveReadClusters
  872. ------------------ SABDU001.DLL API: DiskDriveReadClusters -----------
  873.  
  874.  UINT FAR PASCAL DiskDriveReadClusters (
  875.                                         VOID far * pCDiskDrive,
  876.                                         UINT nCluster,
  877.                                         UINT nCount,
  878.                                         LPBYTE lpbyBuffer,
  879.                                         lpfnHANDLESTATUS lpfnHandleStatus
  880.                                        )
  881.  
  882.  pCDiskDrive Pointer to DiskDrive object.
  883.  nCluster    Starting cluster number.
  884.  nCount      Number of clusters to read.
  885.  lpfnNewHandleStatus Pointer to routine to handle status callbacks
  886.  
  887.  Reads a group of clusters.
  888.  
  889.  Returns: zero if successfull, status code if not successfull
  890.  
  891.   Example:
  892.          VOID far *pCDiskDriveA ;
  893.  
  894.          FARPROC lpfnNewHandleStatus ;
  895.  
  896.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  897.                                                   NewHandleStatus ) ;
  898.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
  899.                                               lpfnNewHandleStatus ) ;
  900.          DiskDriveReadClusters ( pCDiskDriveA, 1, 1, lpcBuffer,
  901.                                  lpfnNewHandleStatus ) ;
  902. >>DiskDriveWriteClusters
  903. ------------------ SABDU001.DLL API: DiskDriveWriteClusters ----------
  904.  
  905.  UINT FAR PASCAL DiskDriveWriteClusters (
  906.                                          VOID far * pCDiskDrive,
  907.                                          UINT nCluster,
  908.                                          UINT nCount,
  909.                                          LPBYTE lpbyBuffer,
  910.                                          lpfnHANDLESTATUS lpfnHandleStatus
  911.                                         )
  912.  
  913.  pCDiskDrive Pointer to DiskDrive object.
  914.  nCluster    Starting cluster number.
  915.  nCount      Number of clusters to write.
  916.  lpfnNewHandleStatus Pointer to routine to handle status callbacks
  917.  
  918.  Writes a group of clusters.
  919.  
  920.  Returns: zero if successfull, status code if not successfull
  921.  
  922.   Example:
  923.          VOID far *pCDiskDriveA ;
  924.  
  925.          FARPROC lpfnNewHandleStatus ;
  926.  
  927.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  928.                                                   NewHandleStatus ) ;
  929.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
  930.                                               lpfnNewHandleStatus ) ;
  931.          DiskDriveWriteClusters ( pCDiskDriveA, 1, 1, lpcBuffer,
  932.                                  lpfnNewHandleStatus ) ;
  933. >>DiskDriveGetFileAllocationTable
  934. ------------------ SABDU001.DLL API: DiskDriveGetFileAllocationTable -
  935.  
  936.  UINT FAR PASCAL DiskDriveGetFileAllocationTable (
  937.                                                   VOID far * pCDiskDrive,
  938.                                                   LPBYTE lpbyFATBuffer,
  939.                                                   UINT nFAT
  940.                                                  )
  941.  
  942.  pCDiskDrive   Pointer to DiskDrive object.
  943.  lpbyFATBuffer Pointer to buffer for FAT.
  944.  nFAT          Number of FAT to read.
  945.  
  946.  Reads a File Allocation Table.
  947.  
  948.  Returns: non-zero if successfull, zero if not successfull
  949.  
  950.   Example:
  951.          VOID far *pCDiskDriveA ;
  952.  
  953.          LPBYTE lpbyFATBuffer ;
  954.  
  955.          FARPROC lpfnNewHandleStatus ;
  956.  
  957.          lpbyFATBuffer = new BYTE[_FAT_SIZE] ;
  958.  
  959.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  960.                                                   NewHandleStatus ) ;
  961.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
  962.                                               lpfnNewHandleStatus ) ;
  963.          DiskDriveGetFileAllocationTable ( pCDiskDriveA,
  964.                                            lpbyFATBuffer, 1 ) ;
  965. >>DiskDrivePutFileAllocationTable
  966. ------------------ SABDU001.DLL API: DiskDrivePutFileAllocationTable -
  967.  
  968.  UINT FAR PASCAL DiskDrivePutFileAllocationTable (
  969.                                                   VOID far * pCDiskDrive,
  970.                                                   LPBYTE lpbyFATBuffer,
  971.                                                   UINT nFAT
  972.                                                  )
  973.  
  974.  pCDiskDrive   Pointer to DiskDrive object.
  975.  lpbyFATBuffer Pointer to buffer for FAT.
  976.  nFAT          Number of FAT to write.
  977.  
  978.  Writes a File Allocation Table.
  979.  
  980.  Returns: non-zero if successfull, zero if not successfull
  981.  
  982.   Example:
  983.          VOID far *pCDiskDriveA ;
  984.  
  985.          FARPROC lpfnNewHandleStatus ;
  986.  
  987.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  988.                                                   NewHandleStatus ) ;
  989.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
  990.                                               lpfnNewHandleStatus ) ;
  991.          DiskDrivePutFileAllocationTable ( pCDiskDriveA,
  992.                                            lpbyFATBuffer, 1 ) ;
  993. >>DiskDriveGetAllocatedSectors
  994. ------------------ SABDU001.DLL API: DiskDriveGetAllocatedSectors ----
  995.  
  996.  UINT FAR PASCAL DiskDriveGetAllocatedSectors (
  997.                                                pCDiskDrive
  998.                                               )
  999.  
  1000.  pCDiskDrive Pointer to DiskDrive object.
  1001.  
  1002.  Returns: number of allocated sectors
  1003.  
  1004.   Example:
  1005.          VOID far *pCDiskDriveA ;
  1006.  
  1007.          FARPROC lpfnNewHandleStatus ;
  1008.  
  1009.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  1010.                                                   NewHandleStatus ) ;
  1011.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
  1012.                                               lpfnNewHandleStatus ) ;
  1013.          nAllocatedSectors = DiskDriveGetAllocatedSectors ( pCDiskDriveA ) ;
  1014. >>DiskDriveGetRootDirectory
  1015. ------------------ SABDU001.DLL API: DiskDriveGetRootDirectory -------
  1016.  
  1017.  UINT FAR PASCAL DiskDriveGetRootDirectory (
  1018.                                             VOID far * pCDiskDrive,
  1019.                                             LPBYTE lpbyBuffer
  1020.                                            )
  1021.  
  1022.  pCDiskDrive Pointer to DiskDrive object.
  1023.  lpbyBuffer  Pointer to buffer to read root directory into.
  1024.  
  1025.  Reads Root Directory.
  1026.  
  1027.  Returns: non-zero if successfull, zero if not successfull
  1028.  
  1029.   Example:
  1030.          VOID far *pCDiskDriveA ;
  1031.  
  1032.          FARPROC lpfnNewHandleStatus ;
  1033.  
  1034.          LPBYTE lpbyDirectoryBuffer ;
  1035.  
  1036.          lpbyDirectoryBuffer = new BYTE[_SIZE_OF_ROOT_DIRECTORY]
  1037.  
  1038.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  1039.                                                   NewHandleStatus ) ;
  1040.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
  1041.                                               lpfnNewHandleStatus ) ;
  1042.          DiskDriveGetRootDirectory ( pCDiskDriveA, lpbyDirectoryBuffer ) ;
  1043. >>DiskDrivePutRootDirectory
  1044. ------------------ SABDU001.DLL API: DiskDrivePutRootDirectory -------
  1045.  
  1046.  UINT FAR PASCAL DiskDrivePutRootDirectory (
  1047.                                             VOID far * pCDiskDrive,
  1048.                                             LPBYTE lpbyBuffer
  1049.                                            )
  1050.  
  1051.  pCDiskDrive Pointer to DiskDrive object.
  1052.  lpbyBuffer  Pointer to buffer to write root directory from.
  1053.  
  1054.  Writes Root Directory.
  1055.  
  1056.  Returns: non-zero if successfull, zero if not successfull
  1057.  
  1058.   Example:
  1059.          VOID far *pCDiskDriveA ;
  1060.  
  1061.          FARPROC lpfnNewHandleStatus ;
  1062.  
  1063.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  1064.                                                   NewHandleStatus ) ;
  1065.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
  1066.                                               lpfnNewHandleStatus ) ;
  1067.          DiskDrivePutRootDirectory ( pCDiskDriveA, lpbyDirectoryBuffer ) ;
  1068. >>DiskDriveReadSectors
  1069. ------------------ SABDU001.DLL API: DiskDriveReadSectors ------------
  1070.  
  1071.  UINT FAR PASCAL DiskDriveReadSectors (
  1072.                                        VOID far * pCDiskDrive,
  1073.                                        UINT nCylinder,
  1074.                                        UINT nHead,
  1075.                                        UINT nSector,
  1076.                                        UINT nCount,
  1077.                                        LPBYTE lpbyBuffer,
  1078.                                        lpfnHANDLESTATUS lpfnHandleStatus
  1079.                                       )
  1080.  
  1081.  pCDiskDrive Pointer to DiskDrive object.
  1082.  nCylinder   Starting Cylinder number.
  1083.  nHead       Starting Head number.
  1084.  nSector     Starting Sector number.
  1085.  nCount      Number of sectors to read.
  1086.  lpbyBuffer  Pointer to buffer to read into.
  1087.  lpfnNewHandleStatus Pointer to routine to handle status callbacks
  1088.  
  1089.  Reads a group of sectors.
  1090.  
  1091.  Returns: zero if successfull, status code if not successfull.
  1092.  
  1093.   Example:
  1094.          VOID far *pCDiskDriveA ;
  1095.  
  1096.          FARPROC lpfnNewHandleStatus ;
  1097.  
  1098.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  1099.                                                   NewHandleStatus ) ;
  1100.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
  1101.                                               lpfnNewHandleStatus ) ;
  1102.          DiskDriveReadSectors ( pCDiskDriveA, 0, 1, 0, 18, lpbyBuffer,
  1103.                                 lpfnNewHandleStatus ) ;
  1104. >>DiskDriveWriteSectors
  1105. ------------------ SABDU001.DLL API: DiskDriveWriteSectors -----------
  1106.  
  1107.  UINT FAR PASCAL DiskDriveWriteSectors (
  1108.                                         VOID far * pCDiskDrive,
  1109.                                         UINT nCylinder,
  1110.                                         UINT nHead,
  1111.                                         UINT nSector,
  1112.                                         UINT nCount,
  1113.                                         LPBYTE lpbyBuffer,
  1114.                                         lpfnHANDLESTATUS lpfnHandleStatus
  1115.                                        )
  1116.  
  1117.  pCDiskDrive Pointer to DiskDrive object.
  1118.  nCylinder   Starting Cylinder number.
  1119.  nHead       Starting Head number.
  1120.  nSector     Starting Sector number.
  1121.  nCount      Number of sectors to write.
  1122.  lpbyBuffer  Pointer to buffer to write from.
  1123.  lpfnNewHandleStatus Pointer to routine to handle status callbacks
  1124.  
  1125.  Writes a group of sectors.
  1126.  
  1127.  Returns: zero if successfull, status code if not successfull.
  1128.  
  1129.   Example:
  1130.          VOID far *pCDiskDriveA ;
  1131.  
  1132.          FARPROC lpfnNewHandleStatus ;
  1133.  
  1134.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  1135.                                                   NewHandleStatus ) ;
  1136.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', FD1440, 0,
  1137.                                               lpfnNewHandleStatus ) ;
  1138.          DiskDriveWriteSectors ( pCDiskDriveA, 0, 1, 0, 18, lpbyBuffer,
  1139.                                  lpfnNewHandleStatus ) ;
  1140. >>DiskDriveLetter
  1141. ------------------ SABDU001.DLL API: DiskDriveWriteLetter ------------
  1142.  
  1143.  UINT FAR PASCAL DiskDriveLetter (
  1144.                                   VOID far * pCDiskDrive,
  1145.                                  )
  1146.  
  1147.  pCDiskDrive Pointer to DiskDrive object.
  1148.  
  1149.  Returns: Letter of virtual drive.
  1150.  
  1151.   Example:
  1152.          VOID far *pCDiskDriveA ;
  1153.  
  1154.          char cDriveLetter ;
  1155.  
  1156.          FARPROC lpfnNewHandleStatus ;
  1157.  
  1158.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  1159.                                                   NewHandleStatus ) ;
  1160.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', FD1440, 0,
  1161.                                               lpfnNewHandleStatus ) ;
  1162.          ...
  1163.          cDriveLetter = DiskDriveLetter ( pCDiskDriveA ) ;
  1164. >>DiskDriveSetRead
  1165. ------------------ SABDU001.DLL API: DiskDriveSetRead ---------------
  1166.  
  1167.  UINT FAR PASCAL DiskDriveSetRead (
  1168.                                    VOID far *pCDiskDrive,
  1169.                                    UINT nTempType,
  1170.                                    UINT nCylinders
  1171.                                   )
  1172.  
  1173.  pCDiskDrive Pointer to DiskDrive object.
  1174.  nTempType   Defines type of diskette
  1175.              FD0360 FD0720 FD1200 FD1200H FD1440 FD1440H FD2880
  1176.  nCylinders  Number of cylinders
  1177.              NULL indicates default to type
  1178.  
  1179.  Sets contained virtual drive for reading.
  1180.  
  1181.  Returns: zero if successfull, status code if not successfull.
  1182.  
  1183.   Example:
  1184.          VOID far *pCDiskDriveA ;
  1185.  
  1186.          char cDriveLetter ;
  1187.  
  1188.          FARPROC lpfnNewHandleStatus ;
  1189.  
  1190.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  1191.                                                   NewHandleStatus ) ;
  1192.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', FD1440, 0,
  1193.                                               lpfnNewHandleStatus ) ;
  1194.          ...
  1195.          DiskDriveSetRead ( pCDiskDriveA, nTempType, nCylinders ) ;
  1196. >>DiskDriveSetWrite
  1197. ------------------ SABDU001.DLL API: DiskDriveSetWrite---------------
  1198.  
  1199.  UINT FAR PASCAL DiskDriveSetWrite (
  1200.                                     VOID far * pCDiskDrive,
  1201.                                     UINT nTempType,
  1202.                                     UINT nCylinders
  1203.                                    )
  1204.  
  1205.  pCDiskDrive Pointer to DiskDrive object.
  1206.  nTempType   Defines type of diskette
  1207.              FD0360 FD0720 FD1200 FD1200H FD1440 FD1440H FD2880
  1208.  nCylinders  Number of cylinders
  1209.              NULL indicates default to type
  1210.  
  1211.  Sets contained virtual drive for writing.
  1212.  
  1213.  Returns: zero if successfull, status code if not successfull.
  1214.  
  1215.   Example:
  1216.          VOID far *pCDiskDriveA ;
  1217.  
  1218.          char cDriveLetter ;
  1219.  
  1220.          FARPROC lpfnNewHandleStatus  ;
  1221.  
  1222.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  1223.                                                   NewHandleStatus ) ;
  1224.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', FD1440, 0,
  1225.                                               lpfnNewHandleStatus ) ;
  1226.          ...
  1227.          DiskDriveSetWrite ( pCDiskDriveA, nTempType, nCylinders ) ;
  1228. >>DiskDriveSetWriteFormatOption
  1229. ------------------ SABDU001.DLL API: DiskDriveSetWriteFormatOption --
  1230.  
  1231.  VOID FAR PASCAL DiskDriveSetWriteFormatOption (
  1232.                                                 VOID far * pCDiskDrive,
  1233.                                                 UINT nWriteFormatOptionNew
  1234.                                                )
  1235.  
  1236.  pCDiskDrive Pointer to DiskDrive object.
  1237.  nWriteFormatOptionNew New value for Write Format Option
  1238.       1                 AUTOMATIC
  1239.       2                 ALWAYS
  1240.       3                 NEVER
  1241.       4                 FAST
  1242.  
  1243.  Sets write format option.
  1244.  
  1245.  Returns: VOID
  1246.  
  1247.   Example:
  1248.          VOID far *pCDiskDriveA ;
  1249.  
  1250.          char cDriveLetter ;
  1251.  
  1252.          FARPROC lpfnNewHandleStatus ;
  1253.  
  1254.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  1255.                                                   NewHandleStatus ) ;
  1256.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', FD1440, 0,
  1257.                                               lpfnNewHandleStatus ) ;
  1258.          ...
  1259.          DiskDriveSetWriteFormatOption ( pCDiskDriveA, AUTOMATIC ) ;
  1260. >>DiskDriveSetWriteVerifyOption
  1261. ------------------ SABDU001.DLL API: DiskDriveSetWriteVerifyOption --
  1262.  
  1263.  VOID FAR PASCAL DiskDriveSetWriteVerifyOption (
  1264.                                                 VOID far * pCDiskDrive,
  1265.                                                 BOOL bWriteVerifyOptionNew
  1266.                                                )
  1267.  
  1268.  pCDiskDrive           Pointer to DiskDrive object.
  1269.  bWriteVerifyOptionNew New value of Write Verify Option.
  1270.       0                 Verify off
  1271.       1                 Verify on
  1272.  
  1273.  Sets write verify option.
  1274.  
  1275.  Returns: VOID
  1276.  
  1277.   Example:
  1278.          VOID far *pCDiskDriveA ;
  1279.  
  1280.          char cDriveLetter ;
  1281.  
  1282.          FARPROC lpfnNewHandleStatus ;
  1283.  
  1284.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  1285.                                                   NewHandleStatus ) ;
  1286.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', FD1440, 0,
  1287.                                               lpfnNewHandleStatus ) ;
  1288.          ...
  1289.          DiskDriveSetWriteVerifyOption ( pCDiskDriveA, TRUE ) ;
  1290. >>DiskDriveReset
  1291. ------------------ SABDU001.DLL API: DiskDriveReset ------------------
  1292.  
  1293.  UINT FAR PASCAL DiskDriveReset (
  1294.                                  VOID far * pCDiskDrive
  1295.                                 )
  1296.  
  1297.  pCDiskDrive Pointer to DiskDrive object.
  1298.  
  1299.  Resets virtual drive
  1300.  
  1301.  Returns: zero if successfull, status code if not successfull.
  1302.  
  1303.   Example:
  1304.          VOID far *pCDiskDriveA ;
  1305.  
  1306.          char cDriveLetter ;
  1307.  
  1308.          FARPROC lpfnNewHandleStatus ;
  1309.  
  1310.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  1311.                                                   NewHandleStatus ) ;
  1312.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', FD1440, 0,
  1313.                                               lpfnNewHandleStatus ) ;
  1314.          ...
  1315.          DiskDriveReset ( pCDiskDriveA ) ;
  1316. >>DiskDriveForceReset
  1317. ------------------ SABDU001.DLL API: DiskDriveForceReset -------------
  1318.  
  1319.  UINT FAR PASCAL DiskDriveForceReset (
  1320.                                       VOID far * pCDiskDrive
  1321.                                      )
  1322.  
  1323.  pCDiskDrive Pointer to DiskDrive object.
  1324.  
  1325.  Forces reset of virtual drive
  1326.  
  1327.  Returns: zero if successfull, status code if not successfull.
  1328.  
  1329.   Example:
  1330.          VOID far *pCDiskDriveA ;
  1331.  
  1332.          char cDriveLetter ;
  1333.  
  1334.          FARPROC lpfnNewHandleStatus ;
  1335.  
  1336.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  1337.                                                   NewHandleStatus ) ;
  1338.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', FD1440, 0,
  1339.                                               lpfnNewHandleStatus ) ;
  1340.          ...
  1341.          DiskDriveForceReset ( pCDiskDriveA ) ;
  1342. >>DiskDriveType
  1343. ------------------ SABDU001.DLL API: DiskDriveType -------------------
  1344.  
  1345.  UINT FAR PASCAL DiskDriveType (
  1346.                                 VOID far * pCDiskDrive
  1347.                                )
  1348.  
  1349.  pCDiskDrive Pointer to DiskDrive object.
  1350.  
  1351.  Returns: Type ( density ).
  1352.  
  1353.   Example:
  1354.          VOID far *pCDiskDriveA ;
  1355.  
  1356.          char cDriveLetter ;
  1357.  
  1358.          FARPROC lpfnNewHandleStatus ;
  1359.  
  1360.          UINT nType ;
  1361.  
  1362.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  1363.                                                   NewHandleStatus ) ;
  1364.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
  1365.                                               lpfnNewHandleStatus ) ;
  1366.          ...
  1367.          nType = DiskDriveType ( pCDiskDriveA ) ;
  1368. >>DiskDriveHasData
  1369. ------------------ SABDU001.DLL API: DiskDriveHasData ----------------
  1370.  
  1371.  UINT FAR PASCAL DiskDriveHasData (
  1372.                                    VOID far * pCDiskDrive
  1373.                                   )
  1374.  
  1375.   pCDiskDrive Pointer to DiskDrive object.
  1376.  
  1377.   Returns: TRUE if DiskDrive is valid object.
  1378.  
  1379.   Example:
  1380.          VOID far *pCDiskDriveA ;
  1381.  
  1382.          FARPROC lpfnNewHandleStatus ;
  1383.  
  1384.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  1385.                                                   NewHandleStatus ) ;
  1386.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
  1387.                                               lpfnNewHandleStatus ) ;
  1388.          ...
  1389.          if ( DiskDriveHasData ( pCDiskDriveA ) ) ...;
  1390. >>DiskDriveIsTruncated
  1391. ------------------ SABDU001.DLL API: DiskDriveIsTruncated ------------
  1392.  
  1393.  UINT FAR PASCAL DiskDriveIsTruncated (
  1394.                                        VOID far * pCDiskDrive
  1395.                                       )
  1396.  
  1397.  pCDiskDrive Pointer to DiskDrive object.
  1398.  
  1399.  Returns: TRUE if DiskDrive is truncated.
  1400.  
  1401.   Example:
  1402.          VOID far *pCDiskDriveA ;
  1403.  
  1404.          FARPROC lpfnNewHandleStatus ;
  1405.  
  1406.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  1407.                                                   NewHandleStatus ) ;
  1408.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
  1409.                                               lpfnNewHandleStatus ) ;
  1410.          ...
  1411.          if ( DiskDriveIsTruncated ( pCDiskDriveA ) ) ...;
  1412. >>DiskDriveFormat
  1413. ------------------ SABDU001.DLL API: DiskDriveFormat -----------------
  1414.  
  1415.  UINT FAR PASCAL DiskDriveFormat (
  1416.                                   VOID far * pCDiskDrive,
  1417.                                   LPCSTR lpczVolumeLabel,
  1418.                                   UNIT nFormatOption,
  1419.                                   LPBYTE lpbyBootSector,
  1420.                                   lpfnHANDLESTATUS lpfnHandleStatus
  1421.                                  )
  1422.  
  1423.  pCDiskDrive     Pointer to DiskDrive object.
  1424.  lpczVolumeLabel Pointer to new volume label.
  1425.  nFormatOption   Format option.
  1426.    1               AUTOMATIC
  1427.    2               ALWAYS
  1428.    3               NEVER
  1429.    4               FAST
  1430.  lpbyBootSector  Pointer to new boot sector code.
  1431.  lpfnNewHandleStatus Pointer to routine to handle status callbacks
  1432.  
  1433.  Formats DiskDrive object.
  1434.  
  1435.  Returns: FALSE if successfull.
  1436.  
  1437.   Example:
  1438.          VOID far *pCDiskDriveA ;
  1439.  
  1440.          FARPROC lpfnNewHandleStatus ;
  1441.  
  1442.          UINT nType ;
  1443.  
  1444.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  1445.                                                   NewHandleStatus ) ;
  1446.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
  1447.                                               lpfnNewHandleStatus ) ;
  1448.          ...
  1449.          DiskDriveFormat ( pCDiskDriveA, "VOL 1", FAST, NULL, NULL ) ;
  1450. >>DiskDriveSetType
  1451. ------------------ SABDU001.DLL API: DiskDriveSetType ----------------
  1452.  
  1453.  VOID FAR PASCAL DiskDriveSetType (
  1454.                                    VOID far * pCDiskDrive,
  1455.                                    UINT nNewType
  1456.                                   )
  1457.  
  1458.  pCDiskDrive Pointer to DiskDrive object.
  1459.  nNewType    Defines type of diskette
  1460.              FD0360 FD0720 FD1200 FD1200H FD1440 FD1440H FD2880
  1461.  
  1462.  Sets diskette type.
  1463.  
  1464.  Returns: VOID
  1465.  
  1466.   Example:
  1467.          VOID far *pCDiskDriveA ;
  1468.  
  1469.          char cDriveLetter ;
  1470.  
  1471.          FARPROC lpfnNewHandleStatus ;
  1472.  
  1473.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  1474.                                                   NewHandleStatus ) ;
  1475.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
  1476.                                               lpfnNewHandleStatus ) ;
  1477.          ...
  1478.          DiskDriveSetType ( pCDiskDriveA, FD1200 ) ;
  1479. >>DiskDriveUsedCylinders
  1480. ------------------ SABDU001.DLL API: DiskDriveUsedCylinders ----------
  1481.  
  1482.  UINT FAR PASCAL DiskDriveUsedCylinders (
  1483.                                          VOID far * pCDiskDrive
  1484.                                          )
  1485.  
  1486.  pCDiskDrive Pointer to DiskDrive object.
  1487.  
  1488.  Returns: Number of cylinders.
  1489.  
  1490.   Example:
  1491.          VOID far *pCDiskDriveA ;
  1492.  
  1493.          FARPROC lpfnNewHandleStatus ;
  1494.  
  1495.          UINT nCylinder ;
  1496.  
  1497.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  1498.                                                   NewHandleStatus ) ;
  1499.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
  1500.                                               lpfnNewHandleStatus ) ;
  1501.          ...
  1502.          nCylinder = DiskDriveUsedCylinders ( pCDiskDriveA ) ;
  1503. >>DiskDriveUsedHeads
  1504. ------------------ SABDU001.DLL API: DiskDriveHeads ------------------
  1505.  
  1506.  UINT FAR PASCAL DiskDriveUsedHeads (
  1507.                                      VOID far * pCDiskDrive
  1508.                                     )
  1509.  
  1510.  pCDiskDrive Pointer to DiskDrive object.
  1511.  
  1512.  Returns: Number of heads.
  1513.  
  1514.   Example:
  1515.          VOID far *pCDiskDriveA ;
  1516.  
  1517.          FARPROC lpfnNewHandleStatus ;
  1518.  
  1519.          UINT nHeads ;
  1520.  
  1521.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  1522.                                                   NewHandleStatus ) ;
  1523.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
  1524.                                               lpfnNewHandleStatus ) ;
  1525.          ...
  1526.          nHeads = DiskDriveUsedHeads ( pCDiskDriveA ) ;
  1527. >>DiskDriveUsedSectors
  1528. ------------------ SABDU001.DLL API: DiskDriveUsedSectors ------------
  1529.  
  1530.  UINT FAR PASCAL DiskDriveUsedSectors (
  1531.                                        VOID far * pCDiskDrive
  1532.                                       )
  1533.  
  1534.  pCDiskDrive Pointer to DiskDrive object.
  1535.  
  1536.  Returns: Number of sectors in a track.
  1537.  
  1538.   Example:
  1539.          VOID far *pCDiskDriveA ;
  1540.  
  1541.          FARPROC lpfnNewHandleStatus ;
  1542.  
  1543.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  1544.                                                   NewHandleStatus ) ;
  1545.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
  1546.                                               lpfnNewHandleStatus ) ;
  1547.          ...
  1548.          nSectors = DiskDriveUsedSectors ( pCDiskDriveA ) ;
  1549. >>DiskDriveUsedSectorSize
  1550. ------------------ SABDU001.DLL API: DiskDriveUsedSectorSize----------
  1551.  
  1552.  UINT FAR PASCAL DiskDriveUsedSectorSize (
  1553.                                           VOID far * pCDiskDrive
  1554.                                          )
  1555.  
  1556.  pCDiskDrive Pointer to DiskDrive object.
  1557.  
  1558.  Returns: Sector size.
  1559.  
  1560.   Example:
  1561.          VOID far *pCDiskDriveA ;
  1562.  
  1563.          FARPROC lpfnNewHandleStatus ;
  1564.  
  1565.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  1566.                                                   NewHandleStatus ) ;
  1567.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
  1568.                                               lpfnNewHandleStatus ) ;
  1569.          ...
  1570.          nSectorSize = DiskDriveUsedSectorSize ( pCDiskDriveA ) ;
  1571. >>DiskDriveNumberOfFATs
  1572. ------------------ SABDU001.DLL API: DiskDriveNumberOfFATs -----------
  1573.  
  1574.  UINT FAR PASCAL DiskDriveNumberOfFATs (
  1575.                                         VOID far * pCDiskDrive
  1576.                                        )
  1577.  
  1578.  pCDiskDrive Pointer to DiskDrive object.
  1579.  
  1580.  Returns: Number of File Allocation Tables
  1581.  
  1582.   Example:
  1583.          VOID far *pCDiskDriveA ;
  1584.  
  1585.          FARPROC lpfnNewHandleStatus ;
  1586.  
  1587.          UINT nNumberOfFATs ;
  1588.  
  1589.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  1590.                                                   NewHandleStatus ) ;
  1591.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
  1592.                                               lpfnNewHandleStatus ) ;
  1593.          ...
  1594.          nNumberOfFATs = DiskDriveNumberOfFATs ( pCDiskDriveA ) ;
  1595. >>DiskDriveSectorsPerCluster
  1596. ------------------ SABDU001.DLL API: DiskDriveSectorsPerCluster ------
  1597.  
  1598.  UINT FAR PASCAL DiskDriveSectorsPerCluster (
  1599.                                              VOID far * pCDiskDrive
  1600.                                             )
  1601.  
  1602.  pCDiskDrive Pointer to DiskDrive object.
  1603.  
  1604.  Returns: Number sectors in a cluster.
  1605.  
  1606.   Example:
  1607.          VOID far *pCDiskDriveA ;
  1608.  
  1609.          FARPROC lpfnNewHandleStatus ;
  1610.  
  1611.          UINT nSectorsPerCluster ;
  1612.  
  1613.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  1614.                                                   NewHandleStatus ) ;
  1615.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
  1616.                                               lpfnNewHandleStatus ) ;
  1617.          ...
  1618.          nSectorsPerCluster = DiskDriveSectorsPerCluster ( pCDiskDriveA ) ;
  1619. >>DiskDriveSectorsPerFAT
  1620. ------------------ SABDU001.DLL API: DiskDriveSectorsPerFAT ----------
  1621.  
  1622.  UINT FAR PASCAL DiskDriveSectorsPerFAT (
  1623.                                          VOID far * pCDiskDrive
  1624.                                         )
  1625.  
  1626.  pCDiskDrive Pointer to DiskDrive object.
  1627.  
  1628.  Returns: Number sectors in a file allocation table.
  1629.  
  1630.   Example:
  1631.          VOID far *pCDiskDriveA ;
  1632.  
  1633.          FARPROC lpfnNewHandleStatus ;
  1634.  
  1635.          UINT nSectorsPerFAT ;
  1636.  
  1637.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  1638.                                                   NewHandleStatus ) ;
  1639.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
  1640.                                               lpfnNewHandleStatus ) ;
  1641.          ...
  1642.          nSectorsPerFAT = DiskDriveSectorsPerFAT ( pCDiskDriveA ) ;
  1643. >>DiskDriveRootDirectoryEntries
  1644. ------------------ SABDU001.DLL API: DiskDriveRootDirectoryEntries ---
  1645.  
  1646.  UINT FAR PASCAL DiskDriveRootDirectoryEntries (
  1647.                                                 VOID far * pCDiskDrive
  1648.                                                )
  1649.  
  1650.  pCDiskDrive Pointer to DiskDrive object.
  1651.  
  1652.  Returns: Number of entries in root directory.
  1653.  
  1654.   Example:
  1655.          VOID far *pCDiskDriveA ;
  1656.  
  1657.          FARPROC lpfnNewHandleStatus ;
  1658.  
  1659.          UINT nRootDirectoryEntries ;
  1660.  
  1661.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  1662.                                                   NewHandleStatus ) ;
  1663.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
  1664.                                               lpfnNewHandleStatus ) ;
  1665.          ...
  1666.          nRootDirectoryEntries =
  1667.                     DiskDriveRootDirectoryEntries ( pCDiskCDriveA ) ;
  1668. >>DiskDriveGetVolumeDate
  1669. ------------------ SABDU001.DLL API: DiskDriveGetVolumeDate --------
  1670.  
  1671.  UINT FAR PASCAL DiskDriveGetVolumeDate (
  1672.                                          VOID far * pCDiskDrive,
  1673.                                          LPSTR lpczOldVolumeDate
  1674.                                         )
  1675.  
  1676.  pCDiskDrive       Pointer to DiskDrive object.
  1677.  lpczOldVolumeDate Pointer to date buffer.
  1678.  
  1679.  Returns: lpczOldVolumeDate.
  1680.  
  1681.   Example:
  1682.          VOID far *pCDiskDriveA ;
  1683.  
  1684.          FARPROC lpfnNewHandleStatus ;
  1685.  
  1686.          LPBYTE lpczOldVolumeDate ;
  1687.  
  1688.          lpczOldVolumeDate = new BYTE[_SIZE_OF_DATE]
  1689.  
  1690.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  1691.                                                   NewHandleStatus ) ;
  1692.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
  1693.                                               lpfnNewHandleStatus ) ;
  1694.          ...
  1695.          DiskDriveGetVolumeDate ( pCDiskDriveA, lpczOldVolumeDate ) ;
  1696. >>DiskDriveGetVolumeLabel
  1697. ------------------ SABDU001.DLL API: DiskDriveGetVolumeLabel --------
  1698.  
  1699.  UINT FAR PASCAL DiskDriveGetVolumeLabel (
  1700.                                            VOID far * pCDiskDrive,
  1701.                                            LPSTR lpczOldVolumeLabel
  1702.                                           )
  1703.  
  1704.  pCDiskDrive        Pointer to DiskDrive object.
  1705.  lpczOldVolumeLabel Pointer to volume label buffer.
  1706.  
  1707.  Copies volume label into lpczOldVolumeLabel.
  1708.  
  1709.  Returns: lpczOldVolumeLabel.
  1710.  
  1711.   Example:
  1712.          VOID far *pCDiskDriveA ;
  1713.  
  1714.          FARPROC lpfnNewHandleStatus ;
  1715.  
  1716.          LPBYTE lpczOldVolumeLabel ;
  1717.  
  1718.          lpczVolumeLabel = new BYTE[_SIZE_OF_VOLUME_LABEL]
  1719.  
  1720.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  1721.                                                   NewHandleStatus ) ;
  1722.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
  1723.                                               lpfnNewHandleStatus ) ;
  1724.          ...
  1725.          DiskDriveGetVolumeLabel ( pCDiskDriveA, lpczOldVolumeLabel ) ;
  1726. >>DiskDriveSetVolumeLabel
  1727. ------------------ SABDU001.DLL API: DiskDriveSetVolumeLabel --------
  1728.  
  1729.  UINT FAR PASCAL DiskDriveSetVolumeLabel (
  1730.                                            VOID far * pCDiskDrive,
  1731.                                            LPSTR lpczNewVolumeLabel
  1732.                                           )
  1733.  
  1734.   pCDiskDrive        Pointer to DiskDrive object.
  1735.   lpczNewVolumeLabel Pointer to new volume label.
  1736.  
  1737.   Sets volume label to lpczNewVolumeLabel.
  1738.  
  1739.   Returns: FALSE if successfull.
  1740.  
  1741.   Example:
  1742.          VOID far *pCDiskDriveA ;
  1743.  
  1744.          FARPROC lpfnNewHandleStatus ;
  1745.  
  1746.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  1747.                                                   NewHandleStatus ) ;
  1748.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
  1749.                                               lpfnNewHandleStatus ) ;
  1750.          ...
  1751.          DiskDriveSetVolumeLabel ( pCDiskDriveA, "Vol 1" ) ;
  1752. >>DiskDriveTruncate
  1753. ------------------ SABDU001.DLL API: DiskDriveTruncate ---------------
  1754.  
  1755.  VOID FAR PASCAL DiskDriveTruncate (
  1756.                                     VOID far * pCDiskDrive
  1757.                                    )
  1758.  
  1759.  pCDiskDrive Points to DiskDrive object.
  1760.  
  1761.  Turns on truncation.
  1762.  
  1763.  Returns: VOID
  1764.  
  1765.   Example:
  1766.          VOID far *pCDiskDriveA ;
  1767.  
  1768.          FARPROC lpfnNewHandleStatus ;
  1769.  
  1770.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  1771.                                                   NewHandleStatus ) ;
  1772.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
  1773.                                               lpfnNewHandleStatus ) ;
  1774.          ...
  1775.          DiskDriveTypeTruncate ( pCDiskDriveA ) ;
  1776. >>DiskDriveTruncateRevers
  1777. ------------------ SABDU001.DLL API: DiskDriveTruncateReverse --------
  1778.  
  1779.  UINT FAR PASCAL DiskDriveTruncateReverse (
  1780.                                            VOID far * pCDiskDrive
  1781.                                           )
  1782.  
  1783.  pCDiskDrive Points to DiskDrive object.
  1784.  
  1785.  Turns off truncation.
  1786.  
  1787.  Returns: VOID
  1788.  
  1789.   Example:
  1790.          VOID far *pCDiskDriveA ;
  1791.  
  1792.          FARPROC lpfnNewHandleStatus ;
  1793.  
  1794.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  1795.                                                   NewHandleStatus ) ;
  1796.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
  1797.                                               lpfnNewHandleStatus ) ;
  1798.          ...
  1799.          DiskDriveTruncateReverse ( pCDiskDriveA ) ;
  1800. >>DiskDriveWriteBootSector
  1801. ------------------ SABDU001.DLL API: DiskDriveWriteBootSector --------
  1802.  
  1803.  UINT FAR PASCAL DiskDriveWriteBootSector (
  1804.                                            VOID far * pCDiskDrive,
  1805.                                            lpbyModelBootSector,
  1806.                                lpfnHANDLESTATUS lpfnNewHandleStatus
  1807.                               )
  1808.  
  1809.  pCDiskDrive         Pointer to DiskDrive object.
  1810.  lpbyModelBootSector Pointer to new boot sector model (code).
  1811.                      NULL indicates use standard boot sector code.
  1812.  lpfnNewHandleStatus Pointer to routine to handle status callbacks
  1813.  
  1814.  Writes boot sector.
  1815.  
  1816.  Returns: False if successfull.
  1817.  
  1818.   Example:
  1819.          VOID far *pCDiskDriveA ;
  1820.  
  1821.          FARPROC lpfnNewHandleStatus ;
  1822.  
  1823.          lpfnNewHandleStatus = MakeProcInstance ( hInstance,
  1824.                                                   NewHandleStatus ) ;
  1825.          pCDiskDriveA = DiskDriveCreateDrive ( 'A', 0, 0,
  1826.                                               lpfnNewHandleStatus ) ;
  1827.          ...
  1828.          DiskDriveTypeWriteBootSector ( pCDiskDriveA, NULL, NULL ) ;
  1829. >>FDrive
  1830. ------------------ SABDU001.DLL API: FDrive objects ------------------
  1831.  
  1832.  A FDrive (File Drive) is a specialized version of the VDrive
  1833.  (Virtual Drive).  It is an object that represents a diskette image
  1834.  file.
  1835.  
  1836.  The following functions are available to manipulate it:
  1837.      FDriveCreate        Creates a FDrive object
  1838.      FDriveDelete        Deletes a FDrive object
  1839.      FDriveForceReset    Issues a reset to the drive
  1840.      FDriveFormatTrack   Formats a track
  1841.      FDriveReadSectors   Reads a group of sectors from the drive
  1842.      FDriveReset         Issues a reset to the drive if it was used
  1843.      FDriveSetRead       Sets up for reading from the drive
  1844.      FDriveSetWrite      Sets up for writing to the drive
  1845.      FDriveWriteSectors  Writes a group of sectors to the drive
  1846. >>FDriveCreate
  1847. ------------------ SABDU001.DLL API: FDriveCreate --------------------
  1848.  
  1849.  VOID far * FAR PASCAL FDriveCreate (
  1850.                                      LPCSTR lpczFileName,
  1851.                                      LPCSTR lpczApplicationTitle,
  1852.                                      LPCSTR lpczVersion,
  1853.                                      lpfnHANDLESTATUS lpfnNewHandleStatus
  1854.                                     )
  1855.  
  1856.  lpczFileName         Pointer to file name to be used.
  1857.  lpczApplicationTitle Pointer to application title.
  1858.  lpczVersion          Pointer to version.
  1859.  lpfnNewHandleStatus Points to a callback routine that handles event
  1860.                      notifications including errors.
  1861.  
  1862.  Creates a FDrive object associated with file name.
  1863.  
  1864.  Returns: Pointer to FDrive object.
  1865.  
  1866.  Example:
  1867.          VOID far *pDriveA ;
  1868.  
  1869.          pDrive = FDriveCreate (
  1870.                                 "MyFileName",
  1871.                                 "SAB Diskette Utility",
  1872.                                 "2.10",
  1873.                                 lpfnHandleStatus
  1874.                                ) ;
  1875. >>FDriveDelete
  1876. ------------------ SABDU001.DLL API: FDriveDelete --------------------
  1877.  
  1878.  VOID       FAR PASCAL FDriveDelete (
  1879.                                      pFDrive
  1880.                                     )
  1881.  
  1882.  pFDrive Points to FDrive object to be deleted.
  1883.  
  1884.  Deletes the FDrive object pointed to by pFDrive.
  1885.  
  1886.  Returns: VOID
  1887.  
  1888.  Example:
  1889.          VOID far *pDriveA ;
  1890.  
  1891.          pDrive = FDriveCreate (
  1892.                                 "MyFileName",
  1893.                                 "SAB Diskette Utility",
  1894.                                 "2.10"
  1895.                                ) ;
  1896.          ...
  1897.          FDriveDelete ( pDrive ) ;
  1898.          pDrive = NULL ;
  1899. >>FDriveSetRead
  1900. ------------------ SABDU001.DLL API: FDriveSetRead -------------------
  1901.  
  1902.  UINT       FAR PASCAL FDriveSetRead (
  1903.                                       VOID far *pFDrive,
  1904.                                       UINT nTempType,
  1905.                                       UINT nCylinders
  1906.                                      )
  1907.  
  1908.  pFDrive    Points to the FDrive object.
  1909.  nTempType  Defines the type of diskette expected:
  1910.             FD0360 FD0720 FD1200 FD1440 FD2880
  1911.  nCylinders Defines the number of cylinders.
  1912.             NULL indicates default for type.
  1913.  
  1914.  Prepares the FDrive object pointed to by pFDrive for reading.
  1915.  
  1916.  Returns: zero if successfull, status code if not successfull.
  1917.  
  1918.  Example:
  1919.          VOID far *pDriveA ;
  1920.  
  1921.          pDrive = FDriveCreate (
  1922.                                 "MyFileName",
  1923.                                 "SAB Diskette Utility",
  1924.                                 "2.10"
  1925.                                ) ;
  1926.          ...
  1927.          FDriveSetRead ( pDrive, FD0360, NULL ) ;
  1928. >>FDriveSetWrite
  1929. ------------------ SABDU001.DLL API: FDriveSetWrite ------------------
  1930.  
  1931.  UINT       FAR PASCAL FDriveSetWrite (
  1932.                                        VOID far *pFDrive,
  1933.                                        UINT nTempType,
  1934.                                        UINT nCylinders
  1935.                                       )
  1936.  
  1937.  pFDrive    Points to the FDrive object.
  1938.  nTempType  Defines the type of diskette expected:
  1939.             FD0360 FD0720 FD1200 FD1440 FD2880
  1940.  nCylinders Defines the number of cylinders.
  1941.             NULL indicates default for type.
  1942.  
  1943.  Prepares the FDrive object pointed to by pFDrive for writing.
  1944.  
  1945.  Returns: zero if successfull, status code if not successfull.
  1946.  
  1947.  Example:
  1948.          VOID far *pDriveA ;
  1949.  
  1950.          pDrive = FDriveCreate (
  1951.                                 "MyFileName",
  1952.                                 "SAB Diskette Utility",
  1953.                                 "2.10"
  1954.                                ) ;
  1955.          ...
  1956.          FDriveSetWrite ( pDrive, FD0360, NULL ) ;
  1957. >>FDriveReset
  1958. ------------------ SABDU001.DLL API: FDriveReset ---------------------
  1959.  
  1960.  UINT       FAR PASCAL FDriveReset (
  1961.                                     VOID far *pFDrive
  1962.                                    )
  1963.  
  1964.  pFDrive    Points to the FDrive object.
  1965.  
  1966.  Resets the FDrive object pointed to by pFDrive.
  1967.  
  1968.  Returns: zero if successfull, status code if not successfull.
  1969.  
  1970.  Example:
  1971.          VOID far *pDriveA ;
  1972.  
  1973.          pDrive = FDriveCreate (
  1974.                                 "MyFileName",
  1975.                                 "SAB Diskette Utility",
  1976.                                 "2.10"
  1977.                                ) ;
  1978.          ...
  1979.          FDriveReset ( pDrive ) ;
  1980. >>FDriveForceReset
  1981. ------------------ SABDU001.DLL API: FDriveForceReset ----------------
  1982.  
  1983.  UINT       FAR PASCAL FDriveForceReset (
  1984.                                          VOID far *pFDrive
  1985.                                         )
  1986.  
  1987.  pFDrive    Points to FDrive object.
  1988.  
  1989.  Resets the FDrive object pointed to by pFDrive.
  1990.  
  1991.  Returns: zero if successfull, status code if not successfull.
  1992.  
  1993.  Example:
  1994.          VOID far *pDriveA ;
  1995.  
  1996.          pDrive = FDriveCreate (
  1997.                                 "MyFileName",
  1998.                                 "SAB Diskette Utility",
  1999.                                 "2.10"
  2000.                                ) ;
  2001.          ...
  2002.          FDriveForceReset ( pDrive ) ;
  2003. >>FDriveFormatTrack
  2004. ------------------ SABDU001.DLL API: FDriveFormatTrack ---------------
  2005.  
  2006.  UINT       FAR PASCAL FDriveForceReset (
  2007.                                          VOID far *pFDrive,
  2008.                                          UNIT nCylinder,
  2009.                                          UNIT nHead
  2010.                                         )
  2011.  
  2012.  pFDrive    Points to FDrive Object
  2013.  nCylinder  Number of Cylinder to be formatted
  2014.  nHead      Number of Head to be formatted
  2015.  
  2016.  Formats a track.
  2017.  
  2018.  Returns: zero if successfull, status code if not successfull
  2019.  
  2020.  Example:
  2021.          VOID far *pDriveA ;
  2022.  
  2023.          pDrive = FDriveCreate (
  2024.                                 "MyFileName",
  2025.                                 "SAB Diskette Utility",
  2026.                                 "2.10"
  2027.                                ) ;
  2028.          ...
  2029.          FDriveFormatTrack ( pDrive, nCylinder, nHead ) ;
  2030. >>FDriveReadSectors
  2031. ------------------ SABDU001.DLL API: FDriveReadSectors ---------------
  2032.  
  2033.  UINT       FAR PASCAL FDriveReadSectors (
  2034.                                           VOID far *pFDrive,
  2035.                                           UNIT nCylinder,
  2036.                                           UNIT nHead,
  2037.                                           UINT nSector,
  2038.                                           UINT nCount,
  2039.                                           LPBYTE lpcBuffer
  2040.                                          )
  2041.  
  2042.  pFDRive    Points to FDrive object.
  2043.  nCylinder  Cylinder to read from
  2044.  nHead      Head to read with
  2045.  nSector    Starting sector
  2046.  nCount     Number of sectors to read
  2047.  lpcBuffer  Buffer to contain the data read.
  2048.  
  2049.  Reads a group of sectors.
  2050.  
  2051.  Returns: zero if successfull, status code if not successfull.
  2052.  
  2053.  Example:
  2054.          VOID far *pDriveA ;
  2055.  
  2056.          pDrive = FDriveCreate (
  2057.                                 "MyFileName",
  2058.                                 "SAB Diskette Utility",
  2059.                                 "2.10"
  2060.                                ) ;
  2061.          ...
  2062.          FDriveReadSectors ( pDrive, nCylinder, nHead, nSector,
  2063.                              nCount, lpcBuffer ) ;
  2064. >>FDriveWriteSectors
  2065. ------------------ SABDU001.DLL API: FDriveWriteSectors --------------
  2066.  
  2067.  UINT       FAR PASCAL FDriveWriteSectors (
  2068.                                            VOID far *pFDrive,
  2069.                                            UNIT nCylinder,
  2070.                                            UNIT nHead,
  2071.                                            UINT nSector,
  2072.                                            UINT nCount,
  2073.                                            LPBYTE lpcBuffer
  2074.                                           )
  2075.  
  2076.  pFDrive    Points to FDrive object.
  2077.  nCylinder  Cylinder to write to
  2078.  nHead      Head to write with
  2079.  nSector    Starting sector
  2080.  nCount     Number of sectors to write
  2081.  lpcBuffer  Buffer that contains the data to be written.
  2082.  
  2083.  Writes a group of sectors from the drive pointerd to by pFDrive
  2084.  
  2085.  Returns: zero if successfull, status code if not successfull.
  2086.  
  2087.  Example:
  2088.          VOID far *pDriveA ;
  2089.  
  2090.          pDrive = FDriveCreate (
  2091.                                 "MyFileName",
  2092.                                 "SAB Diskette Utility",
  2093.                                 "2.10"
  2094.                                ) ;
  2095.          ...
  2096.          FDriveWriteSectors ( pDrive, nCylinder, nHead, nSector,
  2097.                               nCount, lpcBuffer ) ;
  2098. >>HandleStatus
  2099. ------------------ SABDU001.DLL Callback: HandleStatus ---------------
  2100.  
  2101. typedef int (FAR PASCAL __export * lpfnHANDLESTATUS)(
  2102.                                                      UINT nStatus1,
  2103.                                                      UINT nStatus2,
  2104.                                                      UINT nParam1,
  2105.                                                      UINT nParam2,
  2106.                                                      LONG lParam1,
  2107.                                                      LONG lParam2
  2108.                                                     ) ;
  2109.  
  2110. int  FAR PASCAL __export HandleStatus (
  2111.                                        UINT nStatus1,
  2112.                                        UINT nStatus2,
  2113.                                        UINT nParam1,
  2114.                                        UINT nParam2,
  2115.                                        LONG lParam1,
  2116.                                        LONG lParam2
  2117.                                       ) ;
  2118.  
  2119.   nStatus1
  2120.   -------------------
  2121.     nStatus2                    nParam1               nParam2
  2122.     --------------------------- --------------------- --------------------
  2123.                                   lParam1               lParam2
  2124.                                   --------------------- ---------------
  2125.  
  2126.   STATUS1_INIT                  hWnd                  hInstance
  2127.   STATUS1_START
  2128.   STATUS1_BOOT_SECTOR
  2129.   STATUS1_DIRECTORY
  2130.   STATUS1_FAT
  2131.   STATUS1_SYSTEM_FILE
  2132.   STATUS1_CYLINDER              cylinder              percent complete
  2133.   STATUS1_CLUSTER               cluster               percent complete
  2134.   STATUS1_HEAD
  2135.   STATUS1_END
  2136.   STATUS1_ERROR
  2137.     STATUS2_FILE                STATUS3_OPEN_FAIL
  2138.                                   file name pointer
  2139.     STATUS2_FILE                STATUS3_OPEN_FILE_IO_ERROR
  2140.                                   file name pointer
  2141.     STATUS2_FILE                STATUS3_OPEN_INPUT_BAD
  2142.                                   file name pointer
  2143.     STATUS2_FILE                STATUS3_OPEN_FLAGS_BAD
  2144.                                   file name pointer
  2145.     STATUS2_FILE                STATUS3_OPEN_NOT_SUPPORTED
  2146.                                   file name pointer
  2147.     STATUS2_READ                cylinder              head
  2148.     STATUS2_WRITE               cylinder              head
  2149.     STATUS2_FORMAT              cylinder              head
  2150.     STATUS2_FILE_READ
  2151.                                   file name pointer
  2152.     STATUS2_FILE_WRITE
  2153.                                   file name pointer
  2154.     STATUS2_DISK_SPACE
  2155.                                   space needed          space available
  2156.     STATUS2_HEAD                cylinder              head
  2157.     STATUS2_MEMORY
  2158.     STATUS2_SYSTEM
  2159.     STATUS2_FAT
  2160.     STATUS2_DIRECTORY
  2161.     STATUS2_SYSTEM_BOOT_SECTOR
  2162.     STATUS2_BOOT_SECTOR
  2163.     STATUS2_SYSTEM_FILE_MISSING
  2164.     STATUS2_SYSTEM_FILE_OPEN
  2165.     STATUS2_COMPARE             cylinder              head
  2166.     STATUS2_DPT
  2167.     STATUS2_SECTORS             target sectors        source sectors
  2168.                                   target cylinders      source cylinders
  2169.     STATUS2_CLUSTER
  2170. >>MDrive
  2171. ------------------ SABDU001.DLL API: MDrive objects ------------------
  2172.  
  2173.  A MDrive (Memory Drive) is a specialized version of the VDrive
  2174.  (Virtual Drive).  It is an object that represents a diskette image in
  2175.  memory.
  2176.  
  2177.  The following functions are available to manipulate it:
  2178.      MDriveCreate        Creates a MDrive object
  2179.      MDriveDelete        Deletes a MDrive object
  2180.      MDriveForceReset    Issues a reset to the drive
  2181.      MDriveFormatTrack   Formats a track
  2182.      MDriveReadSectors   Reads a group of sectors from the drive
  2183.      MDriveReset         Issues a reset to the drive if it was used
  2184.      MDriveSetRead       Sets up for reading from the drive
  2185.      MDriveSetWrite      Sets up for writing to the drive
  2186.      MDriveWriteSectors  Writes a group of sectors to the drive
  2187. >>MDriveCreate
  2188. ------------------ SABDU001.DLL API: MDriveCreate --------------------
  2189.  
  2190.  VOID far * FAR PASCAL MDriveCreate (
  2191.                                      UINT nMemory,
  2192.                                      lpfnHANDLESTATUS lpfnNewHandleStatus
  2193.                                     )
  2194.  
  2195.  nMemory             Identifier for MDrive object.
  2196.  lpfnNewHandleStatus Points to a callback routine that handles event
  2197.                      notifications including errors.
  2198.  
  2199.  Creates a MDrive object associated with drive cDrive.
  2200.  
  2201.  Returns: Pointer to MDrive object.
  2202.  
  2203.  Example:
  2204.          VOID far *pDrive1 ;
  2205.  
  2206.          pDrive1 = MDriveCreate ( 1, lpfnHandleStatus ) ;
  2207. >>MDriveDelete
  2208. ------------------ SABDU001.DLL API: MDriveDelete --------------------
  2209.  
  2210.  VOID       FAR PASCAL MDriveDelete (
  2211.                                      pMDrive
  2212.                                     )
  2213.  
  2214.  pMDrive Points to MDrive object to be deleted.
  2215.  
  2216.  Deletes the MDrive object pointed to by pMDrive.
  2217.  
  2218.  Returns: VOID
  2219.  
  2220.  Example:
  2221.          VOID far *pDrive1 ;
  2222.  
  2223.          pDrive1 = MDriveCreate ( 1 ) ;
  2224.          ...
  2225.          MDriveDelete ( pDrive1 ) ;
  2226.          pDrive1 = NULL ;
  2227. >>MDriveSetRead
  2228. ------------------ SABDU001.DLL API: MDriveSetRead -------------------
  2229.  
  2230.  UINT       FAR PASCAL MDriveSetRead (
  2231.                                       VOID far *pMDrive,
  2232.                                       UINT nTempType,
  2233.                                       UINT nCylinders
  2234.                                      )
  2235.  
  2236.  pMDrive    Points to the MDrive object.
  2237.  nTempType  Defines the type of diskette expected:
  2238.             FD0360 FD0720 FD1200 FD1440 FD2880
  2239.  nCylinders Defines the number of cylinders.
  2240.             NULL indicates default for type.
  2241.  
  2242.  Prepares the MDrive object pointed to by pMDrive for reading.
  2243.  
  2244.  Returns: zero if successfull, status code if not successfull.
  2245.  
  2246.  Example:
  2247.          VOID far *pDrive1 ;
  2248.  
  2249.          pDrive1 = MDriveCreate ( 1 ) ;
  2250.          ...
  2251.          MDriveSetRead ( pDrive1, FD0360, NULL ) ;
  2252. >>MDriveSetWrite
  2253. ------------------ SABDU001.DLL API: MDriveSetWrite ------------------
  2254.  
  2255.  UINT       FAR PASCAL MDriveSetWrite (
  2256.                                        VOID far *pMDrive,
  2257.                                        UINT nTempType,
  2258.                                        UINT nCylinders
  2259.                                       )
  2260.  
  2261.  pMDrive    Points to the MDrive object.
  2262.  nTempType  Defines the type of diskette expected:
  2263.             FD0360 FD0720 FD1200 FD1440 FD2880
  2264.  nCylinders Defines the number of cylinders.
  2265.             NULL indicates default for type.
  2266.  
  2267.  Prepares the MDrive object pointed to by pMDrive for writing.
  2268.  
  2269.  Returns: zero if successfull, status code if not successfull.
  2270.  
  2271.  Example:
  2272.          VOID far *pDrive1 ;
  2273.  
  2274.          pDrive1 = MDriveCreate ( 1 ) ;
  2275.          ...
  2276.          MDriveSetWrite ( pDrive1, FD0360, NULL ) ;
  2277. >>MDriveReset
  2278. ------------------ SABDU001.DLL API: MDriveReset ---------------------
  2279.  
  2280.  UINT       FAR PASCAL MDriveReset (
  2281.                                     VOID far *pMDrive
  2282.                                    )
  2283.  
  2284.  pMDrive    Points to the MDrive object.
  2285.  
  2286.  Resets the MDrive object pointed to by pMDrive.
  2287.  
  2288.  Returns: zero if successfull, status code if not successfull
  2289.  
  2290.  Example:
  2291.          VOID far *pDrive1 ;
  2292.  
  2293.          pDrive1 = MDriveCreate ( 1 ) ;
  2294.          ...
  2295.          MDriveReset ( pDrive1 ) ;
  2296. >>MDriveForceReset
  2297. ------------------ SABDU001.DLL API: MDriveForceReset ----------------
  2298.  
  2299.  UINT       FAR PASCAL MDriveForceReset (
  2300.                                          VOID far *pMDrive
  2301.                                         )
  2302.  
  2303.  pMDrive    Points to MDrive object.
  2304.  
  2305.  Resets the MDrive object pointed to by pMDrive.
  2306.  
  2307.  Returns: zero if successfull, status code if not successfull.
  2308.  
  2309.  Example:
  2310.          VOID far *pDrive1 ;
  2311.  
  2312.          pDrive1 = MDriveCreate ( 1 ) ;
  2313.          ...
  2314.          MDriveForceReset ( pDrive1 ) ;
  2315. >>MDriveFormatTrack
  2316. ------------------ SABDU001.DLL API: MDriveFormatTrack ---------------
  2317.  
  2318.  UINT       FAR PASCAL MDriveForceReset (
  2319.                                          VOID far *pMDrive,
  2320.                                          UNIT nCylinder,
  2321.                                          UNIT nHead
  2322.                                         )
  2323.  
  2324.  pMDrive    Points to MDrive Object
  2325.  nCylinder  Number of Cylinder to be formatted
  2326.  nHead      Number of Head to be formatted
  2327.  
  2328.  Formats a track.
  2329.  
  2330.  Returns: zero if successfull, status code if not successfull
  2331.  
  2332.  Example:
  2333.          VOID far *pDrive1 ;
  2334.  
  2335.          pDrive1 = MDriveCreate ( 1 ) ;
  2336.          ...
  2337.          MDriveFormatTrack ( pDrive1, nCylinder, nHead ) ;
  2338. >>MDriveReadSectors
  2339. ------------------ SABDU001.DLL API: MDriveReadSectors ---------------
  2340.  
  2341.  UINT       FAR PASCAL MDriveReadSectors (
  2342.                                           VOID far *pMDrive,
  2343.                                           UNIT nCylinder,
  2344.                                           UNIT nHead,
  2345.                                           UINT nSector,
  2346.                                           UINT nCount,
  2347.                                           LPBYTE lpcBuffer
  2348.                                          )
  2349.  
  2350.  pDDRive    Points to MDrive object.
  2351.  nCylinder  Cylinder to read from
  2352.  nHead      Head to read with
  2353.  nSector    Starting sector
  2354.  nCount     Number of sectors to read
  2355.  lpcBuffer  Buffer to contain the data read.
  2356.  
  2357.  Reads a group of sectors.
  2358.  
  2359.  Returns: zero if successfull, status code if not successfull.
  2360.  
  2361.  Example:
  2362.          VOID far *pDrive1 ;
  2363.  
  2364.          pDrive1 = MDriveCreate ( 1 ) ;
  2365.          ...
  2366.          MDriveReadSectors ( pDrive1, nCylinder, nHead, nSector,
  2367.                              nCount, lpcBuffer ) ;
  2368. >>MDriveWriteSectors
  2369. ------------------ SABDU001.DLL API: MDriveWriteSectors --------------
  2370.  
  2371.  UINT       FAR PASCAL MDriveWriteSectors (
  2372.                                            VOID far *pMDrive,
  2373.                                            UNIT nCylinder,
  2374.                                            UNIT nHead,
  2375.                                            UINT nSector,
  2376.                                            UINT nCount,
  2377.                                            LPBYTE lpcBuffer
  2378.                                           )
  2379.  
  2380.  pMDrive    Points to MDrive object.
  2381.  nCylinder  Cylinder to write to
  2382.  nHead      Head to write with
  2383.  nSector    Starting sector
  2384.  nCount     Number of sectors to write
  2385.  lpcBuffer  Buffer that contains the data to be written.
  2386.  
  2387.  Writes a group of sectors from the drive pointerd to by pMDrive
  2388.  
  2389.  Returns: zero if successfull, status code if not successfull.
  2390.  
  2391.  Example:
  2392.          VOID far *pDrive1 ;
  2393.  
  2394.          pDrive1 = MDriveCreate ( 1 ) ;
  2395.          ...
  2396.          MDriveWriteSectors ( pDrive1, nCylinder, nHead, nSector,
  2397.                               nCount, lpcBuffer ) ;
  2398. >>VDrive
  2399. ------------------ SABDU001.DLL API: VDrive objects ------------------
  2400.  
  2401.  A VDrive (Virtual Drive) is an object that represents a diskette
  2402.  image.
  2403.  
  2404.  The following functions are available to manipulate it:
  2405.      VDriveFlag              Returns the flags for the virtual drive
  2406.      VDriveForceReset        Forces a reset of the virtual drive
  2407.      VDriveFormatTrack       Formats a track
  2408.      VDriveIsRemote          Returns TRUE if media is remote
  2409.      VDriveIsRemovable       Returns TRUE if media is removable
  2410.      VDriveIsUseable         Returns TRUE if media is useable
  2411.      VDriveIsUsed            Returns TRUE if virtual drive was used
  2412.      VDriveLetter            Returns letter of vitual drive
  2413.      VDriveNumberOfCylinders Returns number of cylinders
  2414.      VDriveNumberOfHeads     Returns number of heads
  2415.      VDriveNumberOfSectors   Returns number of sectors
  2416.      VDriveReadSectors       Reads a group of sectors from the vitual drive
  2417.      VDriveReset             Resets the virtual drive if it was used
  2418.      VDriveSetRead           Sets up the virtual drive for reading
  2419.      VDriveSetType           Sets the type (density) of the virtual drive
  2420.      VDriveSetWrite          Sets up the virtual drive for writing
  2421.      VDriveType              Returns the type (density) of the virtual drive
  2422.      VDriveWriteSectors      Writes a group of sectors to the virutal drive
  2423. >>VDriveSetType
  2424. ------------------ SABDU001.DLL API: VDriveSetType -------------------
  2425.  
  2426.  UINT FAR PASCAL VDriveSetType (
  2427.                                 VOID far *pCVDrive,
  2428.                                 UINT nType
  2429.                                )
  2430.  
  2431.  pCVDrive   Pointer to VDrive object.
  2432.  nNewType   Defines type of diskette
  2433.             FD0360 FD0720 FD1200 FD1200H FD1440 FD1440H FD2880
  2434.  
  2435.  Sets diskette type.
  2436.  
  2437.  Returns: nType if successfull or FD0000 if not.
  2438.  
  2439.  Example:
  2440.          VOID far *pDriveA ;
  2441.  
  2442.          VDriveSetType ( pDriveA, FD0720 ) ;
  2443. >>VDriveLetter
  2444. ------------------ SABDU001.DLL API: VDriveLetter --------------------
  2445.  
  2446.  char FAR PASCAL VDriveLetter (
  2447.                                VOID far *pCVDrive
  2448.                               )
  2449.  
  2450.  pCVDrive   Pointer to VDrive object.
  2451.  
  2452.  Returns: Drive identifier.
  2453.  
  2454.  Example:
  2455.          VOID far *pDriveA ;
  2456.          char cDrive ;
  2457.  
  2458.          cDrive = VDriveLetter ( pDriveA ) ;
  2459. >>VDriveType
  2460. ------------------ SABDU001.DLL API: VDriveType ----------------------
  2461.  
  2462.  UINT FAR PASCAL VDriveType (
  2463.                              VOID far *pCVDrive
  2464.                             )
  2465.  
  2466.  pCVDrive   Pointer to VDrive object.
  2467.  
  2468.  Returns: Drive type (density).
  2469.  
  2470.  Example:
  2471.          VOID far *pDriveA ;
  2472.          UINT nType ;
  2473.  
  2474.          nType = VDriveType ( pDriveA ) ;
  2475. >>VDriveFlag
  2476. ------------------ SABDU001.DLL API: VDriveFlag ----------------------
  2477.  
  2478.  UINT FAR PASCAL VDriveFlag (
  2479.                              VOID far *pCVDrive
  2480.                             )
  2481.  
  2482.  pCVDrive   Pointer to VDrive object.
  2483.  
  2484.  Returns: Drive flag.
  2485.  
  2486.  Example:
  2487.          VOID far *pDriveA ;
  2488.          UINT nFlag ;
  2489.  
  2490.          nFlag = VDriveFlag ( pDriveA ) ;
  2491. >>VDriveNumberOfCylinders
  2492. ------------------ SABDU001.DLL API: VDriveNumberOfCylinders ---------
  2493.  
  2494.  UINT FAR PASCAL VDriveNumberOfCylinders (
  2495.                                           VOID far *pCVDrive
  2496.                                          )
  2497.  
  2498.  pCVDrive   Pointer to VDrive object.
  2499.  
  2500.  Returns: Number of cylinders.
  2501.  
  2502.  Example:
  2503.          VOID far *pDriveA ;
  2504.          UINT nCylinders ;
  2505.  
  2506.          nCylinders = VDriveNumberOfCylinders ( pDriveA ) ;
  2507. >>VDriveNumberOfHeads
  2508. ------------------ SABDU001.DLL API: VDriveNumberOfHeads -------------
  2509.  
  2510.  UINT FAR PASCAL VDriveNumberOfHeads (
  2511.                                       VOID far *pCVDrive
  2512.                                      )
  2513.  
  2514.  pCVDrive   Pointer to VDrive object.
  2515.  
  2516.  Returns: Number of heads.
  2517.  
  2518.  Example:
  2519.          VOID far *pDriveA ;
  2520.          UINT nHeads ;
  2521.  
  2522.          nHeads = VDriveNumberOfHeads ( pDriveA ) ;
  2523. >>VDriveNumberOfSectors
  2524. ------------------ SABDU001.DLL API: VDriveNumberOfSectors -----------
  2525.  
  2526.  UINT FAR PASCAL VDriveNumberOfSectors (
  2527.                                         VOID far *pCVDrive
  2528.                                        )
  2529.  
  2530.  pCVDrive   Pointer to VDrive object.
  2531.  
  2532.  Returns: Number of sectors.
  2533.  
  2534.  Example:
  2535.          VOID far *pDriveA ;
  2536.          UINT nSectors ;
  2537.  
  2538.          nSectors = VDriveNumberOfSectors ( pDriveA ) ;
  2539. >>VDriveIsRemote
  2540. ------------------ SABDU001.DLL API: VDriveIsRemote ------------------
  2541.  
  2542.  BOOL FAR PASCAL VDriveIsRemote (
  2543.                                  VOID far *pCVDrive
  2544.                                 )
  2545.  
  2546.  pCVDrive   Pointer to VDrive object.
  2547.  
  2548.  Returns: TRUE if the media is remote.
  2549.  
  2550.  Example:
  2551.          VOID far *pDriveA ;
  2552.          BOOL bRemote ;
  2553.  
  2554.          bRemote = VDriveIsRemote ( pDriveA ) ;
  2555. >>VDriveIsDoubleSpaceCVF
  2556. ------------------ SABDU001.DLL API: VDriveIsDoubleSpaceCVF ----------
  2557.  
  2558.  BOOL FAR PASCAL VDriveIsDoubleSpaceCVF (
  2559.                                          VOID far *pCVDrive
  2560.                                         )
  2561.  
  2562.  pCVDrive   Pointer to VDrive object.
  2563.  
  2564.  Returns: TRUE if the media is is a Double Spaced CVF.
  2565.  
  2566.  Example:
  2567.          VOID far *pDriveA ;
  2568.          BOOL bDoubleSpaceCVF ;
  2569.  
  2570.          bDoubleSpaceCVF = VDriveIsDoubleSpaceCVF ( pDriveA ) ;
  2571. >>VDriveIsDoubleSpaceHost
  2572. ------------------ SABDU001.DLL API: VDriveIsDoubleSpaceHost ---------
  2573.  
  2574.  BOOL FAR PASCAL VDriveIsDoubleSpaceHost (
  2575.                                          VOID far *pCVDrive
  2576.                                         )
  2577.  
  2578.  pCVDrive   Pointer to VDrive object.
  2579.  
  2580.  Returns: TRUE if the media is a Double Space host drive.
  2581.  
  2582.  Example:
  2583.          VOID far *pDriveA ;
  2584.          BOOL bDoubleSpaceHost ;
  2585.  
  2586.          bDoubleSpaceHost = VDriveIsDoubleSpaceHost ( pDriveA ) ;
  2587. >>VDriveIsRemovable
  2588. ------------------ SABDU001.DLL API: VDriveIsRemovable ---------------
  2589.  
  2590.  BOOL FAR PASCAL VDriveIsRemovable (
  2591.                                     VOID far *pCVDrive
  2592.                                    )
  2593.  
  2594.  pCVDrive   Pointer to VDrive object.
  2595.  
  2596.  Returns: TRUE if the media is removable.
  2597.  
  2598.  Example:
  2599.          VOID far *pDriveA ;
  2600.          BOOL bRemovable ;
  2601.  
  2602.          bRemovable = VDriveIsRemovable ( pDriveA ) ;
  2603. >>VDriveIsUseable
  2604. ------------------ SABDU001.DLL API: VDriveIsUseable -----------------
  2605.  
  2606.  BOOL FAR PASCAL VDriveIsUseable (
  2607.                                   VOID far *pCVDrive
  2608.                                  )
  2609.  
  2610.  pCVDrive   Pointer to VDrive object.
  2611.  
  2612.  Returns: TRUE if the media is useable.
  2613.  
  2614.  Example:
  2615.          VOID far *pDriveA ;
  2616.          BOOL bUseable ;
  2617.  
  2618.          bUseable = VDriveIsUseable ( pDriveA ) ;
  2619. >>VDriveIsUsed
  2620. ------------------ SABDU001.DLL API: VDriveIsUsed --------------------
  2621.  
  2622.  BOOL FAR PASCAL VDriveIsUsead (
  2623.                                 VOID far *pCVDrive
  2624.                                )
  2625.  
  2626.  pCVDrive   Pointer to VDrive object.
  2627.  
  2628.  Returns: TRUE if the media is used.
  2629.  
  2630.  Example:
  2631.          VOID far *pDriveA ;
  2632.          BOOL bUsed ;
  2633.  
  2634.          bUsed = VDriveIsUsed ( pDriveA ) ;
  2635. >>VDriveReset
  2636. ------------------ SABDU001.DLL API: VDriveReset ---------------------
  2637.  
  2638.  UINT FAR PASCAL VDriveReset (
  2639.                               VOID far *pCVDrive
  2640.                              )
  2641.  
  2642.  pCVDrive   Pointer to VDrive object.
  2643.  
  2644.  Resets virtual drive.
  2645.  
  2646.  Returns FALSE if successfull.
  2647.  
  2648.  Example:
  2649.          VOID far *pDriveA ;
  2650.          BOOL bReset ;
  2651.  
  2652.          bReset = !VDriveReset ( pDriveA ) ;
  2653. >>VDriveFormatTrack
  2654. ------------------ SABDU001.DLL API: VDriveFormatTrack ---------------
  2655.  
  2656.  UINT FAR PASCAL VDriveFormatTrack (
  2657.                                     VOID far *pCVDrive,
  2658.                                     UINT nCylinder,
  2659.                                     UINT nHead
  2660.                                    )
  2661.  
  2662.  pCVDrive   Pointer to VDrive object.
  2663.  nCylinder  Number of Cylinder.
  2664.  nHead      Number of Head.
  2665.  
  2666.  Formats track.
  2667.  
  2668.  Returns: FALSE if successfull.
  2669.  
  2670.  Example:
  2671.          VOID far *pDriveA ;
  2672.          BOOL bFormat ;
  2673.  
  2674.          bFormat = !VDriveFormatTrack ( pDriveA, nCylinder, nHead ) ;
  2675. >>VDriveReadSectors
  2676. ------------------ SABDU001.DLL API: VDriveReadSectors ---------------
  2677.  
  2678.  UINT FAR PASCAL VDriveReadSectors (
  2679.                                     VOID far *pCVDrive,
  2680.                                     UINT nCylinder,
  2681.                                     UINT nHead,
  2682.                                     UINT nSector,
  2683.                                     UINT nCount,
  2684.                                     LPBYTE lpcBuffer
  2685.                                    )
  2686.  
  2687.  pCVDrive   Pointer to VDrive object.
  2688.  nCylinder  Number of Cylinder.
  2689.  nHead      Number of Head.
  2690.  nSector    Number of Starting Sector.
  2691.  nCount     Number of sectors to be read.
  2692.  lpcBuffer  Pointer to buffer to be read into.
  2693.  
  2694.  Reads sectors.
  2695.  
  2696.  Returns: FALSE if successfull.
  2697.  
  2698.  Example:
  2699.          VOID far *pDriveA ;
  2700.          BOOL bRead ;
  2701.  
  2702.          bRead = !VDriveReadSectors ( pDriveA, nCylinder, nHead,
  2703.                                       nSector, nCount, LPBYTE lpcBuffer ) ;
  2704. >>VDriveWriteSectors
  2705. ------------------ SABDU001.DLL API: VDriveWriteSectors --------------
  2706.  
  2707.  UINT FAR PASCAL VDriveWriteSectors (
  2708.                                      VOID far *pCVDrive,
  2709.                                      UINT nCylinder,
  2710.                                      UINT nHead,
  2711.                                     UINT nSector,
  2712.                                     UINT nCount,
  2713.                                     LPBYTE lpcBuffer
  2714.                                     )
  2715.  
  2716.  pCVDrive   Pointer to VDrive object.
  2717.  nCylinder  Number of Cylinder.
  2718.  nHead      Number of Head.
  2719.  nSector    Number of Starting Sector.
  2720.  nCount     Number of sectors to be written.
  2721.  lpcBuffer  Pointer to buffer to be written from.
  2722.  
  2723.  Writes sectors.
  2724.  
  2725.  Returns: FALSE if successfull.
  2726.  
  2727.  Example:
  2728.          VOID far *pDriveA ;
  2729.          BOOL bWrite ;
  2730.  
  2731.          bWrite = !VDriveWriteSectors ( pDriveA, nCylinder, nHead,
  2732.                               nSector, nCount, LPBYTE lpcBuffer ) ;
  2733.