C++ Windows - How to get process path from its PID

后端 未结 5 2287
挽巷
挽巷 2020-11-29 04:26

How can I retrieve a process\'s fully-qualified path from its PID using C++ on Windows?

5条回答
  •  日久生厌
    2020-11-29 04:51

    Sometimes GetModuleFileNameEx returns the 299 error code (I don't know why)

    The only method that works for all versions of Windows, including XP is in Nathan Moinvaziri answer:

    check the provided url:

    Windows API to Get a Full Process Path

提交回复
热议问题