Ho trovato questa documentazione:
http://vbnet.mvps.org/index.html?code/shell/undocshell32overview.htm
WinNT
Appears to use ExitWindowsEx uFlags values and behave accordingly:
Public Const EWX_LOGOFF = 0
Public Const EWX_SHUTDOWN = 1 'NT: needs SE_SHUTDOWN_NAME privilege (no default prompt)
Public Const EWX_REBOOT = 2 'NT: needs SE_SHUTDOWN_NAME privilege
Public Const EWX_FORCE = 4
Public Const EWX_POWEROFF = 8 'NT: needs SE_SHUTDOWN_NAME privilege
Win95
Any Yes selection produces the equivalent to ExitWindowsEx(EWX_FORCE, 0&) (?), i.e. no WM_QUERYENDSESSION or WM_ENDSESSION is sent! Other than noted below, it was found that any other value shuts the system down (no reboot) and includes the default prompt.
Shuts the system down (no reboot) and does not include the default prompt.
Public Const shrsExitNoDefPrompt = 1
Reboots the system and includes the default prompt.
Public Const shrsRebootSystem = 2 ' = EWX_REBOOT
Return values: Yes = 6 (vbYes), No = 7 (vbNo)
The "Shut Down" dialog (i.e. Start menu / Shut Down)
Declare Function SHShutDownDialog Lib "shell32" Alias "#60" _
(ByVal YourGuess As Long) As Long