Home |
Function RTFCheckDiskBufferSize Function RTFCreateMasterBootRecord Function RTFSplitPartition |
Function RTFSplitPartitionRTFSplitPartition splits the last partition in a partition table into two partitions: int RTFSplitPartition(void * MasterBootRecord, RTFSector Sectors); RTFSplitPartition does not access any physical disk. ParametersMasterBootRecordPointer to a buffer of at least 512 bytes size containing a valid master boot record with a partition table. SectorsSpecifies how many sectors to allocate to the currently last partition. It must be less than the number of sectors it currently has. All remaining sectors are then allocated to a new partition. return valueIf the function succeeds, the return value is a zero-based index of the created partition (a value between 1 and 3). If the function fails, the return value is a negative error code. Parameter Sectors is rounded down to a multiple of a cylinder, so the actual number of sectors can be less than the specified value. If the partition table already contains four partitions, the function will fail. Demo program PartDemo uses this function. Function RTFCreateMasterBootRecord Function RTFCreateGPTPartition
|