private static DataTypeComponent getComponent(DataType dataType, int componentOrdinal,
			MemBuffer memBuffer) {
		if (dataType == null) {
			throw new IllegalArgumentException("Data type cannot be null.");
		}
		if (dataType instanceof DynamicDataType) {
			DynamicDataType dynamicDt = (DynamicDataType) dataType;
			return dynamicDt.getComponent(componentOrdinal, memBuffer);
		}
		if (dataType instanceof TypeDef) {
			dataType = ((TypeDef) dataType).getBaseDataType();
		}
		if (!(dataType instanceof Structure)) {
			throw new IllegalArgumentException("Data type " + dataType.getName() +
				" must be a structure or a typedef on a structure.");
		}
		Structure struct = (Structure) dataType;
		return struct.getComponent(componentOrdinal);
	}
If the indicated component in the data type exists and is a Scalar value, this returns
the scalar value contained in that component of the data type.
@param dataType the data type whose base type is a structure and whose component's
scalar value is wanted. (i.e., The component data type referenced by the ordinal value must
be one that returns a Scalar value; such as an IntegerDataType, EnumDataType,
UndefinedDataType, etc.)
@param componentOrdinal 0-based ordinal indicating the component whose scalar value is being
determined by this method.
@param memBuffer memory buffer that starts where the indicated data type is laid down.
@return the scalar value held by indicated component in the data type when laid down on
the specified memory.
Ghidra/Features/MicrosoftCodeAnalyzer/src/main/java/ghidra/app/cmd/data/EHDataTypeUtilities.java