If i know the hwnd of another window - how would i get the name of the EXE that the window is running under if you know what i mean?

so if i had the hwnd of one of the IE windows, it would return IEXPLORE.EXE

is this possible?