Last modified: 24 August 2012
Name: H5Iregister

Signature:
  hid_t `H5Iregister`( H5I_type_t `type`, void *`object` )

Purpose:
  Creates and returns a new ID.

Description:
  `H5Iregister` allocates space for a new ID and returns an identifier for it.

  The `type` parameter is the identifier for the ID type to which this new ID will belong. This identifier must have been created by a call to `H5Iregister_type`.

  The `object` parameter is a pointer to the memory which the new ID will be a reference to. This pointer will be stored by the library and returned to you via a call to `H5Iobject_verify`.

Programming Note for C++ Developers Using C Functions:

  If a C routine that takes a function pointer as an argument is called from within C++ code, the C routine should be returned from normally.

  Examples of this kind of routine include callbacks such as `H5Pset_elink_cb` and `H5Pset_type_conv_cb` and functions such as `H5Tconvert` and `H5Ewalk2`.

  Exiting the routine in its normal fashion allows the HDF5 C Library to clean up its work properly. In other words, if the C++ application jumps out of the routine back to the C++ “catch” statement, the library is not given the opportunity to close any temporary data structures that were set up when the routine was called. The C++ application should save some state as the routine is started so that any problem that occurs might be diagnosed.

Parameters:

  H5I_type_t `type` | IN: The identifier of the type to which the new ID will belong
  void *`object` | IN: Pointer to memory for the library to store

Returns:
  Returns the new ID on success, negative on failure.

Fortran90 Interface:
  This function is not supported in FORTRAN 90.