DosSetFSInfo (OS/2 1.x): Difference between revisions
Appearance
m Ak120 moved page OS2 API:CPI:LEGACY:DosSetFSInfo to DosSetFSInfo (OS/2 1.x) |
mNo edit summary |
||
Line 1: | Line 1: | ||
This call sets information for a file system device. | This call sets information for a file system device. | ||
==Syntax== | ==Syntax== | ||
DosSetFSInfo (DriveNumber, FSInfoLevel, FSInfoBuf, FSInfoBufSize) | |||
DosSetFSInfo | |||
==Parameters== | ==Parameters== | ||
; DriveNumber (USHORT) - input : Logical drive number, for example, 0 = default and 1 = A, and the FSD for the media currently in that drive. A value of '0xFFFF' notes that FSInfoBuf contains the ASCIIZ path name of the FSD. | ;DriveNumber (USHORT) - input : Logical drive number, for example, 0 = default and 1 = A, and the FSD for the media currently in that drive. A value of '0xFFFF' notes that FSInfoBuf contains the ASCIIZ path name of the FSD. | ||
; FSInfoLevel (USHORT) - input : Level of file information to be set. A value of 2 is the only valid value for FSInfoLevel. | |||
; FSInfoLevel (USHORT) - input : Level of file information to be set. A value of 2 is the only valid value for FSInfoLevel. | |||
; FSInfoBuf (PBYTE) - input : Address of the storage area where the system gets the new file system information. | ; FSInfoBuf (PBYTE) - input : Address of the storage area where the system gets the new file system information. | ||
'''Level 2 Information''' | '''Level 2 Information''' | ||
Line 26: | Line 19: | ||
==Return Code== | ==Return Code== | ||
rc (USHORT) - return | 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 | ||
Line 73: | Line 63: | ||
Returns WORD | Returns WORD | ||
</PRE> | </PRE> | ||
[[Category: | [[Category:Dos]] |
Revision as of 13:56, 1 March 2017
This call sets information for a file system device.
Syntax
DosSetFSInfo (DriveNumber, FSInfoLevel, FSInfoBuf, FSInfoBufSize)
Parameters
- DriveNumber (USHORT) - input
- Logical drive number, for example, 0 = default and 1 = A, and the FSD for the media currently in that drive. A value of '0xFFFF' notes that FSInfoBuf contains the ASCIIZ path name of the FSD.
- FSInfoLevel (USHORT) - input
- Level of file information to be set. A value of 2 is the only valid value for FSInfoLevel.
- FSInfoBuf (PBYTE) - input
- Address of the storage area where the system gets the new file system information.
Level 2 Information Level 2 information is specified in the following format:
Byte Description 1 Length of Volume Label (null not included) 2-N Volume Label ASCIIZ string.
- FSInfoBufSize (USHORT) - input
- Length of FSInfoBuf.
Return Code
rc (USHORT) - return
Return code descriptions are:
- 0 NO_ERROR
- 15 ERROR_INVALID_DRIVE
- 82 ERROR_CANNOT_MAKE
- 122 ERROR_INSUFFICIENT_BUFFER
- 123 ERROR_INVALID_NAME
- 124 ERROR_INVALID_LEVEL
- 154 ERROR_LABEL_TOO_LONG
Remarks
Trailing blanks supplied at volume label definition time are not returned by DosQFSInfo.
File system information can be set only if the volume is opened in a mode that allows write-access.
Example Code
C Binding
#define INCL_DOSFILEMGR USHORT rc = DosSetFSInfo(DriveNumber, FSInfoLevel, FSInfoBuf, FSInfoBufSize); USHORT DriveNumber; /* Drive number */ USHORT FSInfoLevel; /* File system data type */ PBYTE FSInfoBuf; /* File system info buffer */ USHORT FSInfoBufSize; /* File system info buffer size */ USHORT rc; /* return code */
MASM Binding
EXTRN DosSetFSInfo:FAR INCL_DOSFILEMGR EQU 1 PUSH WORD DriveNumber ;Drive number PUSH WORD FSInfoLevel ;File system data type PUSH@ OTHER FSInfoBuf ;File system info buffer PUSH WORD FSInfoBufSize ;File system info buffer size CALL DosSetFSInfo Returns WORD