-1

I have a question: is there a way to get the path pointed from a Windows Explorer istance of which I already have some data like HWND, process id, and a handle to the process?

I am using C++ and WINAPI / MFC in Visual Studio 2012.

ArenaLor
  • 465
  • 6
  • 19

1 Answers1

0

Use GetWindowThreadProcessId, OpenProcess, then GetProcessImageFileName. The documentation https://msdn.microsoft.com/en-us/library/windows/desktop/ms683217(v=vs.85).aspx shows what permissions you need to request in your OpenProcess call.

Adam Gross
  • 56
  • 3
  • This is not what I am asking for - actually doing this I get the explorer exe path; what I want is the path opened in the explorer. – ArenaLor May 31 '17 at 15:43
  • Please give much more detailed information in your request. Your follow-up response is not at all obvious from your original question. You said you want to "get the path of a Windows Explorer process", which would be the explorer.exe path. – Adam Gross Jun 01 '17 at 16:47
  • I'm sorry, should be clearer now. – ArenaLor Jun 04 '17 at 08:51