Skip to content

Latest commit

 

History

History
130 lines (80 loc) · 4.46 KB

nf-shlobj_core-restartdialog.md

File metadata and controls

130 lines (80 loc) · 4.46 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name req.apiset
NF:shlobj_core.RestartDialog
RestartDialog function (shlobj_core.h)
Displays a dialog box that prompts the user to restart Windows. When the user clicks the button, the function calls ExitWindowsEx to attempt to restart Windows.
EWX_FORCE
EWX_FORCEIFHUNG
EWX_LOGOFF
EWX_POWEROFF
EWX_REBOOT
EWX_SHUTDOWN
RestartDialog
RestartDialog function [Windows Shell]
_win32_RestartDialog
shell.RestartDialog
shlobj_core/RestartDialog
shell\RestartDialog.htm
shell
ec1e3c11-9960-482c-8461-72c4d41dff3c
12/05/2018
EWX_FORCE, EWX_FORCEIFHUNG, EWX_LOGOFF, EWX_POWEROFF, EWX_REBOOT, EWX_SHUTDOWN, RestartDialog, RestartDialog function [Windows Shell], _win32_RestartDialog, shell.RestartDialog, shlobj_core/RestartDialog
shlobj_core.h
Shlobj.h
Windows
Windows 2000 Professional [desktop apps only]
Windows 2000 Server [desktop apps only]
Shell32.lib
Shell32.dll (version 5.0 or later)
Windows
19H1
RestartDialog
shlobj_core/RestartDialog
c++
APIRef
kbSyntax
DllExport
Shell32.dll
ext-ms-win-shell-shell32-l1-2-1.dll
Ext-MS-Win-Shell-Shell32-L1-2-2.dll
RestartDialog
ext-ms-win-shell-shell32-l1-2-1 (introduced in Windows 10, version 10.0.10240)

RestartDialog function

-description

[This function is available through Windows XP Service Pack 2 (SP2) and Windows Server 2003. It might be altered or unavailable in subsequent versions of Windows.]

Displays a dialog box that prompts the user to restart Windows. When the user clicks the button, the function calls ExitWindowsEx to attempt to restart Windows.

-parameters

-param hwnd [in, optional]

Type: HWND

A handle to the parent window.

-param pszPrompt [in, optional]

Type: PCWSTR

A null-terminated Unicode string that contains the text that displays in the dialog box which prompts the user.

-param dwReturn

Type: DWORD

The flags that specify the type of shutdown.

This parameter must include one of the following values.

EWX_LOGOFF

Shuts down all processes running in the security context of the process that called this function, then logs the user off.

EWX_POWEROFF

Shuts down the system and turns off the power. The system must support the power-off feature. The calling process must have the SE_SHUTDOWN_NAME privilege. For more information, see ExitWindowsEx.

EWX_REBOOT

Shuts down the system and then restarts the system. The calling process must have the SE_SHUTDOWN_NAME privilege. For more information, see ExitWindowsEx.

EWX_SHUTDOWN

Shuts down the system to a point at which it is safe to turn off the power. At this point, all file buffers have been flushed to disk, and all running processes have stopped. If the system supports the power-off feature, the power is also turned off. The calling process must have the SE_SHUTDOWN_NAME privilege. For more information, see ExitWindowsEx.

This parameter can optionally include the following values.

EWX_FORCE

Forces processes to terminate. When this flag is set, the system does not send the WM_QUERYENDSESSION and WM_ENDSESSION messages. This can cause the applications to lose data. Therefore, you should only use this flag in an emergency.

EWX_FORCEIFHUNG

Forces processes to terminate if they do not respond to the WM_QUERYENDSESSION or WM_ENDSESSION message. This flag is ignored if EWX_FORCE is used.

-returns

Type: int

Returns the identifier of the button that was pressed to close the dialog box.