从Java调用GetLogicalDrives

时间:2016-09-11 12:00:46

标签: java winapi

我需要使用WinAPI获取有关系统驱动器的信息。在MSDN上,我找到位于DWORD WINAPI GetLogicalDrives(void);的功能kernel32.dll。 我可以在不使用JNA / JNI的情况下调用它吗?我该如何在Java中声明这个函数?

像:

static {
    System.load("C:/Windows/System32/kernel32.dll");
}

native SomeClass GetLogicalDrives(???);

public static void main(String[] args) {
    SomeClass info = GetLogicalDrives(???);
}

0 个答案:

没有答案
相关问题