Java library for Windows VHD API

爱⌒轻易说出口 提交于 2019-12-05 15:39:50

The VHD APIs are on MSDN. Here is a link to one of the APIs.

http://msdn.microsoft.com/en-us/library/windows/desktop/dd323692(v=vs.85).aspx

Here is a JNA usage example to load the VHD library with JNA (adjust/define types as necessary):

public interface VHDLibrary extends Library {
    VHDLibrary INSTANCE = (VHDLibrary) Native.loadLibrary("VirtDisk", VHDLibrary.class);
    DWORD AttachVirtualDisk(HANDLE p1, Pointer p2, int p3, long p4, Pointer p5, Pointer p6);
}

And to invoke the function via JNA (adjust/define params as necessary):

VHDLibrary.INSTANCE.AttachVirtualDisk(null, null, 0, 0, null, null);
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!