#include <lvm_intr.h> Partition_Information_Array _System Get_Partitions( ADDRESS Handle, /* (I) Handle of a drive or volume */ CARDINAL32 * Error_Code /* (O) Address where the error code will be stored */ );
Parameters
Drive handles may be obtained using the Get_Drive_Control_Data function. Volume handles may be obtained using the Get_Volume_Control_Data function.
Returns
This function returns a Partition_Information_Array structure. This structure has two fields: an array of partition information records, and the number of entries in the array.
If Handle is the handle of a disk drive, then the returned array will contain a partition information record for each partition and block of free space on that drive. If Handle is the handle of a volume, then the returned array will contain a partition information record for each partition which is part of the specified volume.
Errors
If Handle is non-NULL and is invalid, a trap is likely.
In the event of an error, any memory allocated for the return value will be freed; the Partition_Information_Array returned by this function will contain a NULL pointer for Partition_Array field, and the Count field will be 0.
Additionally, if an error occurs, the value pointed to by Error_Code will be greater than 0.
Side Effects
Memory will be allocated to hold the array returned by this function.
Notes
The caller becomes responsible for the memory allocated for the array of records pointed to by the Partition_Array field of the Partition_Information_Array structure returned by this function. The caller should free this memory using the Free_Engine_Memory function as soon as it is no longer needed.
16-Bit Equivalent:
void _Far16 _Pascal _loadds GET_PARTITIONS16( CARDINAL32 Handle, Partition_Information_Record * _Seg16 * _Seg16 Partition_Array, CARDINAL32 * _Seg16 Count, CARDINAL32 * _Seg16 Error_Code );