Kittu
Kittu

Reputation: 43

using C -programming, how to get process name from process id on windows

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.

Upvotes: 0

Views: 364

Answers (1)

grizzlybears
grizzlybears

Reputation: 510

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. :)

Upvotes: 1

Related Questions