www.vmware.com
78
C API Reference Guide
RC1
VixJob_CheckCompletion
Function Signature
VixError
VixJob_CheckCompletion(VixHandle jobHandle,
Bool *complete);
Parameters
Results
VixError. This function returns VIX_OK if it succeeded. Otherwise, it returns an
appropriate error described in Error Codes on page 91.
Notes
This function performs a non-blocking test for completion of an asynchronous
operation. It can be used to poll for completion in situations where a blocking
function or a callback function is not desirable.
Example
VixError err = Vix_OK;
VixError err1 = Vix_OK;
VixError err2 = Vix_OK;
VixHandle hostHandle = VIX_INVALID_HANDLE;
VixHandle jobHandle = VIX_INVALID_HANDLE;
VixHandle vmHandle = VIX_INVALID_HANDLE;
Bool jobCompleted;
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,
jobHandle The handle of a job object, returned from any asynchronous VIX
function.
complete An indicator of whether the job has completed.