Name

Vix_GetProperties

Description

VixError
Vix_GetProperties(VixHandle handle,
                  VixPropertyID firstPropertyID,
                  ...);

This function allows you to get one or more properties from a handle. For a list of property IDs, see Topics > Types > VixPropertyID.

Parameters

handle
Any handle returned by a Vix function.
firstPropertyID
A property ID. See below for valid values.

Return Value

VixError. This function returns VIX_OK if it succeeded, otherwise the return value indicates an error.

When Vix_GetProperties() returns an error, the values of the output parameters are indeterminate.

Remarks

Side Effects

None.

Requirements

vix.h, since VMware Server 1.0

Example

VixError err = VIX_OK;
int vmPowerState;
char *vmPathName = NULL;
VixHandle myVM = VIX_INVALID_HANDLE;
// ...Open the virtual machine and get a handle...
err = Vix_GetProperties(myVM,
                        VIX_PROPERTY_VM_POWER_STATE,
                        &vmPowerState,
                        VIX_PROPERTY_VM_VMX_PATHNAME,
                        &vmPathName,
                        VIX_PROPERTY_NONE);
if (VIX_OK != err) {
   // Handle the error...
}
Vix_FreeBuffer(vmPathName);

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