1
2
3
4
5 package oshi.driver.windows.wmi;
6
7 import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiQuery;
8 import com.sun.jna.platform.win32.COM.WbemcliUtil.WmiResult;
9
10 import oshi.annotation.concurrent.ThreadSafe;
11 import oshi.util.platform.windows.WmiQueryHandler;
12
13
14
15
16 @ThreadSafe
17 public final class Win32LogicalDiskToPartition {
18
19 private static final String WIN32_LOGICAL_DISK_TO_PARTITION = "Win32_LogicalDiskToPartition";
20
21
22
23
24 public enum DiskToPartitionProperty {
25 ANTECEDENT, DEPENDENT, ENDINGADDRESS, STARTINGADDRESS;
26 }
27
28 private Win32LogicalDiskToPartition() {
29 }
30
31
32
33
34
35
36
37 public static WmiResult<DiskToPartitionProperty> queryDiskToPartition(WmiQueryHandler h) {
38 WmiQuery<DiskToPartitionProperty> diskToPartitionQuery = new WmiQuery<>(WIN32_LOGICAL_DISK_TO_PARTITION,
39 DiskToPartitionProperty.class);
40 return h.queryWMI(diskToPartitionQuery, false);
41 }
42 }