en:docs:fapi:dosqfsinfo

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en:docs:fapi:dosqfsinfo [2018/08/29 11:58] – created prokusheven:docs:fapi:dosqfsinfo [2021/09/17 08:11] (current) prokushev
Line 1: Line 1:
 +{{page>en:templates:fapiint}}
 +
 +====== DosQFSInfo ======
  
 This call queries information from a file system device. This call queries information from a file system device.
  
-==Syntax== +===== Syntax =====
- DosQFSInfo (DriveNumber, FSInfoLevel, FSInfoBuf, FSInfoBufSize)+
  
-==Parameters== +<code c> 
-;DriveNumber (USHORT) - input : Logical drive number (0 = default, 1 = A, and so on). +DosQFSInfo (DriveNumber, FSInfoLevel, FSInfoBuf, FSInfoBufSize) 
-:When a logical drive is specified, the media in the drive is examined (local drive only) and the request is passed to the FSD responsible for managing that media or to the FSD that is attached to the drive. +</code> 
-;FSInfoLevel (USHORT) - input : Level of file information required. + 
-;FSInfoBuf (PBYTE) - output : Address of the storage area where the system returns the requested level of file information. +===== Parameters ===== 
-:Level 1 Information + 
-:For FSInfoLevel = 1, information is returned in the following structure: +  * DriveNumber ([[USHORT]]) - input : Logical drive number (0 = default, 1 = A, and so on). 
-::filesysid (ULONG) - File system ID. + 
-::sectornum (ULONG) - Number of sectors per allocation unit. +When a logical drive is specified, the media in the drive is examined (local drive only) and the request is passed to the FSD responsible for managing that media or to the FSD that is attached to the drive. 
-::unitnum (ULONG) -  Number of allocation units. + 
-::unitavail (ULONG) - Number of allocation units available. +  * FSInfoLevel ([[USHORT]]) - input : Level of file information required. 
-::bytesnum (USHORT) - Number of bytes per sector. +  FSInfoBuf ([[PBYTE]]) - output : Address of the storage area where the system returns the requested level of file information. 
-:Level 2 Information +  * FSInfoBufSize ([[USHORT]]) Length of the buffer. 
-:For FSInfoLevel = 2, the information is returned in the following format: + 
-::reserved (ULONG) - Reserved +==== Level 1 Information ==== 
-::volumelength (BYTE) - Length of the volume label, not including the null. + 
-::volumelabel (CHAR) - Volume label ASCIIZ string.  +For FSInfoLevel = 1, information is returned in the following structure: 
-;FSInfoBufSize (USHORT) : Length of the buffer.+ 
 +  *filesysid ([[ULONG]]) - File system ID. 
 +  *sectornum ([[ULONG]]) - Number of sectors per allocation unit. 
 +  *unitnum ([[ULONG]]) -  Number of allocation units. 
 +  *unitavail ([[ULONG]]) - Number of allocation units available. 
 +  *bytesnum ([[USHORT]]) - Number of bytes per sector. 
 + 
 +==== Level 2 Information ==== 
 + 
 +For FSInfoLevel = 2, the information is returned in the following format: 
 + 
 +  *reserved ([[ULONG]]) - Reserved 
 +  *volumelength ([[BYTE]]) - Length of the volume label, not including the null. 
 +  *volumelabel ([[CHAR]]) - Volume label ASCIIZ string.  
 + 
 +===== Return Code ===== 
 + 
 +rc ([[USHORT]]- return
  
-==Return Code== 
- rc (USHORT) - return 
 Return code descriptions are: Return code descriptions are:
-* 0          NO_ERROR  +  * 0          NO_ERROR  
-* 15         ERROR_INVALID_DRIVE  +  * 15         ERROR_INVALID_DRIVE  
-* 111        ERROR_BUFFER_OVERFLOW  +  * 111        ERROR_BUFFER_OVERFLOW  
-* 124        ERROR_INVALID_LEVEL  +  * 124        ERROR_INVALID_LEVEL  
-* 125        ERROR_NO_VOLUME_LABEL+  * 125        ERROR_NO_VOLUME_LABEL 
 + 
 +===== Remarks =====
  
-==Remarks== 
 Trailing blanks supplied at volume label definition time are not considered to be part of the label and are therefore not returned as valid label data. Volume label is limited to a length of 11 bytes. Trailing blanks supplied at volume label definition time are not considered to be part of the label and are therefore not returned as valid label data. Volume label is limited to a length of 11 bytes.
  
Line 40: Line 58:
 If there is no volume serial number on the disk/diskette, the volume serial number information is returned as binary zeros. If there is no volume label on the disk/diskette, the volume label information is returned as blank spaces. If there is no volume serial number and/or volume label for disk/diskette volumes formatted by DOS 3.X, this information is not displayed by the Hard Error Handler. If there is no volume serial number on the disk/diskette, the volume serial number information is returned as binary zeros. If there is no volume label on the disk/diskette, the volume label information is returned as blank spaces. If there is no volume serial number and/or volume label for disk/diskette volumes formatted by DOS 3.X, this information is not displayed by the Hard Error Handler.
  
-==Example Code== +===== Example Code ===== 
-===C Binding=== + 
-<PRE>+==== C Binding ===
 + 
 +<code c>
 typedef struct _FSALLOCATE { typedef struct _FSALLOCATE {
     ULONG  idFileSystem;  /* file system ID */     ULONG  idFileSystem;  /* file system ID */
Line 88: Line 108:
  
 USHORT           rc;            /* return code */ USHORT           rc;            /* return code */
-</PRE>+</code> 
 + 
 +==== MASM Binding ==== 
 + 
 +<code asm>
  
-===MASM Binding=== 
-<PRE> 
 FSALLOCATE struc FSALLOCATE struc
     fsalloc_idFileSystem        dd  ?     fsalloc_idFileSystem        dd  ?
Line 108: Line 130:
 PUSH   WORD    FSInfoBufSize ;File system info buffer size PUSH   WORD    FSInfoBufSize ;File system info buffer size
 CALL   DosQFSInfo CALL   DosQFSInfo
 +</code>
  
 Returns WORD Returns WORD
  
- +===== Note =====
-</PRE> +
- +
- +
-====== Note ======+
  
 Text based on http://www.edm2.com/index.php/DosQFSInfo Text based on http://www.edm2.com/index.php/DosQFSInfo