#define SC_SYSFUNC    0xD5
#define SC_REBOOT     0xAB
#define SC_REBOOTDEV  "DOS$"

HFILE File = NULLHANDLE;
ULONG Action = 0;
APIRET Rc;

Rc = DosOpen (SC_REBOOTDEV,
              &File,
              &Action,
              0,
              FILE_NORMAL,
              FILE_OPEN,
              OPEN_SHARE_DENYNONE | OPEN_ACCESS_READWRITE,
              0);

if (Rc == NO_ERROR) 
{
  DosDevIOCtl (File,
               SC_SYSFUNC,
               SC_REBOOT,
               NULL,
               0,
               NULL,
               NULL,
               0,
               NULL);

  DosClose (File), File = NULLHANDLE;
}