EndSession

Ends the Windows session.

Syntax:

EndSession ( )

Parameters:

(none)

Returns:

(i) always 0.

 

Use this command to end the current Windows session, just like selecting Close from Program Manager's control menu. If any active applications pop up dialog boxes in response to this command (such as prompting to save data files which have changed), the user will need to respond to them before Windows will close.

Note: For additional methods of rebooting or restarting Windows, see IntControl 66, 67 and 68.

Example:


If AskYesNo ("End Session", "You want to exit Windows?")
   EndSession( )
EndIf
Exit
:CANCEL
Message("", "Exit Windows canceled")
See Also:

Exit, IntControl 66, IntControl 67, IntControl 68, WinClose