void VixHost_Disconnect(VixHandle hostHandle);
Destroys the state for a particular host handle.
int main()
{
VixHandle hostHandle = Vix_INVALID_HANDLE;
VixHandle jobHandle = Vix_INVALID_HANDLE;
VixError err;
jobHandle = VixHost_Connect(Vix_API_VERSION,
VIX_SERVICEPROVIDER_VMWARE_SERVER,
NULL, // hostName
0, // hostPort
NULL, // userName
NULL, // password,
0, // options
Vix_INVALID_HANDLE, // propertyListHandle
NULL, // callbackProc
NULL); // clientData
err = VixJob_Wait(jobHandle,
VIX_PROPERTY_JOB_RESULT_HANDLE,
&hostHandle,
VIX_PROPERTY_NONE);
if (Vix_OK != err) {
// Handle the error...
}
Vix_ReleaseHandle(jobHandle);
// ...Do everything in your program...
VixHost_Disconnect(hostHandle);
return(0);
}