en:docs:fapi:dosqhandtype

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en:docs:fapi:dosqhandtype [2021/08/21 06:53] – created prokusheven:docs:fapi:dosqhandtype [2021/09/19 05:38] (current) prokushev
Line 1: Line 1:
 {{page>en:templates:fapiint}} {{page>en:templates:fapiint}}
 +====== 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 ===== 
- DosQHandType (FileHandle, HandType, FlagWord)+<code c> 
 +DosQHandType (FileHandle, HandType, FlagWord) 
 +</code>
  
-==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's attribute word if HandleType indicates a local character device.+
  
-==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's attribute word if HandleType indicates a local character device. 
 + 
 +===== Return Code ===== 
 + 
 +rc ([[USHORT]]) - return 
 + 
 +Return code descriptions are: 
 + 
 +  * 0 NO_ERROR 
 +  * 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  rc;            /* return code */ USHORT  rc;            /* return code */
-</PRE>+</code>
  
-===MASM=== +====MASM==== 
-<PRE>+<code asm>
 EXTRN  DosQHandType:FAR EXTRN  DosQHandType:FAR
 INCL_DOSFILEMGR     EQU 1 INCL_DOSFILEMGR     EQU 1
Line 53: Line 65:
  
 Returns WORD Returns WORD
-</PRE>+</code>
  
 {{page>en:templates:fapi}} {{page>en:templates:fapi}}