InitiateShutdown function advapi32
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,
);