Name

Disconnect

Description

HRESULT
Disconnect(void)

Destroys the state for a particular host handle.

Parameters

None.

Return Value

HRESULT

Remarks

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.

Side Effects

None.

Requirements

VixCOM.h, since VMware Workstation 6.0.

Example


VBScript:
Dim lib
Dim job
Dim err
Dim host
Dim results

Set lib = CreateObject("VixCOM.VixLib")

Set results = Nothing

Set job = lib.Connect(VixCOM.Constants.VIX_API_VERSION, VixCOM.Constants.VIX_SERVICEPROVIDER_VMWARE_VI_SERVER, "https://viserver/sdk", 0, "Administrator", "adminpass", 0, Nothing, Nothing)
err = job.Wait(Array(VixCOM.Constants.VIX_PROPERTY_JOB_RESULT_HANDLE), results)
If lib.ErrorIndicatesFailure(err) Then
   ' Handle the error...
End If

Set host = results(0)

' ...Do everything in your program...

host.Disconnect()

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