Forum: Win32/Win64 API (native code)
Delphi
by firefighter,
9. Jan 2004
Hallo choose,
danke für die schnelle Antwort. Ich habe jetzt ein paar Modifikationen entsprechend Deiner Aussage getroffen und es funktioniert :) Würdest Du mir den Gefallen tun und nochmal darüber schauen, damit ich nicht noch etwas falschen geändert habe? Vielen Dank!
Gruss firefighter
Forum: Win32/Win64 API (native code)
Delphi
by firefighter,
9. Jan 2004
dwPID kommt noch vom CreateProcess ist eine globale Variable. Habs mal mit LongBool ersetzt und das Testprogramm (mehr ist es noch nicht) angehangen.
Forum: Win32/Win64 API (native code)
Delphi
by firefighter,
9. Jan 2004
ok, dann schau mal bitte was hier mein Fehler ist:
Function CloseProcWndCB(hWnd :HWND; param :lparam): Boolean; stdcall;
Begin
GetWindowThreadProcessId(hWnd, @dwPID);
if (dwPID = param) Then
begin
PostMessage(hWnd, WM_CLOSE, NULL, NULL);
end;
CloseProcWndCB := true;
Forum: Win32/Win64 API (native code)
Delphi
by firefighter,
8. Jan 2004
Ein Freund von mir hat dieses Problem mit C++ gelöst. Dies Lösung will ich Euch nicht vorenthalten. @choose: Wie Du siehst, scheint er es so gemacht zu haben wie Deine Idee war :) Jetzt muss diese Lösung nur noch auf Delphi transponiert werden :shock:
static BOOL CALLBACK CloseProcWndCB(HWND hWnd, LPARAM lParam)
{
DWORD dwPID = 0;
::GetWindowThreadProcessId(hWnd, &dwPID);
if (dwPID ==...