Unit ExitWin

ExitWin version 2.0 copyright © 1996-1997 by Alexander Meeder Encapsulates the Win32 API "ExitWindowsEx' function Very easy to use, just place it on your form, choose the appropriate action with the ExitWinType-property, call the ExitWin1.Execute method which returns false if something went wrong. You can then use the LastError propertyto determine the problem Release info: Version 1.0 - First release (1996) Version 1.1 - Release with aditional functionality build in by Paul W. Guilmette Version 2.0 - Second release (1997), after some usefull tips this component is Windows NT-safe so you can use it to shutdown Windows NT please mail me if you use it or have some suggestions: ameeder@dds.nl ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Paul W. Guilmette (tridata@gte.net) -- Thought this component could use a couple of modifications New Properties List Of Exits : Boolean -- If True will display to the user the ways to exit If False will use the exit win type selected ListTop -- Top Position of the display list ListLeft -- Left Position of the List Torben Falck (tof@post6.tele.dk) -- Found out that when using this control under Windows NT you cannot shutdown the system when you don't have the privilege to do so. He suggested to add some functions to set this privilege

Classes

TExitWin - New component, encapsulates Win32 API ExitWindowsEx

Functions

Register - If somthing went wrong, set property 'LastError'

Types

TExitWinType
TWinType

Constants

Variables


Functions


procedure Register;

If somthing went wrong, set property 'LastError'

Types


TExitWinType  = (ewLogoff, ewReboot, ewShutDown, ewPowerOff);
Different options to ShutDown/Logoff Windows95/NT
TWinType = (wtWindows95, wtWindowsNT, wtWin32s, wtUnknown);
Different OS platforms

Constants


Variables