Einzelnen Beitrag anzeigen

Benutzerbild von stOrM
stOrM

Registriert seit: 7. Jun 2003
Ort: Mülheim an der Ruhr
434 Beiträge
 
Delphi 10.3 Rio
 
#5

AW: Dienste und NotifyServiceStatusChangeW

  Alt 23. Aug 2011, 11:25
Das solltest du lieber nicht tun denn:
Zitat von MSDN:
Note that certain functions in the Windows API, including NotifyServiceStatusChange and other SCM functions, use remote procedure calls (RPC); these functions might perform an alertable wait operation, so they are not safe to call from within the callback function
Die Lösung ist:
Zitat von MSDN:
Instead, the callback function should save the notification parameters and perform any additional work outside the callback.
Ah ja
Glaub ich bin zu Doof dazu, ich krieg das irgendwie nicht gelöst das mir der Callback ein weiteres mal ausgelöst wird. Ich hab schon mittlerweile noch ein Event eingebaut, was ich im Callback zurücksetzen wollte geht irgendwie auch nicht. Gleich nehm ich Variante 1 und machs doch mit polling

Geändert von stOrM (23. Aug 2011 um 13:03 Uhr)
  Mit Zitat antworten Zitat