home *** CD-ROM | disk | FTP | other *** search
- #define SYSFUNC 0xD5
- #define REBOOT 0xAB
- #define REBOOTDEV "\\DEV\\DOS$
-
- HFILE hREBOOT;
- ULONG ulAction;
-
- rc = DosOpen(REBOOTDEV,
- &hREBOOT,
- &ulAction,
- 0L,
- FILE_NORMAL,
- FILE_OPEN,
- OPEN_SHARE_DENYNONE | OPEN_ACCESS_READWRITE,
- 0L);
- if (rc == 0)
- {
- DosDevIOCtl(hREBOOT,
- SYSFUNC,
- REBOOT,
- NULL,
- 0L,
- NULL,
- NULL,
- 0L,
- NULL);
- DosClose(hDD);
- }
-
- Make sure that the functions DosOpen and DosDevIOCtl are prototyped.
-