Call H5Fget_mdc_size from Fortran

Hi,
Since H5Fget_mdc_size function does not have a Fortran equivalent, I am trying to call it directly. Here is what I have in my Fortran code:

INTEGER(HID_T) :: iFileID
INTEGER(SIZE_T) :: max_size_ptr,min_clean_size_ptr,cur_size_ptr
INTEGER(C_INT)  :: cur_num_entries_ptr,iErr

INTERFACE 
    FUNCTION H5Fget_mdc_size(iFileID,max_size_ptr,min_clean_size_ptr,cur_size_ptr,cur_num_entries_ptr)  RESULT(iErr) BIND(C,NAME="H5Fget_mdc_size")`
        IMPORT                      :: HID_T,SIZE_T,C_INT`
        INTEGER(HID_T),INTENT(IN)   :: iFileID
        INTEGER(SIZE_T),INTENT(OUT) :: max_size_ptr,min_clean_size_ptr,cur_size_ptr
        INTEGER(C_INT),INTENT(OUT)  :: cur_num_entries_ptr
        INTEGER                     :: iErr
    END FUNCTION H5Fget_mdc_size
END INTERFACE
    
!Retrieve the metadata size
iErr = H5Fget_mdc_size(iFileID,max_size_ptr,min_clean_size_ptr,cur_size_ptr,cur_num_entries_ptr)

The function call returns an error saying fileID is not valid. But I know that it is valid because I use it in other calls (with Fortran functions from the API) and they work fine. What am I doing wrong here?

Thanks for the help in advance!
Jon