Replace this text with the Fortran function signature
const href_t *ref_ptr
IN: Pointer to reference to query
IN/OUT: Buffer for the object to be encoded into
size t *nalloc
IN: The size of the allocated buffer
OUT: The size of the buffer needed
Given a reference ref_ptr, H5R_ENCODE marshalls the memory representation of a reference into a buffer, suitable for transmission. Using this representation, a reference can be reconstructed using H5R_DECODE to return a new reference handle (href_t) for this reference.
A preliminary H5R_ENCODE call can be made to find out the size of the buffer needed. This value is returned as nalloc. That value can then be assigned to nalloc for a second H5R_ENCODE call, which will be used for the actual encoding of the reference.
If the library finds out that nalloc is not big enough, it simply returns the size of the buffer needed through nalloc without encoding the provided buffer.
Returns a non-negative value if successful; otherwise returns a negative value.