Use H5T_NATIVE_INT in Delphi

On Windows 10 64bit I would like to use hdf5.dll (version 1.12.0) in a Delphi application.

Based on the Delphi interface by Andrey Paramonov (Delphi interface for hdf5.dll 1.10.0) I have written successfully some external function calls in Delphi.

Now I want to create a simple native integer attribute:

attribute_id := H5Acreate2(group_id, ‘test’, H5T_NATIVE_INT, dataspace_id, H5P_DEFAULT, H5P_DEFAULT);

In Andrey’s (auto-generated) interface H5T_NATIVE_INT is defined as

var
H5T_NATIVE_INT: Integer = -1;

For me it looks like an initialization of H5T_NATIVE_INT is missing.

How is H5T_NATIVE_INT defined? How do I use it correctly in Delphi?

Thanks!

H5T_NATIVE_INT & friends are (C-)macros and eventually reference global variables. See for example around line 400 in https://bitbucket.hdfgroup.org/projects/HDFFV/repos/hdf5/browse/src/H5Tpublic.h. You’ll need something similar in Delphi to pick up those values from, for example, H5T_NATIVE_INT_g (line 425).

G.

Thank you very much for the answer.

Unfortunately I have not much experience in C and I don’t quite understand how H5T_NATIVE_INT & friends are set and how to do the same in Delphi. Do you have an example or can you give me more hints?

Thank you!