Name

GetError

Description

HRESULT
GetError([out,retval] ULONGLONG* error);

Retrieves the error code from a job that has completed.

Parameters

error
The result returned by a completed asynchronous method.

Return Value

HRESULT

Remarks

Side Effects

None.

Requirements

VixCOM.h, since VMware Workstation 6.0.

Example

VixError err = VIX_OK;
VixHandle hostHandle = VIX_INVALID_HANDLE;
VixHandle jobHandle = VIX_INVALID_HANDLE;

jobHandle = VixHost_Connect(VIX_API_VERSION,
                            VIX_SERVICEPROVIDER_VMWARE_WORKSTATION,
                            NULL, // hostName
                            0, // hostPort
                            NULL, // userName
                            NULL, // password,
                            0, // options
                            VIX_INVALID_HANDLE, // propertyListHandle
                            NULL, // callbackProc
                            NULL); // clientData
                            VixJob_Wait(jobHandle, VIX_PROPERTY_NONE);

err = VixJob_GetError(jobHandle);
if (VIX_OK != err) {
   // Handle the error...
   goto abort;
}

abort:
Vix_ReleaseHandle(jobHandle);
VixHost_Disconnect(hostHandle);

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