Home |
Function RTFCheckDiskBufferSize Function RTFCreateMasterBootRecord Function RTFCreateGPTPartition Function RTFCreateBootSector |
Function RTFCreateBootSectorRTFCreateBootSector creates a valid boot sector for a logical drive: int RTFCreateBootSector(void * BootSector, const RTFPartitionRecord * Partition, BYTE MediaDescriptor, UINT MinSectorsPerCluster, DWORD Flags); RTFCreateBootSector does not access any physical disk. ParametersBootSectorPointer to a buffer of at least 512 bytes. It will receive the boot sector data. PartitionPointer to a partition record describing the partition for which the boot sector is intended. If the boot record is to be written to a hard disk, this data must be identical to the respective partition record in the partition table. MediaDescriptorThe value to be written into the BIOS parameter block. RTFiles-32 never uses this value, but other operating systems may require it to mount a volume. MediaDescriptors are usually supplied by the device driver. MinSectorsPerClusterSpecifies the minimum number of sectors per clusters. This value must be a power of two. See function RTFFormat for details. FlagsControls additional properties of the file system to set up. See function RTFFormat for a description of all supported flags. In addition, RTFCreateBootSector supports flag RTF_FMT_4K_SECTOR which should be used to inform this function that the boot sector is for a device with a sector size of 4096 bytes. Even if set, only 512 bytes are written to parameter *BootSector. return valueIf the function succeeds, it returns the FAT type set up (RTF_FAT12, RTF_FAT16, or RTF_FAT32). If it fails, the return value is a negative error code.
|