![]() |
AW: DLl-Injection HWND der Hostapplikation herausfinden
Bist Du denn auch sicher, dass es sich um die ProzessID handelt und nicht etwa um das Prozesshandle oder die ThreadID?
|
AW: DLl-Injection HWND der Hostapplikation herausfinden
Zitat:
![]() |
AW: DLl-Injection HWND der Hostapplikation herausfinden
Ne is kein Pseudo Handle^^
Nutze GetCurrentProcessID <- Fragt mihc nicht was ich geändert habe. Es geht o.O. Wollte die Resultate der enum funktion nur inne liste speichern, seitdem gehst, auch wenn ich da slogging wieder rausnehme :?::!:. EDIT: oder auch nicht. Ich bekomme zwar nen (gültigen) handle, aber z.B. WM_CLOSE geht nicht o.O MFG Memnarch |
AW: DLl-Injection HWND der Hostapplikation herausfinden
Probier Folgendes
Delphi-Quellcode:
Sry für den verwirrenden Code, habs schnell dahingetippt.. Dürfte aber funktionieren!
function GetMainWindowHandle(): DWord;
var V: TPoint; // X = PID, Y = Result function GetRootWindow(hWnd: DWord): DWord; begin repeat Result := hWnd; hWnd := GetParent( Result ); until hWnd = 0; end; function WinEnumProc(hWnd: DWord; lParam: Integer): LongBool; stdcall; var PID: DWord; begin Result := True; GetWindowThreadProcessId( hWnd, PID ); if PID = PPoint(lParam)^.X then begin PPoint(lParam)^.Y := GetRootWindow( hWnd ); Result := False; end; end; begin try V := Point( GetCurrentProcessId(), INVALID_HANDLE_VALUE ); EnumWindows( @WinEnumProc, Integer(@V) ); Result := V.Y; except Result := INVALID_HANDLE_VALUE; end; end; |
AW: DLl-Injection HWND der Hostapplikation herausfinden
Vielen dank, werde ich mir mal angucken :)
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 03:13 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