I have tried in two ways to get the proocess description
Solution1:-
code:-
Process proc = Process.GetProcessById(pid);
string process_de
The information is contained in the VERSIONINFO resource for the executable file. You are looking for the value named FileDescription
.
Use LoadLibraryEx
passing LOAD_LIBRARY_AS_IMAGE_RESOURCE
. And then use the resource API, FindResource
, LoadResource
, LockResource
etc. to obtain the version info resource. Finally, parse out the information.
Alternatively you could parse the PE file directly which is what I suspect that programs like task manager do for performance reasons. But that would be much more complicated.