Thema: Delphi Windows XP beenden

Einzelnen Beitrag anzeigen

MathiasSimmack
(Gast)

n/a Beiträge
 
#6

Re: Windows XP beenden

  Alt 25. Dez 2003, 18:33
Im Normalfall wohl
Zitat von phlux:
oda net?
denn EWX_FORCE bedeutet doch "nur":
Zitat von PSDK:
Forces processes to terminate. When this flag is set, the system does not send the WM_QUERYENDSESSION and WM_ENDSESSION messages. This can cause the applications to lose data. Therefore, you should only use this flag in an emergency.

Windows XP: If the computer is locked and this flag is not specified, the shutdown process will fail.
btw: Für mich bietet sich hier
Delphi-Quellcode:
  if vi.dwPlatformId = VER_PLATFORM_WIN32_NT then // Windows NT
  begin
    { ... }

    result := ExitWindowsEx(flag,0);
  end
  else // Windows 95
  begin
    Result := ExitWindowsEx(flag,0);
  end;
eigentlich eine Optimierungsmöglichkeit. ExitWindowsEx wird in jedem Fall aufgerufen, egal ob unter 9x oder NT. Warum also nicht den doppelten Befehl durch einen ersetzen, der vor dem Ende der Funktion aufgerufen wird?
  Mit Zitat antworten Zitat