home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Graphics / Graphics.zip / os2apipm.zip / OS2API / OS2-DEV.ADS < prev    next >
Text File  |  1996-07-17  |  3KB  |  65 lines

  1.  
  2. -- ╔═══════════════════════════════════════════════════════════════════╗
  3. -- ║       D E S I G N   E N G I N E R I N G              ║D║S║        ║
  4. -- ║            S O F T W A R E                           ╚═╩═╝        ║
  5. -- ║                                                                   ║
  6. -- ║        Package     OS2.Dev                                        ║
  7. -- ║                                                                   ║
  8. -- ║        Author :  Leonid Dulman     1995                           ║
  9. -- ║                                                                   ║
  10. -- ║             GNU ADA RUNTIME LIBRARY (GNARL) COMPONENTS            ║
  11. -- ║                                                                   ║
  12. -- ║             IOCtl     support    of os/2 api functions            ║
  13. -- ║                                                                   ║
  14. -- ╚═══════════════════════════════════════════════════════════════════╝
  15.  
  16.  
  17. with Interfaces.C;         use Interfaces.C;
  18. with Interfaces.C.Strings; use Interfaces.C.Strings;
  19.  
  20. package Os2.Dev  is
  21. pragma Preelaborate (Dev);
  22.  
  23. -- Device support --
  24. subtype HFILE  is  LHANDLE ;     -- hf --
  25.  
  26. --   #define DosDevIOCtl2    DosDevIOCtl
  27.  
  28. function  DosDevConfig(pdevinfo:PVOID ;
  29.                        item    :ULONG ) return apiret;
  30. pragma Import(c,DosDevConfig, Link_name=>"_DosDevConfig");
  31.  
  32.  
  33.  DEVINFO_PRINTER      : constant ushort:=   0 ;  -- Number of printers attached
  34.  DEVINFO_RS232        : constant ushort:=   1 ;  -- Number of RS232 ports
  35.  DEVINFO_FLOPPY       : constant ushort:=   2 ;  -- Number of diskette drives
  36.  DEVINFO_COPROCESSOR  : constant ushort:=   3 ;  -- Presence of math coprocessor
  37.  DEVINFO_SUBMODEL     : constant ushort:=   4 ;  -- PC Submodel Type
  38.  DEVINFO_MODEL        : constant ushort:=   5 ;  -- PC Model Type
  39.  DEVINFO_ADAPTER      : constant ushort:=   6 ;  -- Primary display adapter type
  40.  
  41. function  DosDevIOCtl(hDevice     :HFILE  ;
  42.                       category    :ULONG  ;
  43.                       func        :ULONG  ;
  44.                       pParams     :PVOID  ;
  45.                       cbParmLenMax:ULONG  ;
  46.                       pcbParmLen  :PULONG ;
  47.                       pData       :PVOID  ;
  48.                       cbDataLenMax:ULONG  ;
  49.                       pcbDataLen  :PULONG ) return apiret;
  50. pragma Import(c,DosDevIOCtl, Link_name=>"_DosDevIOCtl");
  51.  
  52.  
  53. function  DosPhysicalDisk(func    :ULONG ;
  54.                           pBuf    :PVOID ;
  55.                           cbBuf   :ULONG ;
  56.                           pParams :PVOID ;
  57.                           cbParams:ULONG ) return apiret;
  58. pragma Import(c,DosPhysicalDisk, Link_name=>"_DosPhysicalDisk");
  59.  
  60.  
  61.  INFO_COUNT_PARTITIONABLE_DISKS  : constant ushort:=   1 ;  -- # of partitionable disks
  62.  INFO_GETIOCTLHANDLE             : constant ushort:=   2 ;  -- Obtain handle
  63.  INFO_FREEIOCTLHANDLE            : constant ushort:=   3 ;  -- Release handle
  64. end Os2.Dev;
  65.