Name

VixDiskLib_GetMetadataKeys

Description

VixError
VixDiskLib_GetMetadataKeys(VixDiskLibHandle diskHandle,
                           char *keysBuffer,
                           size_t bufLen,
                           size_t *requiredLen);
This function retrieves all the existing keys in the meta data of a virtual disk.

Parameters

diskHandle
A valid handle to an open virtual disk.
keysBuffer
Buffer to hold the keys in the metadata store, can be NULL if you want to test for errors or get requiredLen.
bufLen
Size of the buffer keysBuffer.
requiredLen
Space, in number of bytes, required for all the keys.

Return Value

VIX_OK if the function succeeded, otherwise an appropriate VIX error code.

Remarks

Example

   VixError vixError = VixDiskLib_GetMetadataKeys(disk.Handle(),
                                                  NULL, 0, &requiredLen);
   if (vixError != VIX_OK && vixError != VIX_E_BUFFER_TOOSMALL) {
      THROW_ERROR(vixError);
   }
   std::vector<char> buf(requiredLen);
   vixError = VixDiskLib_GetMetadataKeys(disk.Handle(),
                                         &buf[0], requiredLen, NULL);
   CHECK_AND_THROW(vixError);

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