long _stdcall WriteSectorW2K(LPSTR sDrive, double LowPos, double HighPos, WORD Count, LPSTR Buffer, DWORD BufferSize); |
To obtain the physical address of a sector use the formula Address=(NumberOfSector-1)*SectorSize where NumberOfSector is a 1-based count and SectorSize the size of the sector (512, 2048, etc). Then load the LowPos as unsigned long and HighPos as unsigned long, using the formula: Address=2^32*HighPos+LowPos. For up to 2GB HighPos should be equal to 0.
Back.