If virtual machine state was not cleaned up correctly after connection shut down, VixDiskLib_Cleanup() removes extra state for each virtual machine. Its three parameters specify connection, and pass back the number of virtual machines cleaned up, and the number remaining to be cleaned up.
int numCleanedUp, numRemaining; VixError vixError = VixDiskLib_Cleanup(&cnxParams, &numCleanedUp, &numRemaining);