AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Win32/Win64 API (native code) Delphi anderes Programm "sanft" beenden
Thema durchsuchen
Ansicht
Themen-Optionen

anderes Programm "sanft" beenden

Ein Thema von glkgereon · begonnen am 3. Dez 2004 · letzter Beitrag vom 3. Dez 2004
Antwort Antwort
Seite 2 von 2     12   
Benutzerbild von Luckie
Luckie

Registriert seit: 29. Mai 2002
37.621 Beiträge
 
Delphi 2006 Professional
 
#11

Re: anderes Programm "sanft" beenden

  Alt 3. Dez 2004, 18:35
Muss nicht. Aber wenn es kein Fenster hat, dann hast du auch nichts, an das du WM_CLOSE schicken könntest und müsstest auf TerminateProcess zurückgreifen.
Michael
Ein Teil meines Codes würde euch verunsichern.
  Mit Zitat antworten Zitat
Benutzerbild von glkgereon
glkgereon

Registriert seit: 16. Mär 2004
2.287 Beiträge
 
#12

Re: anderes Programm "sanft" beenden

  Alt 3. Dez 2004, 18:42
hmpff

das war eben mein ziel den prozess net abzuschiessen, sondern ihn zu beenden...

weil wenn der abgeschossen wird, wird doch der speicher net freigegeben, oder?
»Unlösbare Probleme sind in der Regel schwierig...«
  Mit Zitat antworten Zitat
Benutzerbild von Luckie
Luckie

Registriert seit: 29. Mai 2002
37.621 Beiträge
 
Delphi 2006 Professional
 
#13

Re: anderes Programm "sanft" beenden

  Alt 3. Dez 2004, 18:51
Doch wird er.
Zitat:
Remarks
The TerminateProcess function is used to unconditionally cause a process to exit. Use it only in extreme circumstances. The state of global data maintained by dynamic-link libraries (DLLs) may be compromised if TerminateProcess is used rather than ExitProcess.

TerminateProcess initiates termination and returns immediately. This stops execution of all threads within the process and requests cancellation of all pending I/O. The terminated process cannot exit until all pending I/O has been completed or canceled.

Terminating a process causes the following:


All object handles opened by the process are closed.
All threads in the process terminate their execution. Each thread exits when all its pending I/O has been completed or canceled. The process exits after all its threads exit.
The state of the process object becomes signaled, satisfying any threads that had been waiting for the process to terminate. The process object is deleted when the last handle to the process is closed.
The states of all threads of the process become signaled, satisfying any threads that had been waiting for the threads to terminate.
The termination status of the process changes from STILL_ACTIVE to the exit value of the process.
Nur das ist zu beachten:
Zitat:
DLLs attached to the process are not notified that the process is terminating.
Das heißt: Läd dein Prozess eine DLL wird der Referenzcounter der DLL nicht zurück gesetzt. Hat noch ein weitere Prozess die DLL geladen und wird normal beendet und dein Prozess wird abgeschossen, wird die DLL nicht entladen, da der ReferenzCount noch bei 1 ist.
Michael
Ein Teil meines Codes würde euch verunsichern.
  Mit Zitat antworten Zitat
Benutzerbild von glkgereon
glkgereon

Registriert seit: 16. Mär 2004
2.287 Beiträge
 
#14

Re: anderes Programm "sanft" beenden

  Alt 3. Dez 2004, 18:54
und bei sachen wie quicktime wird das wohl der fall sein, das dlls im spiel sind....

dann halt net
»Unlösbare Probleme sind in der Regel schwierig...«
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 2 von 2     12   


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 23:30 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz