function GetExePatchActiveWindow(ActiveWindowHandle:THandle):string;
var
pId:cardinal;
me32:MODULEENTRY32;
hsnap:THandle;
begin
Result:='';
GetWindowThreadProcessId(ActiveWindowHandle, pId);
hsnap:=CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, pId);
me32.dwSize:=sizeof(MODULEENTRY32);
if Module32First(hsnap, me32) then
Result:=string(me32.szExePath);
CloseHandle(hsnap);
end;