Autor Beitrag
Nam
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 24



BeitragVerfasst: Sa 25.11.06 08:32 
Ich rufe mit einem Button Klick eine OnClick Prozedur auf in der ich dann den Button entferne. Auf dem Rückweg sucht er dann anscheinend die Komponenete, die die Prozedur aufgerufen hat. Da sie aber weg ist, kommte eine EAccessViolation Fehlermeldung. Meine Idee ist es nun diesen Aufruf vom Stack zu nehmen.

Kann mir einer der sich auskennt helfen? Wie kann man sowas machen?
thkerkmann
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 20

Windows 7
Delphi 2010 Professional
BeitragVerfasst: Sa 25.11.06 10:40 
Mach ihn doch einfach nur

button.visible:=false;
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10184
Erhaltene Danke: 1259

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Sa 25.11.06 14:55 
Moin!

Meinst du nicht, ein Thread zu diesem Problem reicht? Weil dir die Aussagen zur Machbarkeit nicht "passen", brauchst du keinen Neuen, das wird davon auch nicht besser - und "sauberer" auch nicht... <brrr, Komponenten in ihren Ereignissen freigeben...>

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Sa 25.11.06 15:59 
Hallo!

Ich habe diesen Thread wieder geöffnet, nachdem der Autor klar gemacht hat, dass es hier nur darum gehen soll, wie man den Stack manipulieren kann. Alternative Lösungen für das ursprüngliche Problem bitte hier posten: www.delphi-forum.de/viewtopic.php?t=66894

Christian

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: So 26.11.06 17:52 
Innerhalb einer Ereignisbehandlung nie Sender.Free aufrufen. Stattdessen Sender.Release benutzen.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
wulfskin
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1349
Erhaltene Danke: 1

Win XP
D5 Pers (SSL), D2005 Pro, C, C#
BeitragVerfasst: So 26.11.06 18:35 
user profile iconBenBE hat folgendes geschrieben:
Innerhalb einer Ereignisbehandlung nie Sender.Free aufrufen. Stattdessen Sender.Release benutzen.
Wo ist den Release definiert?

_________________
Manche antworten um ihren Beitragszähler zu erhöhen, andere um zu Helfen.
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: So 26.11.06 18:40 
Ich wiederhole mich nur ungern, aber hier soll es nur um die Sache mit dem Stack gehen. Den Rest bitte in den anderen Thread! :mahn:

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: So 26.11.06 18:49 
user profile iconwulfskin hat folgendes geschrieben:
user profile iconBenBE hat folgendes geschrieben:
Innerhalb einer Ereignisbehandlung nie Sender.Free aufrufen. Stattdessen Sender.Release benutzen.
Wo ist den Release definiert?


Siehe www.delphi-forum.de/....php?p=403004#403004 oder in der DOH ...

Zur Stack-Manipulation:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure GetStackPointer: Pointer;
asm
    MOV EAX, EBP
end;


Der Rückgabewert dieser Funktion ist ein Pointer auf das StackFrame der aktuellen Prozedur. Enthalten darin ist ein Zeiger auf das StackFrame des Aufrufers und die Rücksprungadresse der aktuellen Routine ... Für mehr Details siehe die Sources der uallCollection oder die des Omorphia Debugging Interface ...

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.