Ignore:
Timestamp:
Jun 23, 2001, 11:12:49 AM (24 years ago)
Author:
umoeller
Message:

Tons of changes from the last weeks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/helpers/dosh.h

    r76 r81  
    6666     ********************************************************************/
    6767
    68     VOID XWPENTRY doshEnumDrives(PSZ pszBuffer,
    69                                  const char *pcszFileSystem,
    70                                  BOOL fSkipRemoveables);
    71     typedef VOID XWPENTRY DOSHENUMDRIVES(PSZ pszBuffer,
    72                                          const char *pcszFileSystem,
    73                                          BOOL fSkipRemoveables);
    74     typedef DOSHENUMDRIVES *PDOSHENUMDRIVES;
    75 
    76     CHAR doshQueryBootDrive(VOID);
    77 
    78     APIRET doshAssertDrive(ULONG ulLogicalDrive);
    79 
    80     APIRET doshSetLogicalMap(ULONG ulLogicalDrive);
    81 
    82     APIRET XWPENTRY doshQueryDiskSize(ULONG ulLogicalDrive, double *pdSize);
    83     typedef APIRET XWPENTRY DOSHQUERYDISKSIZE(ULONG ulLogicalDrive, double *pdSize);
    84     typedef DOSHQUERYDISKSIZE *PDOSHQUERYDISKSIZE;
    85 
    86     APIRET XWPENTRY doshQueryDiskFree(ULONG ulLogicalDrive, double *pdFree);
    87     typedef APIRET XWPENTRY DOSHQUERYDISKFREE(ULONG ulLogicalDrive, double *pdFree);
    88     typedef DOSHQUERYDISKFREE *PDOSHQUERYDISKFREE;
    89 
    90     APIRET XWPENTRY doshQueryDiskFSType(ULONG ulLogicalDrive, PSZ pszBuf, ULONG cbBuf);
    91     typedef APIRET XWPENTRY DOSHQUERYDISKFSTYPE(ULONG ulLogicalDrive, PSZ pszBuf, ULONG cbBuf);
    92     typedef DOSHQUERYDISKFSTYPE *PDOSHQUERYDISKFSTYPE;
    93 
    9468    APIRET doshIsFixedDisk(ULONG  ulLogicalDrive,
    9569                           PBOOL  pfFixed);
     
    10276        #define DEVATTR_GREATER16MB 0x0004      // physical device driver supports physical addresses > 16 MB
    10377
    104         #pragma pack(1)
     78        // #pragma pack(1)
    10579
    10680        /*
    107          *@@ DRIVEPARAMS:
     81         * DRIVEPARAMS:
    10882         *      structure used for doshQueryDiskParams.
     83         * removed this, we can directly use BIOSPARAMETERBLOCK
     84         * V0.9.13 (2001-06-14) [umoeller]
    10985         */
    11086
    111         typedef struct _DRIVEPARAMS
     87        /* typedef struct _DRIVEPARAMS
    11288        {
    11389            BIOSPARAMETERBLOCK bpb;
     
    11692                        // in the OS2 headers as follows:
    11793
    118                         /*
    11994                        typedef struct _BIOSPARAMETERBLOCK {
    120                           USHORT     usBytesPerSector;
     95                    0     USHORT     usBytesPerSector;
    12196                                        //  Number of bytes per sector.
    122                           BYTE       bSectorsPerCluster;
     97                    2     BYTE       bSectorsPerCluster;
    12398                                        //  Number of sectors per cluster.
    124                           USHORT     usReservedSectors;
     99                    3     USHORT     usReservedSectors;
    125100                                        //  Number of reserved sectors.
    126                           BYTE       cFATs;
     101                    5     BYTE       cFATs;
    127102                                        //  Number of FATs.
    128                           USHORT     cRootEntries;
     103                    6     USHORT     cRootEntries;
    129104                                        //  Number of root directory entries.
    130                           USHORT     cSectors;
     105                    8     USHORT     cSectors;
    131106                                        //  Number of sectors.
    132                           BYTE       bMedia;
     107                    10    BYTE       bMedia;
    133108                                        //  Media descriptor.
    134                           USHORT     usSectorsPerFAT;
     109                    11    USHORT     usSectorsPerFAT;
    135110                                        //  Number of secctors per FAT.
    136                           USHORT     usSectorsPerTrack;
     111                    13    USHORT     usSectorsPerTrack;
    137112                                        //  Number of sectors per track.
    138                           USHORT     cHeads;
     113                    15    USHORT     cHeads;
    139114                                        //  Number of heads.
    140                           ULONG      cHiddenSectors;
     115                    17    ULONG      cHiddenSectors;
    141116                                        //  Number of hidden sectors.
    142                           ULONG      cLargeSectors;
     117                    21    ULONG      cLargeSectors;
    143118                                        //  Number of large sectors.
    144                           BYTE       abReserved[6];
     119                    25    BYTE       abReserved[6];
    145120                                        //  Reserved.
    146                           USHORT     cCylinders;
     121                    31    USHORT     cCylinders;
    147122                                        //  Number of cylinders defined for the physical
    148123                                        // device.
    149                           BYTE       bDeviceType;
     124                    33    BYTE       bDeviceType;
    150125                                        //  Physical layout of the specified device.
    151                           USHORT     fsDeviceAttr;
     126                    34    USHORT     fsDeviceAttr;
    152127                                        //  A bit field that returns flag information
    153128                                        //  about the specified drive.
    154                         } BIOSPARAMETERBLOCK; */
     129                        } BIOSPARAMETERBLOCK;
     130
     131            // removed the following fields... these are already
     132            // in the extended BPB structure, as defined in the
     133            // Toolkit's BIOSPARAMETERBLOCK struct. Checked this,
     134            // the definition is the same for the Toolkit 3 and 4.5.
    155135
    156136            USHORT  usCylinders;
     
    167147                        // --  5:  Fixed disk
    168148                        // --  6:  Tape drive
    169                         // --  7:  Other (includes 1.44MB 3.5-inch diskette drive)
     149                        // --  7:  Other (includes 1.44MB 3.5-inch diskette drive
     150                        //         and CD-ROMs)
    170151                        // --  8:  R/W optical disk
    171152                        // --  9:  3.5-inch 4.0MB diskette drive (2.88MB formatted)
     
    173154                        // DEVATTR_* flags
    174155        } DRIVEPARAMS, *PDRIVEPARAMS;
    175         #pragma pack()
     156        #pragma pack() */
    176157
    177158        APIRET doshQueryDiskParams(ULONG ulLogicalDrive,
    178                                    PDRIVEPARAMS pdp);
     159                                   PBIOSPARAMETERBLOCK pdp);
    179160    #endif
     161
     162    VOID XWPENTRY doshEnumDrives(PSZ pszBuffer,
     163                                 const char *pcszFileSystem,
     164                                 BOOL fSkipRemoveables);
     165    typedef VOID XWPENTRY DOSHENUMDRIVES(PSZ pszBuffer,
     166                                         const char *pcszFileSystem,
     167                                         BOOL fSkipRemoveables);
     168    typedef DOSHENUMDRIVES *PDOSHENUMDRIVES;
     169
     170    CHAR doshQueryBootDrive(VOID);
     171
     172    #define ERROR_AUDIO_CD_ROM      10000
     173
     174    #define ASSERTFL_MIXEDMODECD    0x0001
     175
     176    APIRET doshAssertDrive(ULONG ulLogicalDrive,
     177                           ULONG fl);
     178
     179    APIRET doshSetLogicalMap(ULONG ulLogicalDrive);
     180
     181    APIRET XWPENTRY doshQueryDiskSize(ULONG ulLogicalDrive, double *pdSize);
     182    typedef APIRET XWPENTRY DOSHQUERYDISKSIZE(ULONG ulLogicalDrive, double *pdSize);
     183    typedef DOSHQUERYDISKSIZE *PDOSHQUERYDISKSIZE;
     184
     185    APIRET XWPENTRY doshQueryDiskFree(ULONG ulLogicalDrive, double *pdFree);
     186    typedef APIRET XWPENTRY DOSHQUERYDISKFREE(ULONG ulLogicalDrive, double *pdFree);
     187    typedef DOSHQUERYDISKFREE *PDOSHQUERYDISKFREE;
     188
     189    APIRET XWPENTRY doshQueryDiskFSType(ULONG ulLogicalDrive, PSZ pszBuf, ULONG cbBuf);
     190    typedef APIRET XWPENTRY DOSHQUERYDISKFSTYPE(ULONG ulLogicalDrive, PSZ pszBuf, ULONG cbBuf);
     191    typedef DOSHQUERYDISKFSTYPE *PDOSHQUERYDISKFSTYPE;
    180192
    181193    APIRET doshQueryDiskLabel(ULONG ulLogicalDrive,
     
    303315    APIRET doshSetPathAttr(const char* pcszFile,
    304316                           ULONG ulAttr);
     317
     318    APIRET doshOpenExisting(const char *pcszFilename,
     319                            ULONG ulOpenFlags,
     320                            HFILE *phf);
     321
     322    APIRET doshWriteAt(HFILE hf,
     323                       LONG lOffset,
     324                       ULONG ulMethod,
     325                       ULONG cb,
     326                       PBYTE pbData);
     327
     328    APIRET doshReadAt(HFILE hf,
     329                      LONG lOffset,
     330                      ULONG ulMethod,
     331                      ULONG cb,
     332                      PBYTE pbData);
    305333
    306334    APIRET doshLoadTextFile(const char *pcszFile,
Note: See TracChangeset for help on using the changeset viewer.