Filter:Pascal C++ (DLL/Lib) C++ (VCL) C++ (.NET) C# VB.NET
Writes sectors with data to the disk
- DiskHandle - the handle of the opened disk device
- StartingSector - initial sector to put the data to
- SectorCount - the number of sectors to write
- Buffer - reference to the data to be written
Use this method to write data to sectors of the disk. The handle to the device must have been obtained using Open() or OpenEx() methods.
StartingSector and ending sector (which is equal to StartingSector + SectorCount) must not exceed the number of sectors on the disk which can be obtained using GetSectorCount() method. The size of Buffer must correspond to SectorCount multiplied by the size of single sector which can be obtained using GetSectorSize() method.
If the method fails for whatever reason (eg. parameters are invalid), an exception with Windows-defined error code is thrown.