Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
en:docs:fapi:dosqfsattach [2021/11/04 13:57] – prokushev | en:docs:fapi:dosqfsattach [2021/11/04 14:19] (current) – prokushev | ||
---|---|---|---|
Line 1: | Line 1: | ||
{{page> | {{page> | ||
+ | |||
+ | ====== DosQFSAttach ====== | ||
Query information about an attached file system (local or remote), or about a character device or pseudo-character device attached to the file system. | Query information about an attached file system (local or remote), or about a character device or pseudo-character device attached to the file system. | ||
- | ==Syntax== | + | ===== Syntax ===== |
+ | <code c> | ||
| | ||
+ | </ | ||
- | ==Parameters== | + | ===== Parameters ===== |
- | ;DeviceName (PSZ) - input : Address of a drive letter or the name of a character or pseudo-character device. If DeviceName is a drive, it is an ASCIIZ string having the form of drive letter followed by a colon. If DeviceName is a character or pseudo-character device name, its format is that of an ASCIIZ string in the format of an OS/2 file name in a subdirectory called \DEV\. This parameter is ignored if level 2 or 3 is specified for FSAInfoLevel. | + | |
- | ;Ordinal (USHORT) - output : Index into the list of character or pseudo-character devices, or the set of drives. Ordinal always starts at 1. The Ordinal position of an item in a list has no significance at all. Ordinal is used strictly to step through the list. The mapping from Ordinal to item is volatile and may change from one call to DosQFSAttach to the next. This parameter is ignored if level 1 is specified for FSAInfoLevel. | + | |
- | ; | + | |
- | ::Level 0001H returns data for the specific drive or device name referred to by DeviceName. The Ordinal field is ignored. | + | |
- | ::Level 0002H returns data for the entry in the list of character or pseudo-character devices selected by Ordinal. The DeviceName field is ignored. | + | |
- | ::Level 0003H returns data for the entry in the list of drives selected by Ordinal. The DeviceName field is ignored. | + | |
- | ;DataBuffer (PBYTE) - output : Address of the return information buffer, has the following format: | + | |
- | ::iType (USHORT) Type of item. | + | |
- | :::1 - Resident character device | + | |
- | :::2 - Pseudo-character device | + | |
- | :::3 - Local drive | + | |
- | :::4 - Remote drive attached to FSD. | + | |
- | ::cbName (USHORT) : Length of item name, not counting null. | + | |
- | ::szName (UCHAR) : Item name, ASCIIZ string. | + | |
- | ::cbFSDName (USHORT) : Length of FSD name, not counting null. | + | |
- | ::szFSDName (UCHAR) : Name of FSD item is attached to, ASCIIZ string. | + | |
- | ::cbFSAData (USHORT) : Length of FSD Attach data returned by FSD. | + | |
- | ::rgFSAData (UCHAR) : FSD Attach data returned by FSD. | + | |
- | :Note: The szFSDName is the FSD name exported by the FSD, which is not necessarily the same as the FSD name in the boot sector. | + | |
- | :For local character devices (iType | + | |
- | :For local drives (iType | + | |
- | ; | + | |
- | ;Reserved (ULONG) - input : Reserved, must be set to zero. | + | |
- | ==Return Code== | + | * DeviceName (PSZ) - input : Address of a drive letter or the name of a character or pseudo-character device. If DeviceName is a drive, it is an ASCIIZ string having the form of drive letter followed by a colon. If DeviceName is a character or pseudo-character device name, its format is that of an ASCIIZ string in the format of an OS/2 file name in a subdirectory called \DEV\. This parameter is ignored if level 2 or 3 is specified for FSAInfoLevel. |
- | ;rc (USHORT) - return: | + | * Ordinal (USHORT) - output : Index into the list of character or pseudo-character devices, or the set of drives. Ordinal always starts at 1. The Ordinal position of an item in a list has no significance at all. Ordinal is used strictly to step through the list. The mapping from Ordinal to item is volatile and may change from one call to DosQFSAttach to the next. This parameter is ignored if level 1 is specified for FSAInfoLevel. |
- | * 0 NO_ERROR | + | * FSAInfoLevel (USHORT) - input : Level of information returned in DataBuffer: |
- | * 15 ERROR_INVALID_DRIVE | + | * Level 0001H returns data for the specific drive or device name referred to by DeviceName. The Ordinal field is ignored. |
- | *111 ERROR_BUFFER_OVERFLOW | + | * Level 0002H returns data for the entry in the list of character or pseudo-character devices selected by Ordinal. The DeviceName field is ignored. |
- | *124 ERROR_INVALID_LEVEL | + | * Level 0003H returns data for the entry in the list of drives selected by Ordinal. The DeviceName field is ignored. |
- | *259 ERROR_NO_MORE_ITEMS | + | * DataBuffer (PBYTE) - output : Address of the return information buffer, has the following format: |
+ | * iType (USHORT) Type of item. | ||
+ | * 1 - Resident character device | ||
+ | * 2 - Pseudo-character device | ||
+ | * 3 - Local drive | ||
+ | * 4 - Remote drive attached to FSD. | ||
+ | * cbName (USHORT) : Length of item name, not counting null. | ||
+ | * szName (UCHAR) : Item name, ASCIIZ string. | ||
+ | * cbFSDName (USHORT) : Length of FSD name, not counting null. | ||
+ | * szFSDName (UCHAR) : Name of FSD item is attached to, ASCIIZ string. | ||
+ | * cbFSAData (USHORT) : Length of FSD Attach data returned by FSD. | ||
+ | * rgFSAData (UCHAR) : FSD Attach data returned by FSD. | ||
+ | |||
+ | Note: The szFSDName is the FSD name exported by the FSD, which is not necessarily the same as the FSD name in the boot sector. | ||
+ | |||
+ | For local character devices (iType = 1), cbFSDName = 0 and szFSDName contains only a terminating NULL byte, and cbFSAData = 0. | ||
+ | |||
+ | For local drives (iType = 3), szFSDName contains the name of the FSD attached to the drive at the time of the call. This information changes dynamically. If the drive is attached to the kernel' | ||
+ | * DataBufferLen (PUSHORT) - input/ | ||
+ | * Reserved (ULONG) - input : Reserved, must be set to zero. | ||
+ | |||
+ | ===== Return Code ===== | ||
+ | |||
+ | rc (USHORT) - return: | ||
+ | |||
+ | | ||
+ | * 15 ERROR_INVALID_DRIVE | ||
+ | *111 ERROR_BUFFER_OVERFLOW | ||
+ | *124 ERROR_INVALID_LEVEL | ||
+ | *259 ERROR_NO_MORE_ITEMS | ||
+ | |||
+ | ===== Remarks ===== | ||
- | ==Remarks== | ||
Information about all block devices and all character and pseudo-character devices is returned by this call. | Information about all block devices and all character and pseudo-character devices is returned by this call. | ||
Line 46: | Line 57: | ||
The information returned for disks that are attached to the kernel' | The information returned for disks that are attached to the kernel' | ||
- | ==Bindings== | + | ===== Bindings |
- | === C=== | + | |
- | <PRE> | + | ==== C==== |
+ | <code c> | ||
#define INCL_DOSFILEMGR | #define INCL_DOSFILEMGR | ||
Line 62: | Line 74: | ||
USHORT | USHORT | ||
- | </PRE> | + | </code> |
- | ===MASM=== | + | ====MASM==== |
- | <PRE> | + | <code asm> |
EXTRN DosQFSAttach: | EXTRN DosQFSAttach: | ||
INCL_DOSFILEMGR | INCL_DOSFILEMGR | ||
Line 78: | Line 90: | ||
Returns WORD | Returns WORD | ||
- | </PRE> | + | </code> |
{{page> | {{page> | ||