Get running processes using JNA

前端 未结 1 757
梦毁少年i
梦毁少年i 2021-01-07 00:48

I am trying to obtain a list of all currently running processes on a windows machine.

I am trying it with winapi calls via JNA to EnumProcesses -> OpenProcess -> G

相关标签:
1条回答
  • 2021-01-07 01:03

    Calling OpenProcess with PROCESS_VM_READ means that you want to read the memory of that process. To do this, you need the SE_DEBUG_PRIVLEGE. Your application doesn't have that privilege which is why you are getting access denied.

    Check the MSDN article for ReadProcessMemory. There is some community content on how to acquire that privilege.

    0 讨论(0)
提交回复
热议问题