Platforms to show: All Mac Windows Linux Cross-Platform

FAQ.How to quit windows?
Feedback.

Answer: Try this code:
Example:
dim i1,i2,r as integer
declare function ExitWindowsEx lib "user32" (uFlags As integer, dwReserved As Integer) As Integer
i1 = 2
i2 = 0
r = ExitWindowsEx(i1,i2)
if r<>0 then
' Error()
end if


Notes:
uFlags parameters:

'4 = EWX_Force
'0 = EWX_Logoff
'2 = EWX_Reboot
'1 = EWX_shutdown, should shut down computer

Also check the ExitWindowsMBS method.



Links
MBS Realbasic tutorial videos - Nachhilfe in Kruft