0

i'm having process id from Task manager, i need to get the process name (complete with extension) from it. is it possible? i checked other questions, they are mostly command based.

Kittu
  • 43
  • 1
  • 9

1 Answers1

1

Do you mean 'get the .exe filename by process ID' from C code?

If so, you may have interesting in OpenProcess() and following GetModuleFileNameEx(). Don't forget to CloseHandle() after you get the exe filename. :)

grizzlybears
  • 492
  • 2
  • 9
  • thanks for the pointers, calling GetModuleBaseName() before CloseHandle(), seems answer for the query. – Kittu Jul 15 '20 at 13:29