Home |
Function RTFCheckDiskBufferSize Function RTFCreateMasterBootRecord |
Function RTFCreateMasterBootRecordRTFCreateMasterBootRecord creates a valid master boot record with a partition table for a hard disk: int RTFCreateMasterBootRecord(void * SectorBuffer, const RTFPartitionRecord * DiskGeometry); RTFCreateMasterBootRecord does not access any physical disk. ParametersSectorBufferMust point to a buffer of at least 512 bytes size. It will receive the new master boot record. DiskGeometryPointer to a partition record describing the complete hard disk. This information will usually be supplied by a device driver. return valueIf the function succeeds, the return value is RTF_NO_ERROR. If the function fails, the return value is a negative error code. RTFCreateMasterBootRecord fills the supplied buffer with a master boot loader and a partition table containing exactly one primary active partition spanning the complete disk. Please refer to function RTFGetPartitionInfo for more information about structure RTFPartitionRecord. Demo program PartDemo uses this function. Function RTFCheckDiskBufferSize
|