# Name

VixDiskLib_WriteMetadata

# Description

    VixError
    VixDiskLib_WriteMetadata(VixDiskLibHandle diskHandle,
                             const char *key,
                             const char *val);

This function updates the virtual disk metadata with the given <key, value> pair.

# Parameters

diskHandle
  Handle to an open virtual disk.
key
  Name of the key.
val
  Value of the above key.

# Return Value

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

# Remarks

- This function creates a new <key,value> pair if the given key does not exist.
- Virtual disk metadata keys and their values are ANSI strings.

# Example

       vixError = VixDiskLib_WriteMetadata(disk.Handle(),
                                           appGlobals.metaKey,
                                           appGlobals.metaVal);

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