Differences
This shows you the differences between two versions of the page.
en:docs:fapi:dosqhandtype [2021/08/21 06:53] – created prokushev | en:docs:fapi:dosqhandtype [2021/09/19 05:38] (current) – prokushev | ||
---|---|---|---|
Line 1: | Line 1: | ||
{{page> | {{page> | ||
+ | ====== DosQHandType ====== | ||
+ | |||
This call determines whether a handle references a file or a device. | This call determines whether a handle references a file or a device. | ||
- | ==Syntax== | + | ===== Syntax ===== |
- | | + | <code c> |
+ | DosQHandType (FileHandle, | ||
+ | </ | ||
- | ==Parameters== | + | ===== Parameters ===== |
- | ;FileHandle (HFILE) - input : File handle. | + | |
- | ;HandType (PUSHORT) - output : Address of the value indicating the handle type. HandType is composed of two bytes: | + | |
- | :15 - Network bit: | + | |
- | ::0 = The handle refers to a local file, device, or pipe. | + | |
- | ::1 = Means that the handle refers to a remote file, device, or pipe. | + | |
- | :14-8 - Reserved. | + | |
- | :7-0 - HandleClass describes the handle class. It may take on the following values in the low byte of HandleType: | + | |
- | ::0 - Handle is for a disk file | + | |
- | ::1 - Handle is for a character device | + | |
- | ::2 - Handle is for a pipe. | + | |
- | ::Values greater than 2 are reserved. | + | |
- | ;FlagWord (PUSHORT) - output : Address of the device driver' | + | |
- | ==Return Code== | + | * FileHandle ([[HFILE]]) - input : File handle. |
- | ;rc (USHORT) - return:Return code descriptions are: | + | * HandType ([[PUSHORT]]) - output : Address of the value indicating the handle type. HandType is composed of two bytes: |
- | * 0 NO_ERROR | + | *15 - Network bit: |
- | * 6 ERROR_INVALID_HANDLE | + | *0 = The handle refers to a local file, device, or pipe. |
+ | *1 = Means that the handle refers to a remote file, device, or pipe. | ||
+ | *14-8 - Reserved. | ||
+ | *7-0 - HandleClass describes the handle class. It may take on the following values in the low byte of HandleType: | ||
+ | *0 - Handle is for a disk file | ||
+ | *1 - Handle is for a character device | ||
+ | *2 - Handle is for a pipe. | ||
+ | |||
+ | Values greater than 2 are reserved. | ||
+ | |||
+ | * FlagWord ([[PUSHORT]]) - output : Address of the device driver' | ||
+ | |||
+ | ===== Return Code ===== | ||
+ | |||
+ | rc ([[USHORT]]) - return | ||
+ | |||
+ | Return code descriptions are: | ||
+ | |||
+ | | ||
+ | * 6 ERROR_INVALID_HANDLE | ||
+ | |||
+ | ===== Remarks ===== | ||
- | ==Remarks== | ||
This function allows programs that are interactive or file-oriented to determine the source of their input. For example, CMD.EXE suppresses writing prompts if the input is from a disk file. | This function allows programs that are interactive or file-oriented to determine the source of their input. For example, CMD.EXE suppresses writing prompts if the input is from a disk file. | ||
- | ==Bindings== | + | ===== Bindings |
- | ===C=== | + | |
- | <PRE> | + | ====C==== |
+ | <code c> | ||
#define INCL_DOSFILEMGR | #define INCL_DOSFILEMGR | ||
Line 40: | Line 52: | ||
USHORT | USHORT | ||
- | </PRE> | + | </code> |
- | ===MASM=== | + | ====MASM==== |
- | <PRE> | + | <code asm> |
EXTRN DosQHandType: | EXTRN DosQHandType: | ||
INCL_DOSFILEMGR | INCL_DOSFILEMGR | ||
Line 53: | Line 65: | ||
Returns WORD | Returns WORD | ||
- | </PRE> | + | </code> |
{{page> | {{page> | ||