InitiateSystemShutdownExA(3w)

InitiateSystemShutdownExA3w

Usage

BOOL InitiateSystemShutdownExA
(
LPSTR lpMachineName,
LPSTR lpMessage,
DWORD dwTimeout,
BOOL bForceAppsClosed,
BOOL bRebootAfterShutdown,
DWORD dwReason
)

Overview

Initiate a shutdown or optionally restart the computer.

Params

lpMachineName [In] Network name of machine to shutdown.

lpMessage [In] Message displayed in shutdown dialog box.

dwTimeout [In] Number of seconds dialog is displayed before shutdown.

bForceAppsClosed [In] If TRUE, applications close without saving, else dialog is displayed requesting user to close apps.

bRebootAfterShutdown [In] If TRUE, system reboots after restart, else the system flushes all caches to disk and clears the screen.

dwReason [In] Reason for shutting down. Must be a system shutdown reason code.

Returns

Success: TRUE

Failure: FALSE.

Notes

if lpMachineName is NULL, the local computer is shutdown.

Implementation

Declared in "winreg.h".

Implemented in "dlls/advapi32/advapi.c".

Debug channel "advapi".

Releases

4 releases since Debian 4.0 (Etch); the text changed 3 times.

  1. 4.0
  2. 5.0
  3. 6.0
  4. 7

From libwine-dev 1.4.1-4 in Debian 7 (Wheezy). Parsed by carta from the page's man source.