Class Advapi32UtilFFM
java.lang.Object
oshi.util.platform.windows.Advapi32UtilFFM
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanstatic longstatic Stringstatic intregistryGetDword(MemorySegment hKey, String valueName) static String[]registryGetKeys(MemorySegment hKey) static String[]registryGetKeys(MemorySegment rootKey, String keyPath, int samDesiredExtra) static StringregistryGetString(MemorySegment hKey, String valueName, int size) static String[]registryGetStringArray(MemorySegment rootKey, String keyPath, String valueName) Reads a REG_MULTI_SZ value from an open registry key.static ObjectregistryGetValue(MemorySegment hKey, String valueName) static ObjectregistryGetValue(MemorySegment rootKey, String keyPath, String valueName) Reads a registry value from the given root key and path.static booleanregistryValueExists(MemorySegment rootKey, String keyPath, String valueName) Checks whether a registry value exists under the given root key and path.
-
Method Details
-
isCurrentProcessElevated
public static boolean isCurrentProcessElevated() -
registryGetKeys
- Throws:
Throwable
-
registryGetKeys
public static String[] registryGetKeys(MemorySegment rootKey, String keyPath, int samDesiredExtra) throws Throwable - Throws:
Throwable
-
registryGetDword
- Throws:
Throwable
-
registryGetString
public static String registryGetString(MemorySegment hKey, String valueName, int size) throws Throwable - Throws:
Throwable
-
registryGetValue
- Throws:
Throwable
-
registryGetValue
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 pathvalueName- 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
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 pathvalueName- 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 pathvalueName- 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
-