Is there a way to get the the full path and file name with only knowing the handle of the window?

Any code/api's will help.