Name

Vix_FreeBuffer

Description

void
Vix_FreeBuffer(void *p);

When Vix_GetProperties() or Vix_JobWait() returns a string or blob property, it allocates a buffer for the data. Client applications are responsible for calling Vix_FreeBuffer() to free the buffer when no longer needed.

Parameters

p
A pointer returned by a call to Vix_GetProperties() or Vix_JobWait().

Return Value

None.

Remarks

Side Effects

None.

Requirements

vix.h, since VMware Server 1.0.

Example

This example retrieves the path name and power state of a virtual machine. Vix_FreeBuffer() is used to free the path name storage.
VixError err = VIX_OK;
VixHandle myVM = VIX_INVALID_HANDLE;
char *pathName;
int vmPowerState = 0;

// ...Open the virtual machine and get a handle...

err = Vix_GetProperties(myVM,
                        VIX_VM_VMX_PATHNAME,
                        &pathName,
                        VIX_VM_POWER_STATE_PROPERTY,
                        &vmPowerState,
                        VIX_PROPERTY_NONE);
if (VIX_OK != err) {
  // Handle the error...
}
Vix_FreeBuffer(pathName);

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