I'm enumerating the windows taskbar to get the hwnd of all open windows. I want to take the hwnd number and use it to find the full file path to the program associated with the hwnd number.

For example, Notepad is running and it's hwnd is 1234. I want to be able to plug in hwnd 1234 and get a string value return of "C:/Windows/Notepad.exe"

How would I go about doing this? *without including an external dll

Much thanks to anyone who can help me figure this out!