Class Cfgmgr32FFM
java.lang.Object
oshi.ffm.ForeignFunctions
oshi.ffm.windows.WindowsForeignFunctions
oshi.ffm.windows.Cfgmgr32FFM
FFM bindings for CfgMgr32.dll (Configuration Manager) functions.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class ForeignFunctions
CAPTURE_CALL_STATE, CAPTURED_STATE_LAYOUT, ERRNO_HANDLE, LIBRARY_ARENA, LINKER, NATIVE_LONG_SIZE, NATIVE_POINTER_SIZE, NATIVE_SIZE_T_SIZE, SYMBOL_LOOKUP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intCM_Get_Child(MemorySegment pdnDevInst, int dnDevInst, int ulFlags) Gets the first child of a device instance.static intCM_Get_Device_ID(int dnDevInst, MemorySegment buffer, int bufferLen, int ulFlags) Gets the device instance ID string.static intCM_Get_DevNode_Registry_Property(int dnDevInst, int ulProperty, MemorySegment pulRegDataType, MemorySegment buffer, MemorySegment pulLength, int ulFlags) Gets a device instance registry property.static intCM_Get_Sibling(MemorySegment pdnDevInst, int dnDevInst, int ulFlags) Gets the next sibling of a device instance.static StringgetDeviceId(int dnDevInst, Arena arena) Convenience method to get a device ID as a String.static StringgetDevNodeProperty(int dnDevInst, int ulProperty, MemorySegment buf, MemorySegment sizeSeg) Convenience method to get a device node registry property as a String.Methods inherited from class WindowsForeignFunctions
checkSuccess, isSuccess, readAnsiString, readWideString, setupTokenPrivileges, toWideStringMethods inherited from class ForeignFunctions
downcall, getByteArrayFromNativePointer, getErrno, getStringFromNativePointer, getStructFromNativePointer, lib, libraryLookup
-
Field Details
-
CR_SUCCESS
public static final int CR_SUCCESS- See Also:
-
CM_DRP_DEVICEDESC
public static final int CM_DRP_DEVICEDESC- See Also:
-
CM_DRP_SERVICE
public static final int CM_DRP_SERVICE- See Also:
-
CM_DRP_CLASS
public static final int CM_DRP_CLASS- See Also:
-
CM_DRP_MFG
public static final int CM_DRP_MFG- See Also:
-
CM_DRP_FRIENDLYNAME
public static final int CM_DRP_FRIENDLYNAME- See Also:
-
-
Constructor Details
-
Cfgmgr32FFM
public Cfgmgr32FFM()
-
-
Method Details
-
CM_Get_Child
public static int CM_Get_Child(MemorySegment pdnDevInst, int dnDevInst, int ulFlags) throws Throwable Gets the first child of a device instance.- Parameters:
pdnDevInst- receives the child device instance handlednDevInst- the parent device instanceulFlags- must be 0- Returns:
- CR_SUCCESS or error code
- Throws:
Throwable
-
CM_Get_Sibling
public static int CM_Get_Sibling(MemorySegment pdnDevInst, int dnDevInst, int ulFlags) throws Throwable Gets the next sibling of a device instance.- Parameters:
pdnDevInst- receives the sibling device instance handlednDevInst- the device instanceulFlags- must be 0- Returns:
- CR_SUCCESS or error code
- Throws:
Throwable
-
CM_Get_Device_ID
public static int CM_Get_Device_ID(int dnDevInst, MemorySegment buffer, int bufferLen, int ulFlags) throws Throwable Gets the device instance ID string.- Parameters:
dnDevInst- the device instancebuffer- receives the device ID string (wide chars)bufferLen- length of buffer in charactersulFlags- must be 0- Returns:
- CR_SUCCESS or error code
- Throws:
Throwable
-
CM_Get_DevNode_Registry_Property
public static int CM_Get_DevNode_Registry_Property(int dnDevInst, int ulProperty, MemorySegment pulRegDataType, MemorySegment buffer, MemorySegment pulLength, int ulFlags) throws Throwable Gets a device instance registry property.- Parameters:
dnDevInst- the device instanceulProperty- the property to retrieve (CM_DRP_*)pulRegDataType- receives the registry data type (may be NULL)buffer- receives the property valuepulLength- on input, buffer size in bytes; on output, bytes writtenulFlags- must be 0- Returns:
- CR_SUCCESS or error code
- Throws:
Throwable
-
getDeviceId
-
getDevNodeProperty
public static String getDevNodeProperty(int dnDevInst, int ulProperty, MemorySegment buf, MemorySegment sizeSeg) Convenience method to get a device node registry property as a String.- Parameters:
dnDevInst- the device instanceulProperty- the property constant (CM_DRP_*)buf- pre-allocated buffer (at least MAX_PATH * 2 bytes)sizeSeg- pre-allocated int segment for size- Returns:
- the property value string, or empty string on failure
-