(Добавление)
Разобрался
CODE:
external(INT, "GetWindowThreadProcessId", "GetWindowThreadProcessId", "User32.dll");
int handle=65012194;//тут свой handle
int pid=0;
GetWindowThreadProcessId(handle, address(#pid));
messagebox (pid);
external(INT, "GetWindowThreadProcessId", "GetWindowThreadProcessId", "User32.dll");
int handle=65012194;//тут свой handle
int pid=0;
GetWindowThreadProcessId(handle, address(#pid));
messagebox (pid);