--- a/Win32OS.st Wed May 26 23:10:23 1999 +0200
+++ b/Win32OS.st Thu May 27 14:07:16 1999 +0200
@@ -5833,6 +5833,49 @@
"
! !
+!Win32OperatingSystem class methodsFor:'system management'!
+
+
+exitWindows
+ "do not use - may be removed without notice"
+
+ self exitWindows:#shutdown confirm:'Do you really want to shutdown the system'
+!
+
+exitWindows:how confirm:confirmationMessageOrNil
+ "this method is temporary -
+ since my windows system menu crashes so often
+ (even CTRL-ALT-DEL does no longer function, but ST/X is
+ still alive),
+ I added this in order to be able to shutdown w95 cleanly"
+
+ confirmationMessageOrNil notNil ifTrue:[
+ (Dialog confirm:confirmationMessageOrNil) ifFalse:[
+ ^ false
+ ].
+ ].
+%{
+ int flag;
+
+ if (how == @symbol(shutdown)) {
+ flag = EWX_SHUTDOWN;
+ } else if (how == @symbol(reboot)) {
+ flag = EWX_REBOOT;
+ } else if (how == @symbol(logoff)) {
+ flag = EWX_LOGOFF;
+ } else if (how == @symbol(forceShutdown)) {
+ flag = EWX_SHUTDOWN | EWX_FORCE;
+ } else if (how == @symbol(forceReboot)) {
+ flag = EWX_REBOOT | EWX_FORCE;
+ } else if (how == @symbol(forceLogoff)) {
+ flag = EWX_LOGOFF | EWX_FORCE;
+ } else {
+ RETURN (false);
+ }
+ RETURN ((ExitWindowsEx(flag, 0) == TRUE) ? true : false);
+%}
+! !
+
!Win32OperatingSystem class methodsFor:'users & groups'!
getEffectiveGroupID
@@ -6978,6 +7021,6 @@
!Win32OperatingSystem class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Attic/Win32OS.st,v 1.58 1999-05-21 22:48:26 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Attic/Win32OS.st,v 1.59 1999-05-27 12:07:16 cg Exp $'
! !
Win32OperatingSystem initialize!
--- a/Win32OperatingSystem.st Wed May 26 23:10:23 1999 +0200
+++ b/Win32OperatingSystem.st Thu May 27 14:07:16 1999 +0200
@@ -5833,6 +5833,49 @@
"
! !
+!Win32OperatingSystem class methodsFor:'system management'!
+
+
+exitWindows
+ "do not use - may be removed without notice"
+
+ self exitWindows:#shutdown confirm:'Do you really want to shutdown the system'
+!
+
+exitWindows:how confirm:confirmationMessageOrNil
+ "this method is temporary -
+ since my windows system menu crashes so often
+ (even CTRL-ALT-DEL does no longer function, but ST/X is
+ still alive),
+ I added this in order to be able to shutdown w95 cleanly"
+
+ confirmationMessageOrNil notNil ifTrue:[
+ (Dialog confirm:confirmationMessageOrNil) ifFalse:[
+ ^ false
+ ].
+ ].
+%{
+ int flag;
+
+ if (how == @symbol(shutdown)) {
+ flag = EWX_SHUTDOWN;
+ } else if (how == @symbol(reboot)) {
+ flag = EWX_REBOOT;
+ } else if (how == @symbol(logoff)) {
+ flag = EWX_LOGOFF;
+ } else if (how == @symbol(forceShutdown)) {
+ flag = EWX_SHUTDOWN | EWX_FORCE;
+ } else if (how == @symbol(forceReboot)) {
+ flag = EWX_REBOOT | EWX_FORCE;
+ } else if (how == @symbol(forceLogoff)) {
+ flag = EWX_LOGOFF | EWX_FORCE;
+ } else {
+ RETURN (false);
+ }
+ RETURN ((ExitWindowsEx(flag, 0) == TRUE) ? true : false);
+%}
+! !
+
!Win32OperatingSystem class methodsFor:'users & groups'!
getEffectiveGroupID
@@ -6978,6 +7021,6 @@
!Win32OperatingSystem class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.58 1999-05-21 22:48:26 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.59 1999-05-27 12:07:16 cg Exp $'
! !
Win32OperatingSystem initialize!