# Name

VixDiskLib_Write

# Description

    VixError
    VixDiskLib_Write(VixDiskLibHandle diskHandle,
                     VixDiskLibSectorType startSector,
                     VixDiskLibSectorType numSectors,
                     const uint8 *writeBuffer);

This function writes to an open virtual disk.

# Parameters

diskHandle
  Handle to an open virtual disk.
startSector
  Beginning sector number.
numSectors
  Number of sectors to write.
writeBuffer
  Data to write.

# Return Value

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

# Example

       uint8 buf[VIXDISKLIB_SECTOR_SIZE];
       VixDiskLibSectorType startSector;

       memset(buf, appGlobals.filler, sizeof buf);
       for (startSector = 0; startSector < appGlobals.numSectors; ++startSector) {
          VixError vixError;
          vixError = VixDiskLib_Write(disk.Handle(),
                                       appGlobals.startSector + startSector,
                                       1, buf);
          CHECK_AND_THROW(vixError);
       }

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