RestartDialogEx

ユーザに Windows の再起動を求めるダイアログボックスを表示する。ユーザがボタンをクリックすると、関数は ExitWindowsEx を呼び出して Windows の再起動を試みる。

RestartDialogEx hwnd, pszPrompt, dwReturn, dwReasonCode

hwnd : [intptr] 型: HWND 親ウィンドウへのハンドル。
pszPrompt : [wstr] 型: PCWSTR ユーザに表示するダイアログボックス内のテキストを含むヌル終端文字列。
dwReturn : [int] 型: DWORD シャットダウンの種類を指定するフラグ。
dwReasonCode : [int] 型: DWORD Windows XP: シャットダウンを開始する理由を指定する。詳細は「System Shutdown Reason Codes」を参照。

(プラグイン / モジュール : shell32.dll)

解説

ユーザに Windows の再起動を求めるダイアログボックスを表示する。ユーザがボタンをクリックすると、関数は ExitWindowsEx
を呼び出して Windows の再起動を試みる。

[戻り値]
型: int ダイアログボックスを閉じるために押されたボタンの識別子を返す。

情報

プラグイン / モジュールshell32.dll
バージョン1.0
作成日2026/04/16
著作者IronHSP / CsWin32 bridge
URLhttps://github.com/inovia/IronHSP
備考Win32 API の shell32.dll 関数群。CsWin32 + win32metadata から自動生成。
hsp3net 専用 (intptr / NSTRUCT / wstr を使用)。
タイプ拡張命令
グループWin32API
対応環境
  • Windows 版 HSP
hs ファイルhsphelp\win32_shell32_gen2.hs