A rather comprehensive site explaining the difficulties and solutions involved in using a dll written in c/c++ and the conversion of the .h header file to delphi/pascal was
Since FreePascal is aimed at Delphi compatibiltiy among other things, i think H2Pas may be helpful too.
https://www.freepascal.org/tools/h2pas.var