home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / reboot4.zip / REBOOT2.C < prev    next >
Text File  |  1990-03-02  |  480b  |  30 lines

  1. #define INCL_BASE
  2. #include <os2.h>
  3.  
  4. char            device_name[] = "REBOOTZZ";
  5.  
  6. main()
  7. {
  8.     USHORT        action;
  9.     int            err;
  10.     HFILE            handle;
  11.  
  12.     err = DosOpen(device_name,
  13.                         &handle,
  14.                         &action,
  15.                         0L,                // size
  16.                         0,                    // attribute
  17.                         1,                    // open the file
  18.                         0x42,                 // read/write, deny-none share mode
  19.                         0L);                // reserved
  20.  
  21.     if (err)
  22.         printf("DosOpen on device %s failed.  Err = 0x%x.\n", 
  23.                device_name, err);
  24.  
  25. }
  26.  
  27.  
  28.  
  29.  
  30.