This method is deprecated now.
PRL_RESULT PrlDisk_Compact( const PRL_HANDLE Handle, const PRL_DISK_CALLBACK pDiskCallback, PRL_VOID_PTR pParameter );
PrlDisk.h
PRL_RESULT. Possible values:
PRL_ERR_INVALID_ARG - invalid argument values.
PRL_ERR_SUCCESS - function completed successfully.
Compacts a virtual disk. A virtual disk may become fragmented similar to a physical disk. As a result, the size that the disk files occupy on the physical hard drive may be larger than the size of the actual data they contain. The PrlDisk_Compact function defragments the specified virtual disk and decreases the size that the virtual disk files occupy on the physical hard disk. The designated size of the virtual disk itself remains unchanged.
Please note that not all disks can be compacted. To determine if a disk can or cannot be compacted use the PrlDisk_IsCompactable function.