home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 12 / CD_ASCQ_12_0294.iso / vrac / pclcjs.zip / DEVICE.C < prev    next >
C/C++ Source or Header  |  1993-05-12  |  635b  |  50 lines

  1.  
  2.  
  3. #include <dos.h>
  4. #include "cjslib.h"
  5.  
  6.  
  7.  
  8.  
  9. int get_dtype(int drive)
  10.  
  11. {
  12.     union REGS inregs, outregs;
  13.     
  14.     DEVPARAMS dev_data;
  15.     
  16.     dev_data.spec_func=0;
  17.     
  18.     inregs.x.bx=drive;
  19.     inregs.h.ch=0x08;
  20.     inregs.h.cl=0x60;
  21.     inregs.x.dx=&dev_data;
  22.     inregs.x.ax=0x440D;
  23.     
  24.     intdos(&inregs,&outregs);
  25.     
  26.     return(dev_data.dev_type);
  27. }
  28.  
  29.  
  30.  
  31. long get_vsn(int drive)
  32.  
  33. {
  34.     union REGS inregs, outregs;
  35.     
  36.     MID disk_data;
  37.     
  38.     disk_data.infolevel=0;
  39.     
  40.     inregs.x.bx=drive;
  41.     inregs.h.ch=0x08;
  42.     inregs.h.cl=0x66;
  43.     inregs.x.dx=&disk_data;
  44.     inregs.x.ax=0x440D;
  45.     
  46.     intdos(&inregs,&outregs);
  47.     
  48.     return(disk_data.serialnum);
  49. }
  50.