hallo leute,
bin im moment etwas verzweifelt. ich habe ein service geschrieben, welches aufgrund eines events an der seriellen schnittstelle einen logoff durchführen soll.
ich habe vorab das ganze in einer form getestet, wo auch alles super funktioniert hat.
jedoch als service funktioniert ein LOGOFF nicht (ein SHUTDOWN komischerweise schon)
C#-Quelltext
1: 2: 3: 4:
| [DllImport("user32.dll")] public static extern int ExitWindowsEx(int operationFlag, int operationReason);
ExitWindowsEx(0, 0); |
habe es auch mit dem Windows Controller von
mentalis.org/soft/class.qpx?id=7 probiert.
C#-Quelltext
1:
| SHUTDOWN (ExitWindowsEx(8, 0);) |
hat dafür jemand eine erklärung?
thx
Moderiert von Christian S.: C#-Tags hinzugefügt