Processes

2 отговора 0 прегледа
#1

Processes

Как да проверя дали даден hWnd принадлежи на текущия процес ?
Ползвам WH_GETMESSAGE и се получават проблеми с други апликейшъни.
Тази проверка ще я правя в HOOKPROC-а.

Отговор
в отговор на Prob #2

Re: Processes

GetWindowThreadProcessId
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.

DWORD GetWindowThreadProcessId(
HWND hWnd, // handle to window
LPDWORD lpdwProcessId // process identifier
);

+

GetCurrentProcessId
The GetCurrentProcessId function retrieves the process identifier of the calling process.

DWORD GetCurrentProcessId(VOID);

Отговор
в отговор на Prob #3

Re: Processes

google

Отговор