https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c0d2cd508f19219061eec20d41a5e7d4426527bc

commit c0d2cd508f19219061eec20d41a5e7d4426527bc
Author:     Oleg Dubinskiy <oleg.dubinskij2...@yandex.ua>
AuthorDate: Sat Nov 28 16:22:46 2020 +0200
Commit:     GitHub <nore...@github.com>
CommitDate: Sat Nov 28 17:22:46 2020 +0300

    [MSGINA] Implement ShellTurnOffDialog (#3254)
    
    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 |  2 +-
 dll/win32/msgina/shutdown.c  | 11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/dll/win32/msgina/msgina.spec b/dll/win32/msgina/msgina.spec
index 1d235ae5f62..53de1e66eaf 100644
--- a/dll/win32/msgina/msgina.spec
+++ b/dll/win32/msgina/msgina.spec
@@ -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)
diff --git a/dll/win32/msgina/shutdown.c b/dll/win32/msgina/shutdown.c
index bc6e97949d6..dd8591b4a7a 100644
--- a/dll/win32/msgina/shutdown.c
+++ b/dll/win32/msgina/shutdown.c
@@ -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);
+}

Reply via email to