Changeset 81 for trunk/include/helpers/dosh.h
- Timestamp:
- Jun 23, 2001, 11:12:49 AM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/helpers/dosh.h
r76 r81 66 66 ********************************************************************/ 67 67 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 94 68 APIRET doshIsFixedDisk(ULONG ulLogicalDrive, 95 69 PBOOL pfFixed); … … 102 76 #define DEVATTR_GREATER16MB 0x0004 // physical device driver supports physical addresses > 16 MB 103 77 104 #pragma pack(1)78 // #pragma pack(1) 105 79 106 80 /* 107 * @@DRIVEPARAMS:81 * DRIVEPARAMS: 108 82 * structure used for doshQueryDiskParams. 83 * removed this, we can directly use BIOSPARAMETERBLOCK 84 * V0.9.13 (2001-06-14) [umoeller] 109 85 */ 110 86 111 typedef struct _DRIVEPARAMS87 /* typedef struct _DRIVEPARAMS 112 88 { 113 89 BIOSPARAMETERBLOCK bpb; … … 116 92 // in the OS2 headers as follows: 117 93 118 /*119 94 typedef struct _BIOSPARAMETERBLOCK { 120 95 0 USHORT usBytesPerSector; 121 96 // Number of bytes per sector. 122 97 2 BYTE bSectorsPerCluster; 123 98 // Number of sectors per cluster. 124 99 3 USHORT usReservedSectors; 125 100 // Number of reserved sectors. 126 101 5 BYTE cFATs; 127 102 // Number of FATs. 128 103 6 USHORT cRootEntries; 129 104 // Number of root directory entries. 130 105 8 USHORT cSectors; 131 106 // Number of sectors. 132 107 10 BYTE bMedia; 133 108 // Media descriptor. 134 109 11 USHORT usSectorsPerFAT; 135 110 // Number of secctors per FAT. 136 111 13 USHORT usSectorsPerTrack; 137 112 // Number of sectors per track. 138 113 15 USHORT cHeads; 139 114 // Number of heads. 140 115 17 ULONG cHiddenSectors; 141 116 // Number of hidden sectors. 142 117 21 ULONG cLargeSectors; 143 118 // Number of large sectors. 144 119 25 BYTE abReserved[6]; 145 120 // Reserved. 146 121 31 USHORT cCylinders; 147 122 // Number of cylinders defined for the physical 148 123 // device. 149 124 33 BYTE bDeviceType; 150 125 // Physical layout of the specified device. 151 126 34 USHORT fsDeviceAttr; 152 127 // A bit field that returns flag information 153 128 // 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. 155 135 156 136 USHORT usCylinders; … … 167 147 // -- 5: Fixed disk 168 148 // -- 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) 170 151 // -- 8: R/W optical disk 171 152 // -- 9: 3.5-inch 4.0MB diskette drive (2.88MB formatted) … … 173 154 // DEVATTR_* flags 174 155 } DRIVEPARAMS, *PDRIVEPARAMS; 175 #pragma pack() 156 #pragma pack() */ 176 157 177 158 APIRET doshQueryDiskParams(ULONG ulLogicalDrive, 178 P DRIVEPARAMSpdp);159 PBIOSPARAMETERBLOCK pdp); 179 160 #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; 180 192 181 193 APIRET doshQueryDiskLabel(ULONG ulLogicalDrive, … … 303 315 APIRET doshSetPathAttr(const char* pcszFile, 304 316 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); 305 333 306 334 APIRET doshLoadTextFile(const char *pcszFile,
Note:
See TracChangeset
for help on using the changeset viewer.