Retrieves the size of a user block
Procedure:
H5P_GET_USERBLOCK ( plist, size )
Signature:
herr_t H5Pget_userblock ( hid_t plist, hsize_t * size )
Fortran90 Interface: h5pget_userblock_f
SUBROUTINE h5pget_userblock_f(prp_id, block_size, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
INTEGER(HSIZE_T), DIMENSION(:), INTENT(OUT) :: block_size
! Size of the user-block in bytes
INTEGER, INTENT(OUT) :: hdferr ! Error code
! 0 on success and -1 on failure
END SUBROUTINE h5pget_userblock_f
Parameters:
hid_t plist | IN: Identifier for property list to query. |
hsize_t * size | OUT: Pointer to location to return user-block size. |
Description:
H5P_GET_USERBLOCK retrieves the size
of a user block in a file creation property list. A user can then read size
bytes from the beginning of the HDF5 file from an application that does not use HDF5. For example, for an HDF5 file ublock.h5 with a user block of characters of size 512, the user block can be retrieved with the following simplified code segment:
unsigned char buffer[512];
FILE *fp = fopen("ublock.h5", "r");
ret = fread(buffer, 1, 512, fp);
fclose(fp);
Returns:
Returns a non-negative value if successful; otherwise returns a negative value.
Example:
History:
--- Last Modified: April 01, 2021 | 11:01 AM