Class Kernel32FFM
java.lang.Object
oshi.ffm.ForeignFunctions
oshi.ffm.windows.WindowsForeignFunctions
oshi.ffm.windows.Kernel32FFM
-
Field Summary
Fields inherited from class ForeignFunctions
CAPTURE_CALL_STATE, CAPTURED_STATE_LAYOUT, ERRNO_HANDLE, LIBRARY_ARENA, LINKER, SYMBOL_LOOKUP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic OptionalIntCloseHandle(MemorySegment handle) static Optional<MemorySegment> FindFirstVolume(MemorySegment lpszVolumeName, int cchBufferLength) static OptionalIntFindNextVolume(MemorySegment hFindVolume, MemorySegment lpszVolumeName, int cchBufferLength) static OptionalIntFindVolumeClose(MemorySegment hFindVolume) static Optional<MemorySegment> static OptionalIntstatic OptionalIntstatic OptionalIntGetDiskFreeSpaceEx(MemorySegment lpDirectoryName, MemorySegment lpFreeBytesAvailableToCaller, MemorySegment lpTotalNumberOfBytes, MemorySegment lpTotalNumberOfFreeBytes) static OptionalIntGetDriveType(MemorySegment lpRootPathName) static OptionalIntstatic OptionalLongstatic OptionalIntGetVolumeInformation(MemorySegment lpRootPathName, MemorySegment lpVolumeNameBuffer, int nVolumeNameSize, MemorySegment lpVolumeSerialNumber, MemorySegment lpMaximumComponentLength, MemorySegment lpFileSystemFlags, MemorySegment lpFileSystemNameBuffer, int nFileSystemNameSize) static OptionalIntGetVolumeNameForVolumeMountPoint(MemorySegment lpszVolumeMountPoint, MemorySegment lpszVolumeName, int cchBufferLength) Retrieves a volume GUID path for the volume that is associated with the specified volume mount point.static OptionalIntGetVolumePathNamesForVolumeName(MemorySegment lpszVolumeName, MemorySegment lpszVolumePathNames, int cchBufferLength, MemorySegment lpcchReturnLength) static OptionalIntSetErrorMode(int uMode) Methods inherited from class WindowsForeignFunctions
checkSuccess, isSuccess, readAnsiString, readWideString, setupTokenPrivileges, toWideStringMethods inherited from class ForeignFunctions
downcall, getByteArrayFromNativePointer, getErrno, getStringFromNativePointer, getStructFromNativePointer, lib, libraryLookup
-
Constructor Details
-
Kernel32FFM
public Kernel32FFM()
-
-
Method Details
-
CloseHandle
-
FindFirstVolume
public static Optional<MemorySegment> FindFirstVolume(MemorySegment lpszVolumeName, int cchBufferLength) -
FindNextVolume
public static OptionalInt FindNextVolume(MemorySegment hFindVolume, MemorySegment lpszVolumeName, int cchBufferLength) -
FindVolumeClose
-
GetComputerName
-
GetComputerNameEx
-
GetCurrentProcess
-
GetCurrentProcessId
-
GetLastError
-
GetCurrentThreadId
-
GetDiskFreeSpaceEx
public static OptionalInt GetDiskFreeSpaceEx(MemorySegment lpDirectoryName, MemorySegment lpFreeBytesAvailableToCaller, MemorySegment lpTotalNumberOfBytes, MemorySegment lpTotalNumberOfFreeBytes) -
GetDriveType
-
GetVolumeInformation
public static OptionalInt GetVolumeInformation(MemorySegment lpRootPathName, MemorySegment lpVolumeNameBuffer, int nVolumeNameSize, MemorySegment lpVolumeSerialNumber, MemorySegment lpMaximumComponentLength, MemorySegment lpFileSystemFlags, MemorySegment lpFileSystemNameBuffer, int nFileSystemNameSize) -
GetVolumePathNamesForVolumeName
public static OptionalInt GetVolumePathNamesForVolumeName(MemorySegment lpszVolumeName, MemorySegment lpszVolumePathNames, int cchBufferLength, MemorySegment lpcchReturnLength) -
GetTickCount
-
SetErrorMode
-
GetVolumeNameForVolumeMountPoint
public static OptionalInt GetVolumeNameForVolumeMountPoint(MemorySegment lpszVolumeMountPoint, MemorySegment lpszVolumeName, int cchBufferLength) Retrieves a volume GUID path for the volume that is associated with the specified volume mount point.- Parameters:
lpszVolumeMountPoint- the path of a mounted folder or a drive letter (e.g., "C:\\")lpszVolumeName- buffer to receive the volume GUID pathcchBufferLength- size of the buffer in characters- Returns:
- nonzero if successful, zero otherwise
-