• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1127
  • Last Modified:

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?

Thanks.
0
AlistairDyer
Asked:
AlistairDyer
1 Solution
 
gregoryyoungCommented:
I believe task manager actually uses the EnumDesktopWindows API for this ...

            [DllImport("user32.dll")]
            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.

Cheers,

Greg
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now