IN: Identifier for the target object; may be a file, group, dataset, named datatype or attribute identifier
OUT: The comment
IN: Anticipated required size of thecommentbuffer
H5O_GET_COMMENTretrieves the comment for the specified object in the buffercomment.
The target object is specified by an identifier,object_id.
The size in bytes of the buffercomment, including theNULLterminator, is specified inbufsize. Ifbufsizeis unknown, a preliminaryH5O_GET_COMMENT call with the pointercommentset toNULLwill return the size of the commentwithouttheNULLterminator.
Ifbufsizeis set to a smaller value than described above, onlybufsizebytes of the comment, without aNULLterminator, are returned incomment.
If an object does not have a comment, the empty string is returned incomment.
Upon success, returns the number of characters in the comment, not including theNULLterminator, or zero (0) if the object has no comment. The value returned may be larger thanbufsize. Otherwise returns a negative value.