Is it possible to determine the working directory of another process?

前端 未结 2 1912
长情又很酷
长情又很酷 2020-12-07 03:37

Given a HANDLE (or ProcessID) to process \'A\' is it possible on Win32 for an unrelated process \'B\' to determine the current working directory of process \'A\' ?

2条回答
  •  南方客
    南方客 (楼主)
    2020-12-07 04:07

    Yes, but it's non-trivial. The only way of which I'm aware is to use CreateRemoteThread to execute GetCurrentDirectory in the context of the target program.

提交回复
热议问题