Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. process list

process list

Scheduled Pinned Locked Moved C / C++ / MFC
c++sysadminquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    ernst maurer
    wrote on last edited by
    #1

    Hello How can get list of processes on remote NT server? I know it on VBScript: for each Process in GetObject("winmgmts:!//serverhost").InstancesOf ("win32_process") ... processing... next but i need this on C++ Thanks Ernst

    L 1 Reply Last reply
    0
    • E ernst maurer

      Hello How can get list of processes on remote NT server? I know it on VBScript: for each Process in GetObject("winmgmts:!//serverhost").InstancesOf ("win32_process") ... processing... next but i need this on C++ Thanks Ernst

      L Offline
      L Offline
      Lim Bio Liong
      wrote on last edited by
      #2

      Hello Amigo, You mentioned VBScript, I therefore get the impression that you are using WMI, or something similar to that. The API GetObject() gives me the impression that "winmgmts:!//serverhost" is a MONIKER of some sort. If so, you need to use the COM Moniker APIs to get a pointer to the underlying COM object associated with "winmgmts:!//serverhost". Once you get this pointer, call the InstancesOf() method. You should QueryInterface the returned COM pointer for an IDispatch Interface pointer. Using this IDispatch interface pointer, you would use the GetIDsOfNames() and Invoke() methods. If the above does not work, there are other ways to accomplish your objective of course. One of them is to create a service program and copy it to your remote machine and use the Service APIs to start the service at the remote machine (this can be done). After starting the service, invoke one of the operations of the service. This could be an operation to get hold of a list of processes on that remote machine. Thereafter, send this list back to your program as a text file or XML file. Best of luck, Amigo. Bio.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups