Name

VixDiskLib_Read

Description

VixError
VixDiskLib_Read(VixDiskLibHandle diskHandle,
                VixDiskLibSectorType startSector,
                VixDiskLibSectorType numSectors,
                uint8 *readBuffer);

This function reads a range of sectors from an open virtual disk.

Parameters

diskHandle
Handle to an open virtual disk.
startSector
Beginning sector number.
numSectors
Number of sectors to read.
readBuffer
Buffer to read the sectors into.

Return Value

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

Remarks

Example

   for (i = 0; i < appGlobals.numSectors; i++) {
      VixError vixError = VixDiskLib_Read(disk.Handle(),
                                          appGlobals.startSector + i,
                                          1,
                                          buf);
      CHECK_AND_THROW(vixError);
      MyValidateFunc(buf, sizeof buf, 16);
   }

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