GetWindowThreadProcessId(handle,PDWORD=n)
does not give a value back for second parameter.
TCC v28 Code:
set hprogman=%@winapi[user32.dll,FindWindow,Progman,"Program Manager"]
set hshell=%@winapi[user32.dll,FindWindowEx,%hprogman,NULL,"shelldll_defview",NULL]
set hListView=%@winapi[user32.dll,FindWindowEx,%hshell,NULL,"syslistview32",NULL]
echo hlistView = %hlistView
hlistView = 65874
set PID=-1
set thread=%@winapi[user32.dll,GetWindowThreadProcessId,%hListView,PDWORD=PID]...
Read more