Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Delphi DLL+HWND (https://www.delphipraxis.net/47885-dll-hwnd.html)

wolfsblut 17. Jun 2005 12:24


DLL+HWND
 
Hi,

Kurze Frage. Kennt ihr eine Möglichkeit innerhalb einer DLL das Handle des aufrufenden Programms herauszubekommen???


Danke im Voraus

mfg

Bernhard Geyer 17. Jun 2005 12:36

Re: DLL+HWND
 
GetWindowThreadProcessId

wolfsblut 17. Jun 2005 13:55

Re: DLL+HWND
 
Hi,

Zitat:

Zitat von Bernhard Geyer
GetWindowThreadProcessId

Sorry falls meine Frage eher unverständlich war.
Die OH sagt:

The GetWindowThreadProcessId function retrieves the identifier of the thread that created the specified window and, optionally, the identifier of the process that created the window. This function supersedes the GetWindowTask function.

DWORD GetWindowThreadProcessId(

HWND hWnd, // handle of window <~~ da will ich ran
LPDWORD lpdwProcessId // address of variable for process identifier
);

Parameters

hWnd

Identifies the window.

lpdwProcessId

Points to a 32-bit value that receives the process identifier. If this parameter is not NULL, GetWindowThreadProcessId copies the identifier of the process to the 32-bit value; otherwise, it does not.

Gibts sone Funktion???

mfg

Bernhard Geyer 17. Jun 2005 14:14

Re: DLL+HWND
 
Dann probier mal GetActiveWindow


OH: The GetActiveWindow function retrieves the window handle to the active window associated with the thread that calls the function.

wolfsblut 17. Jun 2005 14:51

Re: DLL+HWND
 
Zitat:

Zitat von Bernhard Geyer
Dann probier mal GetActiveWindow


OH: The GetActiveWindow function retrieves the window handle to the active window associated with the thread that calls the function.

Hi,

habs grad ma getested. Scheint zu funzen - genau das was ich gesucht hab ... thx tolles Forum ... schnelle kompetente und freundliche hilfe

thx

weiter so ...

mfg


Alle Zeitangaben in WEZ +1. Es ist jetzt 03:39 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