no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
Next revision | |||
— | en:docs:fapi:dosqfsinfo [2018/08/29 11:58] – created prokushev | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | |||
+ | This call queries information from a file system device. | ||
+ | |||
+ | ==Syntax== | ||
+ | | ||
+ | |||
+ | ==Parameters== | ||
+ | ; | ||
+ | :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. | ||
+ | ; | ||
+ | ;FSInfoBuf (PBYTE) - output : Address of the storage area where the system returns the requested level of file information. | ||
+ | :Level 1 Information | ||
+ | :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 | ||
+ | :: | ||
+ | :: | ||
+ | ; | ||
+ | |||
+ | ==Return Code== | ||
+ | rc (USHORT) - return | ||
+ | Return code descriptions are: | ||
+ | * 0 NO_ERROR | ||
+ | * 15 | ||
+ | * 111 ERROR_BUFFER_OVERFLOW | ||
+ | * 124 ERROR_INVALID_LEVEL | ||
+ | * 125 ERROR_NO_VOLUME_LABEL | ||
+ | |||
+ | ==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. | ||
+ | |||
+ | Volume Serial Number is a unique 32-bit number used by OS/2 to positively identify its disk/ | ||
+ | |||
+ | If there is no volume serial number on the disk/ | ||
+ | |||
+ | ==Example Code== | ||
+ | ===C Binding=== | ||
+ | <PRE> | ||
+ | typedef struct _FSALLOCATE { | ||
+ | ULONG idFileSystem; | ||
+ | ULONG cSectorUnit; | ||
+ | ULONG cUnit; | ||
+ | ULONG cUnitAvail; | ||
+ | USHORT cbSector; | ||
+ | } FSALLOCATE; | ||
+ | |||
+ | typedef struct _FDATE { /* fdate */ | ||
+ | |||
+ | unsigned day : 5; /* binary day for directory entry */ | ||
+ | unsigned month : 4; /* binary month for directory entry */ | ||
+ | unsigned year : 7; /* binary year for directory entry */ | ||
+ | |||
+ | } FDATE; | ||
+ | |||
+ | typedef struct _FTIME { /* ftime */ | ||
+ | |||
+ | unsigned twosecs : 5; /* binary number of two-second increments */ | ||
+ | unsigned minutes : 6; /* binary number of minutes */ | ||
+ | unsigned hours : 5; /* binary number of hours */ | ||
+ | |||
+ | } FTIME; | ||
+ | |||
+ | typedef struct _FSINFO { /* fsinf */ | ||
+ | FDATE fdateCreation; | ||
+ | FTIME ftimeCreation; | ||
+ | VOLUMELABEL vol; | ||
+ | } FSINFO; | ||
+ | |||
+ | typedef struct _VOLUMELABEL { /* vol */ | ||
+ | BYTE cch; | ||
+ | CHAR szVolLabel[12]; | ||
+ | } VOLUMELABEL; | ||
+ | |||
+ | #define INCL_DOSFILEMGR | ||
+ | |||
+ | USHORT | ||
+ | |||
+ | USHORT | ||
+ | USHORT | ||
+ | PBYTE FSInfoBuf; | ||
+ | USHORT | ||
+ | |||
+ | USHORT | ||
+ | </ | ||
+ | |||
+ | ===MASM Binding=== | ||
+ | <PRE> | ||
+ | FSALLOCATE struc | ||
+ | fsalloc_idFileSystem | ||
+ | fsalloc_cSectorUnit | ||
+ | fsalloc_cUnit | ||
+ | fsalloc_cUnitAvail | ||
+ | fsalloc_cbSector | ||
+ | FSALLOCATE ends | ||
+ | |||
+ | EXTRN DosQFSInfo: | ||
+ | INCL_DOSFILEMGR | ||
+ | |||
+ | PUSH | ||
+ | PUSH | ||
+ | PUSH@ OTHER | ||
+ | PUSH | ||
+ | CALL | ||
+ | |||
+ | Returns WORD | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | ====== Note ====== | ||
+ | |||
+ | Text based on http:// | ||
+ | |||
+ | {{page> | ||
+ | |||
+ | |||