Einzelnen Beitrag anzeigen

Benutzerbild von KodeZwerg
KodeZwerg

Registriert seit: 1. Feb 2018
3.149 Beiträge
 
Delphi 10.3 Rio
 
#4

AW: WinApi-Aufruf geht in "Release"-Fassung problemlos, bei "Debug" spuckt er Fehler

  Alt 18. Sep 2020, 09:03
Der Typ von POWER_REQUEST_TYPE wird in der Online-Docu nicht genannt
PowerSetRequest führt zu REASON_CONTEXT was ich als POWER_REQUEST_TYPE auffasse.

Zumindest würde ich es so verstehen.

//edit, falsch verstanden beim nochmaligen lesen.
Zitat:
PowerRequestDisplayRequired
The display remains on even if there is no user input for an extended period of time.

PowerRequestSystemRequired
The system continues to run instead of entering sleep after a period of user inactivity.

PowerRequestAwayModeRequired
The system enters away mode instead of sleep in response to explicit action by the user. In away mode, the system continues to run but turns off audio and video to give the appearance of sleep.

PowerRequestExecutionRequired
The calling process continues to run instead of being suspended or terminated by process lifetime management mechanisms. When and how long the process is allowed to run depends on the operating system and power policy settings.

On systems not capable of connected standby, an active PowerRequestExecutionRequired request implies PowerRequestSystemRequired.
Also so etwas hier in etwa:
Delphi-Quellcode:
TPowerRequestType = (
  PowerRequestDisplayRequired = 0,
  PowerRequestSystemRequired = 1,
  PowerRequestAwayModeRequired = 2,
  PowerRequestExecutionRequired = 3);
Gruß vom KodeZwerg

Geändert von KodeZwerg (18. Sep 2020 um 09:34 Uhr)
  Mit Zitat antworten Zitat