H5A_GET_TYPE retrieves a copy of the datatype for an attribute.
The datatype is reopened if it is a named type before returning it to the application. The datatypes returned by this function are always read-only. If an error occurs when atomizing the return datatype, then the datatype is closed.
The datatype identifier returned from this function must be released with H5T_CLOSE or resource leaks will develop.
Returns a datatype identifier if successful; otherwise returns a negative value.