![]() |
|
[AutoIt]Get current process hWnd - Printable Version +- Sinisterly (https://sinister.li) +-- Forum: Coding (https://sinister.li/Forum-Coding) +--- Forum: Coding (https://sinister.li/Forum-Coding--71) +--- Thread: [AutoIt]Get current process hWnd (/Thread-AutoIt-Get-current-process-hWnd) |
[AutoIt]Get current process hWnd - 1234hotmaster - 10-31-2011 Code: Func _CurProcHWND()
;by 1234hotmaster
$CurrentProcHWND = DllCall("kernel32.dll", "hwnd", "GetCurrentProcess")
$Ret = DllCall('kernel32.dll', 'bool', 'DuplicateHandle', 'ptr', $CurrentProcHWND[0], 'ptr', $CurrentProcHWND[0], 'ptr', $CurrentProcHWND[0], 'ptr*', 0, 'dword', 0, 'bool', 0, 'dword', 2)
Return $Ret[4]
EndFunc |