Board index » delphi » Restarting Win95

Restarting Win95

Does anybody knows how to restart win95 from a Delphi 2 app? The only
options I see in the ExitWindowsEx function are rebooting machine,
restarting as a new user or just shutdown machine but I haven't been
able to find an analogous to the EW_RESTARTWINDOWS parameter to the 16
bit ExitWindows function.

If somebody knows the answer, please e-mail me directly to
rom...@servidor.unam.mx

Thanks!

 

Re:Restarting Win95


In article <3410FDC2.5B96C...@servidor.unam.mx>,
  Roman Sanchez <rom...@servidor.unam.mx> wrote:

Quote

> Does anybody knows how to restart win95 from a Delphi 2 app? The only
> options I see in the ExitWindowsEx function are rebooting machine,
> restarting as a new user or just shutdown machine but I haven't been
> able to find an analogous to the EW_RESTARTWINDOWS parameter to the 16
> bit ExitWindows function.

> If somebody knows the answer, please e-mail me directly to
> rom...@servidor.unam.mx

This is the function you should use! But if you go and read all about
ExitWindowsEx you will find that you need some priviledges to
reboot/shutdown the machine.... but indeed you can do this (I've tested
this on Win'95). The only tricky part is to put this in the finalization
part of a unit, not in an OnClick event handler, because calling
ExitWindowsEx while you have active forms will produce some GPF's :-(((
E-mail me if to give you an examplary unit, performing what you want...

Best regards,
Nikolay Simeonov

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet

Other Threads