VMware

This Question is Answered

1 "correct" answer available (10 pts) 1 "helpful" answer available (6 pts)
1 Replies Last post: Nov 3, 2009 8:39 PM by rahqa  

VixDiskLib_Cleanup posted: Oct 29, 2009 9:32 AM

Click to view giladb's profile Enthusiast 37 posts since
Mar 21, 2008
The header file says about VixDiskLib_Cleanup
* When using VixDiskLib_ConnectEx, some state might have not been cleaned
* up if the resulting connection was not shut down cleanly. Use
* VixDiskLib_Cleanup to remove this extra state.


It is not really clear when the function should be used.
What types of unclean situations does it clean up ?

I have a one-shot (Linux) app that grabs information from a disk and then exits. Would it be a good idea to always call the function before connecting ? Before exiting ?

Re: VixDiskLib_Cleanup

1. Nov 3, 2009 8:39 PM in response to: giladb
Click to view rahqa's profile Enthusiast 39 posts since
Jul 14, 2009
VixDiskLib_Cleanup : Remove leftover transports.

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);

-> VixDiskLib_Disconnect() near the end of program, and for safety add a VixDiskLib_Cleanup() call immediately afterwards.

Developer Social Media

Communities