Last modified: 30 April 2009
Name: H5Rget_region
Signature:
  hid_t `H5Rget_region`( hid_t `loc_id`, H5R_type_t `ref_type`, void *`ref` )

Purpose:
  Sets up a dataspace and selection as specified by a region reference.

Description:
  `H5Rget_region` creates a copy of the dataspace of the dataset pointed to by a region reference, `ref`, and defines a selection matching the selection pointed to by `ref` within the dataspace copy.

  `loc_id` is used to identify the file containing the referenced region; it can be a file identifier or an identifier for any object in the file.

  The parameter `ref_type` specifies the reference type of `ref` and must contain the following value:

  - `H5R_DATASET_REGION` (`1`)

Parameters:

  hid_t `loc_id` | IN: File identifier or identifier for any object in the file containing the referenced region
  H5R_type_t `ref_type` | IN: Reference type of `ref`, which must be `H5R_DATASET_REGION`
  void *`ref` | IN: Region reference to open

Returns:
  Returns a valid dataspace identifier if successful; otherwise returns a negative value.

Fortran90 Interface: h5rget_region_f

      SUBROUTINE h5rget_region_f(obj_id, ref, space_id, hdferr)
        IMPLICIT NONE
        INTEGER(HID_T), INTENT(IN) :: obj_id        ! Object identifier
        TYPE(hdset_reg_ref_t_f), INTENT(IN) :: ref  ! Dataset region reference
        INTEGER(HID_T), INTENT(OUT) :: space_id     ! Space identifier
        INTEGER, INTENT(OUT) :: hdferr              ! Error code

      END SUBROUTINE h5rget_region_f