| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Rebooting OS/2 from DOS |
Hi Matthew!
[Warm boot of OS/2 via VDM]
MJ> I know VDM's are designed to protect the rest of OS/2 from crazy
DOS program(mer)s but I would
MJ> be very grateful if someone could tell me how to invoke a warm boot
of OS/2 from a DOS program running in a VDM?
void DosReboot (void)
{
HFILE hf;
ULONG dummy;
ULONG rc;
rc = DosOpen("DOS$", &hf, &dummy, 0L, FILE_NORMAL, FILE_OPEN,
OPEN_ACCESS_WRITEONLY | OPEN_SHARE_DENYNONE |
OPEN_FLAGS_FAIL_ON_ERROR, NULL);
if(!rc)
{
printf ("\nShutdown...");
rc = DosShutdown(0L);
if (rc) ErrorProc(rc);
/* 32-Bit reboot */
DosDevIOCtl( hf, 0xd5, 0xab, NULL, 0, NULL, NULL, 0, NULL );
/* old 16-bit reboot
DosDevIOCtl(NULL, NULL, 0xab, 0xd5, hf);
*/
DosClose(hf);
}
else
printf ("\nDOS.SYS not installed. Can't Reboot.");
}
This is a derivate of Peter's reboot-snippet. You can reboot OS/2 from a
OS/2 program. I've just no idea how to do this from a VDM. Perhaps you can
establish a named pipe connect via the VDM and the "OS/2 terminator
program". Or you can use DOS.SYS's services as well from a VDM session
? But I think there is no way to perform a DosShutdown from a VDM, so files
would be left corrupted, etc...
I believe you need this stuff for some scheduling (Cron) purposes ? But I'd
personally go out and kick the programmer who reboots my OS/2 machine from
his application... you'll know what's up when the mob is knocking at your
door :)
__
|_) InterNet: Haller{at}ti-nov1.fbe.fh-weingarten.de
cu/2.11 |atrick 2:246/2320.18{at}Fidonet 7:7000/7998{at}ZebraNet
--- FleetStreet 0.89wb
* Origin: OS/2 Bodensee ! (2:246/2320.18)SEEN-BY: 12/2442 54/54 620/243 624/50 632/348 640/820 690/660 711/409 413 430 SEEN-BY: 711/807 808 809 934 942 712/353 623 713/888 800/1 @PATH: 246/2320 2300 2200 2426/2000 24/24 396/1 3615/50 229/2 @PATH: 12/2442 711/409 54/54 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.