The HDF_DFAN_LASTREF function returns the reference number of the most recently read or written annotation in a Hierarchical Data Format file.
Result = HDF_DFAN_LASTREF()