VHD APIs are located 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 an example of using JNA to load a VHD library using JNA (adjust / define types if 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 call the function through JNA (if necessary, edit / define the parameters):
VHDLibrary.INSTANCE.AttachVirtualDisk(null, null, 0, 0, null, null);
source share