Class Win32Process

java.lang.Object
oshi.driver.windows.wmi.Win32Process

@ThreadSafe
public final class Win32Process
extends java.lang.Object
Utility to query WMI class Win32_Process
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static class  Win32Process.CommandLineProperty
    Process command lines.
    static class  Win32Process.ProcessXPProperty
    Process properties accessible from WTSEnumerateProcesses in Vista+
  • Method Summary

    Modifier and Type Method Description
    static com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult<Win32Process.CommandLineProperty> queryCommandLines​(java.util.Set<java.lang.Integer> pidsToQuery)
    Returns process command lines
    static com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult<Win32Process.ProcessXPProperty> queryProcesses​(java.util.Collection<java.lang.Integer> pids)
    Returns process info

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • queryCommandLines

      public static com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult<Win32Process.CommandLineProperty> queryCommandLines​(java.util.Set<java.lang.Integer> pidsToQuery)
      Returns process command lines
      Parameters:
      pidsToQuery - Process IDs to query for command lines. Pass null to query all processes.
      Returns:
      A WbemcliUtil.WmiResult containing process IDs and command lines used to start the provided processes.
    • queryProcesses

      public static com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult<Win32Process.ProcessXPProperty> queryProcesses​(java.util.Collection<java.lang.Integer> pids)
      Returns process info
      Parameters:
      pids - Process IDs to query.
      Returns:
      Information on the provided processes.