c# wmi win32_process

Hi, I am trying to write a remote process manager and am trying to imitate the windows task manager.  I can enumerate all processes fine but would also like to distinguish between a process and an application so I can display running applications in one tab and processes in another, is this possible through wmi?

Who is Participating?
I believe task manager actually uses the EnumDesktopWindows API for this ...

            private static extern bool EnumDesktopWindows(IntPtr hDesktop, EnumDesktopWindowsProc lpfn, IntPtr lParam);

http://pinvoke.net/default.aspx/user32/EnumDesktopWindows.html includes an example

The reason I say this is if you are using desktop switching software, you only see the applications for your current desktop listed in the applications window.

I don't think this works remotely though.


Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.