# Name

VixDiskLib_Shrink

# Description

    VixError
    VixDiskLib_Shrink(VixDiskLibHandle diskHandle,
                      VixDiskLibProgressFunc progressFunc,
                      void *progressCallbackData);

This function reclaims blocks of zeroes from the virtual disk.

# Parameters

diskHandle
  Handle to an open virtual disk.
progressFunc
  A pointer to a function of type VixDiskLibProgressFunc. VixDiskLib will call this function periodically to update progress.
progressCallbackData
  Opaque data that VixDiskLib will pass while calling progressFunc.

# Return Value

VIX_OK if the function succeeded, otherwise an appropriate VIX error code.

# Remarks

- VixDiskLib_Shrink() does not change the virtual disk capacity.
- VixDiskLib_Shrink() can only shrink hosted disks.
- VixDiskLib_Shrink() is only applicable for sparse disks.

# Example

       vixError = VixDiskLib_Shrink(disk.Handle(),
                                    ShrinkProgressFunc,
                                    NULL);

Copyright (C) 2007-2012 VMware, Inc. All rights reserved.