home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / c / library / bcfamily / source / qhantype.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-12  |  683 b   |  25 lines

  1. //
  2. //      *******************************************************************
  3. //        JdeBP C++ Library Routines          General Public Licence v1.00
  4. //            Copyright (c) 1991,1992     Jonathan de Boyne Pollard
  5. //      *******************************************************************
  6. //
  7. // Part of FamAPI.LIB
  8. //
  9.  
  10. #include "famapi.h"
  11. #include "dosdos.h"
  12.  
  13. //
  14. //    Query handle's type
  15. //
  16. USHORT _APICALL
  17. DosQHandType    ( unsigned short FileHandle,
  18.                   unsigned short far * PtrHandType,
  19.                   unsigned short far * PtrDeviceAttr )
  20. {
  21.     USHORT err = DosDosDevIOCtl    (FileHandle, 0, NULL, 0, PtrDeviceAttr) ;
  22.     if (!err) *PtrHandType = (*PtrDeviceAttr & 0x0080) ? 1 : 0 ;
  23.     return err ;
  24. }
  25.