home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / os2 / gtak212b.zip / SOURCE.ZIP / OS2-ST01 / reset.c < prev    next >
C/C++ Source or Header  |  1991-05-31  |  503b  |  28 lines

  1. #include <stdio.h>
  2. #define INCL_DOSFILEMGR
  3. #define INCL_DOSDEVICES
  4. #include <os2.h>
  5.  
  6. main()
  7. {
  8.     
  9.     HFILE    hdev;
  10.     USHORT    action, rc;
  11.     BYTE    dummy;
  12.  
  13.     rc = DosOpen("TAPE$0", &hdev, &action, 0L, 0,
  14.         FILE_OPEN, OPEN_ACCESS_READWRITE+OPEN_SHARE_DENYNONE, 0L);
  15.     if (rc) {
  16.         printf("open: %d\n", rc);
  17.         exit(1);
  18.     }
  19.     rc = DosDevIOCtl(0, 0, 0x02, 0x80, hdev);
  20. /*    rc = DosDevIOCtl2(0, 0, 0, 0, 0x02, 0x80, hdev);    */
  21.     if (rc) {
  22.         printf("ioctl: %d\n", rc);
  23.         exit(1);
  24.     }
  25.     DosClose(hdev);
  26. }
  27.  
  28.