This structure contains information about an axis in the dataset. The method IMDDataset::GetAxisInfo returns an array of these structures, one for each axis in the dataset. It looks like this:
typedef struct MDAXISINFO
{
ULONG cbSize;
ULONG iAxis;
ULONG cDimensions;
ULONG cCoordinates;
ULONG *rgcColumns;
LPOLESTR *rgpwszDimensionNames;
} MDAXISINFO
The cbSize field contains the size of the structure, in bytes. 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 is a pointer to an array of strings. The provider allocates this array. It contains the names of each dimension. Obviously, the cardinality of both these arrays is cDimensions.
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 the IMDDataset::GetAxisInfo method. 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 this memory will be freed.
For providers, the presence of IMDDataset::FreeAxisInfo method means that the memory for MDAXISINFO array and the fields of each of its elements need not all 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 on how consumers should move from one element to the next in the MDAXISINFO array, see the page describing IMDDataset::GetAxisInfo in Chapter 4.