IsPwrSuspendAllowed

[DllImport("powrprof.dll", SetLastError = true)]
public static extern bool IsPwrSuspendAllowed(
   
);

Microsoft documentation: Link

Last updated