CHAPTER 2 General Functions
15
RC1
Vix_GetProperties
Function Signature
VixError
Vix_GetProperties(VixHandle handle,
VixPropertyID firstPropertyID,
...);
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 allows you to get one or more properties from a handle. You may
use this function on any type of handle, but only specific properties are defined
for each handle. See Properties on page 87 for the list of properties and the
handle types to which they apply.
• This procedure accepts a variable number of parameters, so you can retrieve any
number of properties with a single call. The parameters must be in a series of
pairs of property IDs and result pointers. Each result pointer will accept the value
of the property identified by the property ID in the previous parameter. The type
of the pointer depends on the type of the property. You end the variable list of
parameters with a single ID value of VIX_PROPERTY_NONE.
• When
Vix_GetProperties() returns an error, the values of the output
parameters are indeterminate.
• If you retrieve a string property, then the C API allocates space for that string. You
are responsible for calling Vix_FreeBuffer() to free the string.
Example
VixError err = VIX_OK;
int vmPowerState;
char *vmPathName = NULL;
VixHandle myVM = VIX_INVALID_HANDLE;
// ...Open the virtual machine and get a handle...
handle Any handle returned by a VIX function.
firstPropertyID A property ID. See below for valid values.