MDAXISINFO Structure
This structure contains information about an axis in the dataset. The method IMDDataset::GetAxisRowset returns an array of these structures, one for each axis in the dataset. It looks like this:
typedef struct tagMDAXISINFO
{
DBLENGTH cbSize;
DBCOUNTITEM iAxis;
DBCOUNTITEM cDimensions;
DBCOUNTITEM cCoordinates;
DBORDINAL *rgcColumns;
LPOLESTR *rgpwszDimensionNames;
} MDAXISINFO;
The cbSize field contains the size of the structure in bytes. For any given array of MDAXISINFO structures, cbSize will remain constant.
The iAxis field contains the number of the axis. Axes in a dataset are numbered starting from 0. Axis 0 is the column axis; axis 1 is the row axis; additional axes have numbers 2, 3, and so on.
cDimensions indicates the count of dimensions on the axis.
cCoordinates contains the count of coordinates on the axis.
rgcColumns is a pointer to an array of integers, and each element of this array contains the count of columns in the axis rowset for this particular dimension. (For more information, see Axis Rowsets.) The field rgpwszDimensionNames (which corresponds to the DIMENSION_NAME element of the DIMENSIONS rowset) is a pointer to an array of strings. The provider allocates this array. It contains the names of each dimension. The cardinality of both arrays is cDimensions.
Provider and Consumer Requirements
Providers must make sure to modify the structure only within the bounds of cbSize. Consumers must make sure to use the structure only within the bounds of cbSize.
Consumers must use the IMDDataset::FreeAxisInfo method to free the array of MDAXISINFO structures returned by IMDDataset::GetAxisInfo. This ensures that all the memory allocated by the provider for this array and for the fields in each element of this array is properly freed. Use of IMalloc::Free on the array pointer does not guarantee that all memory will be freed.
For providers, the presence of the IMDDataset::FreeAxisInfo method means that the memory for the MDAXISINFO array and the fields of each of its elements need not be allocated in one contiguous block. The memory can be allocated in any convenient set of blocks, which can be freed when the consumer calls IMDDataset::FreeAxisInfo.
For more information about how consumers should move from one element to the next in the MDAXISINFO array, see the description of IMDDataset::GetAxisInfo in the reference section.