[MSGINA] Implement ShellTurnOffDialog (#3254)
authorOleg Dubinskiy <oleg.dubinskij2013@yandex.ua>
Sat, 28 Nov 2020 14:22:46 +0000 (16:22 +0200)
committerGitHub <noreply@github.com>
Sat, 28 Nov 2020 14:22:46 +0000 (17:22 +0300)
Based on the following prototype: http://diendan.congdongcviet.com/threads/t13622::tim-handle-cua-cua-so-tat-may-tren-windows-nhu-the-nao.cpp?p=69284#post69284 (line 32) and return ShellShutdownDialog from it with all required parameters.
It allows to open the shutdown dialog properly from the Start menu with shell32.dll from Windows Server 2003 SP2 (when installing ReactOS as Workstation).

CORE-17313

dll/win32/msgina/msgina.spec
dll/win32/msgina/shutdown.c

index 1d235ae..53de1e6 100644 (file)
@@ -6,7 +6,7 @@
 6 stub -noname ShellEnableFriendlyUI    ; (long)
 7 stub -noname ShellEnableMultipleUsers ; (long)
 8 stub -noname ShellEnableRemoteConnections ; (long)
-9 stub -noname ShellTurnOffDialog ; (long)
+9 stdcall -noname ShellTurnOffDialog(ptr)
 10 stub -noname ShellIsMultipleUsersEnabled ; ()
 11 stub -noname ShellACPIPowerButtonPressed ; (long long long)
 12 stub -noname ShellIsSingleUserNoPassword ; (wstr wstr)
index bc6e979..dd8591b 100644 (file)
@@ -825,3 +825,14 @@ ShellShutdownDialog(
 
     return 0;
 }
+
+/*
+ * NOTES:
+ * - Undocumented, called from MS shell32.dll to show the turn off dialog.
+ * - Seems to have the same purpose as ShellShutdownDialog.
+ */
+DWORD WINAPI
+ShellTurnOffDialog(HWND hWnd)
+{
+    return ShellShutdownDialog(hWnd, NULL, FALSE);
+}