Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:docs:fapi:dosqfsinfo [2021/08/21 06:47] – prokushev | en:docs:fapi:dosqfsinfo [2021/09/17 08:11] (current) – prokushev | ||
---|---|---|---|
Line 5: | Line 5: | ||
This call queries information from a file system device. | This call queries information from a file system device. | ||
- | ==Syntax== | + | ===== Syntax ===== |
- | | + | |
- | ==Parameters== | + | <code c> |
- | ;DriveNumber (USHORT) - input : Logical drive number (0 = default, 1 = A, and so on). | + | DosQFSInfo (DriveNumber, |
- | :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. | + | </ |
- | ;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. | + | |
- | :Level 2 Information | + | * FSInfoBufSize ([[USHORT]]) |
- | :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: |
- | ; | + | |
+ | *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 | + | |
- | * 15 | + | * 15 |
- | * 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 43: | Line 58: | ||
If there is no volume serial number on the disk/ | If there is no volume serial number on the disk/ | ||
- | ==Example Code== | + | ===== Example Code ===== |
- | ===C Binding=== | + | |
- | <PRE> | + | ==== C Binding ==== |
+ | |||
+ | <code c> | ||
typedef struct _FSALLOCATE { | typedef struct _FSALLOCATE { | ||
ULONG idFileSystem; | ULONG idFileSystem; | ||
Line 91: | Line 108: | ||
USHORT | USHORT | ||
- | </PRE> | + | </code> |
+ | |||
+ | ==== MASM Binding ==== | ||
- | ===MASM Binding=== | ||
<code asm> | <code asm> | ||
Line 112: | Line 130: | ||
PUSH | PUSH | ||
CALL | CALL | ||
+ | </ | ||
Returns WORD | Returns WORD | ||
- | + | ===== Note ===== | |
- | </ | + | |
- | + | ||
- | + | ||
- | ====== Note ====== | + | |
Text based on http:// | Text based on http:// |