InitiateShutdown function advapi32

int InitiateShutdown(
  1. Pointer<Utf16> lpMachineName,
  2. Pointer<Utf16> lpMessage,
  3. int dwGracePeriod,
  4. int dwShutdownFlags,
  5. int dwReason,
)

Initiates a shutdown and restart of the specified computer, and restarts any applications that have been registered for restart.

DWORD InitiateShutdownW(
  LPWSTR lpMachineName,
  LPWSTR lpMessage,
  DWORD  dwGracePeriod,
  DWORD  dwShutdownFlags,
  DWORD  dwReason
);

Implementation

int InitiateShutdown(Pointer<Utf16> lpMachineName, Pointer<Utf16> lpMessage,
        int dwGracePeriod, int dwShutdownFlags, int dwReason) =>
    _InitiateShutdown(
        lpMachineName, lpMessage, dwGracePeriod, dwShutdownFlags, dwReason);