(WinAPI) shutdown in if
-
folgendes Problem:
#include<stdio.h>
#include<windows.h>int main() {
int ok=1;if (ok == 1) {
ExitWindowsEx(EWX_POWEROFF,0);
}
return 0;
}
Windows sagt er will zuerst das prog beenden dann windows, will aber keine rückmeldung sondern dass er mir windows einfach schliesst wie kann ich das realisieren??
-
invidio: hab ne frage zu windows beenden in ansi-c und console wenn ich das in einer if abfrage machen will (ExitWindowsEx(EWX_POWEROFF,0);) dann muckt windows sagt er will zuerst das programm beenden dann erst windows???!!!
aaaabyx: keine AHNUNG!!!!!!!11
Campino: MSDN?
Gast7043: <!>
invidio: mann
invidio: und wie such ich da
Campino: was
Campino: nach ExitWindowsEx
Campino: The ExitWindowsEx function either logs off the current user, shuts down the system, or shuts down and restarts the system. It sends the WM_QUERYENDSESSION message to all applications to determine if they can be terminated.
Campino: Also musst du WM_QUERYENDSESSION behandeln
-
EWX_FORCEIFHUNG Windows 2000/XP: Forces processes to terminate if they do not respond to the WM_QUERYENDSESSION or WM_ENDSESSION message. This flag is ignored if EWX_FORCE is used.
-
invidio: Windows Me/98/95: ExitWindowsEx does not work from a console application
invidio: na tolll
Campino: tja
invidio: in winapi geht die funktion
invidio: habs schon richtig gemacht
Campino: konsole ist auch nicht für winapi funktionen gedacht
invidio: unter win2000 geht es in der consoleBTW: falsches Forum -> konsole
-
invidio: dann muss ich es wohl mit system("rundll blalblla") machen oder
Gast7043: vielleicht reicht es ja auch, ein unsichtbares fenster zu erstellen
invidio: hast du msdn deutsch auf cd?
Campino: gibt es nur teilweise auf deutsch
Campino: alles was deutsch ist ist unwichtig
Campino: macht doch nix
invidio: hast du vc++?
-
muh