![]() |
Delphi-Version: 2009
D2009 - IDE reagiert nicht mehr bei bestimmtem Befehl mit Windows 11
Guten Tag zusammen,
ich starte ein Programm aus Delphi 2009 mit Debugger. Wenn ich an diese Zeilen komme, reagiert das Programm nicht mehr und die IDE friert auch ein, also reagiert nicht mehr.
Delphi-Quellcode:
MMSystem.PlaySound('MenuPopup', 0,
SND_ALIAS or SND_ASYNC or SND_NODEFAULT or SND_NOWAIT); Das selbe hat unter Windows 10 noch funktioniert. Wenn ich mein Programm ohne Debugger ausführe, startet es und führt die Zeile aus. Es ist leicht nachstellbar, da die Unit MMSystem mit Delphi ausgeliefert wird. Das ganz habe ich auf zwei Rechnern getestet, auf beiden das selbe Ergebnis. Diese Zeilen in einer neueren Delphiversion (10.3) sind kein Problem, allerdings ist es keine Option, das gesamte Projekt zu migrieren. Hat jemand eine Idee, was hier das Problem sein könnte? |
AW: D2009 - IDE reagiert nicht mehr bei bestimmtem Befehl mit Windows 11
PlaySound ist alt und macht unter Windows 11 einige Probleme, Delphi 2009 ist auch steinalt. Das macht einfach wenig Sinn, das unter Windows 11 zu betreiben. Wie wäre es mit einer VM mit einer passenderen Windowsversion?
Lösen lässt sich das einfach, indem du die Zeile per
Delphi-Quellcode:
nur ausführst, wenn das Programm gerade nicht debuggt wird.
if not IsDebuggerPresent then
|
AW: D2009 - IDE reagiert nicht mehr bei bestimmtem Befehl mit Windows 11
Njoar, 23 Jahre ist für eine API nicht soooo alt, aber dass man Diese nicht mehr in der aktuellen Hilfe findet, sagt schon alles.
Da das eine WinAPI ist und direkt eine Funktion im Windows aufgerufen wird, ist es per se egal, welche Delphiversion genutzt wird, also von Delphi 2 bis 11.3. Aber natürlich sind die Debugger unterschiedlich und es kann sein, dass der Debugger unter Windows 11 schon ein paar Probleme hat. |
AW: D2009 - IDE reagiert nicht mehr bei bestimmtem Befehl mit Windows 11
Hi everyone,
Sorry for using English (bad English though), and hope you mind me writing in non German. Zitat:
Many old codecs where proprietary and needed a license also used some sort of protection against debugging, this caused a lot of troubles with many debuggers (not only Delphi's), also that old API "PlaySound" is there and will work forever as is it, the problem with it that it does populate all the installed codecs to decide which one to use and this might trigger some protection or DRM code to execute, Delphi Debugger on other hand just fail to handle some rare and exotic exceptions. Suggested solutions: 1) Verify the encoding of that audio file, and try to use PCM (wave uncompressed format) or may be different one might solve this, I recommend PCM as never witnessed such a problem with PCM. 2) Check the installed codecs, SysInternals Autoruns will show the installed module but will not show the logical codec themselves, this enough to see and disable the culprit, or at least put your finger on the problem. Hope that helps. |
AW: D2009 - IDE reagiert nicht mehr bei bestimmtem Befehl mit Windows 11
Danke an alle.
@jaenicke: Das mit der VM war auch mein Notfallplan. |
Alle Zeitangaben in WEZ +1. Es ist jetzt 18:40 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz