At the top of your program, include vixMntapi.h along with any other header files you need. Structures and type definitions are declared in the include file, so you do not need to create them or allocate memory for them.
Call VixMntapi_Init() to initialize the library in your application. This function takes major and minor version number to account for future extensions. You can provide your own logging, warning, or panic functions to substitute for the default VixMntapi handlers, and custom library and temporary directories.
Call VixMntapi_OpenDiskSet() to open a set of virtual disks for mounting. Pass a set of disk handles obtained from the
VixDiskLib_Open() call. The
VixMntapi_OpenDiskSet() function also expects number of disks to open, an optional open mode, and a parameter to pass back the resulting disk-set handle.
Windows file systems (FAT, FAT32, and NTFS) are supported. The vixMntapi library depends on the operating system for file system attributes such as compression, encryption, hidden, ACL, and alternate streams. If a vixMntapi-linked application runs on a virtual machine that supports these attributes, it supports them. The following volume types are supported: Simple, Spanned, Striped (RAID 0), and Mirrored (RAID 1). RAID 5 (parity striped) is not supported.
You must open a disk set read/write to obtain the OS information for dynamic volume types including LDM and LVM. If you cannot open a base disk read/write, create a child disk in front, and open it read/write. In a multi-boot setup, only the first entry #0 is opened.
The order of mounting is important. For instance, mount top-level directories before subdirectories, and drives with dependencies after drives that they depend on. Mount points are not enumerated, nor are they restored. When you mount one volume, the other volumes are not implicitly mounted also.