Class Advapi32UtilFFM

java.lang.Object
oshi.util.platform.windows.Advapi32UtilFFM

public final class Advapi32UtilFFM extends Object
  • Method Details

    • isCurrentProcessElevated

      public static boolean isCurrentProcessElevated()
    • registryGetKeys

      public static String[] registryGetKeys(MemorySegment hKey) throws Throwable
      Throws:
      Throwable
    • registryGetKeys

      public static String[] registryGetKeys(MemorySegment rootKey, String keyPath, int samDesiredExtra) throws Throwable
      Throws:
      Throwable
    • registryGetDword

      public static int registryGetDword(MemorySegment hKey, String valueName) throws Throwable
      Throws:
      Throwable
    • registryGetString

      public static String registryGetString(MemorySegment hKey, String valueName, int size) throws Throwable
      Throws:
      Throwable
    • registryGetValue

      public static Object registryGetValue(MemorySegment hKey, String valueName) throws Throwable
      Throws:
      Throwable
    • registryGetValue

      public static Object registryGetValue(MemorySegment rootKey, String keyPath, String valueName)
      Reads a registry value from the given root key and path.
      Parameters:
      rootKey - The root key handle (e.g., HKEY_LOCAL_MACHINE)
      keyPath - The registry key path
      valueName - The value name to read
      Returns:
      The value object (Integer for REG_DWORD, String for REG_SZ/REG_EXPAND_SZ), or null on failure
    • registryValueExists

      public static boolean registryValueExists(MemorySegment rootKey, String keyPath, String valueName)
      Checks whether a registry value exists under the given root key and path.
      Parameters:
      rootKey - The root key handle (e.g., HKEY_LOCAL_MACHINE)
      keyPath - The registry key path
      valueName - The value name to check
      Returns:
      true if the value exists, false otherwise
    • registryGetStringArray

      public static String[] registryGetStringArray(MemorySegment rootKey, String keyPath, String valueName)
      Reads a REG_MULTI_SZ value from an open registry key.
      Parameters:
      rootKey - The root key handle (e.g., HKEY_LOCAL_MACHINE)
      keyPath - The registry key path
      valueName - The value name to read
      Returns:
      An array of strings from the multi-sz value, or an empty array on failure
    • querySystemBootTime

      public static long querySystemBootTime()
    • querySystemLog

      public static String querySystemLog()