A SERVICE OF

logo

CHAPTER 3 Operations on Host Machines
25
RC1
VixHost_Disconnect
Function Signature
void
VixHost_Disconnect(VixHandle hostHandle);
Parameters
Results
None.
Notes
Call this function to disconnect the host. After you call this function the handle is no
longer valid and you should not use it in any VIX function. Similarly, you should not
use any handles obtained from the host while it was connected.
Example
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);
handle The host handle returned by VixHost_Connect().