Is there a tool which creates C header files for Delphi (Win32) DLLs?

c, delphi, dll, java, jna

Solution

Delphi's own compiler can output C/C++ header files from .pas files, using the -JPHNE parameter.

Problem

Until now I have seen only tools and some information for the creation of Delphi code for a given C header file. However, in the 'Delphi first' case, there is a Delphi interface declaration and a generated DLL, and no C header. Are there tools which can extract the necessary information and build a C header file for a DLL? Such a tool could be helpful and time saving in cross-language / cross-platform projects. For example, with the C header file, it would be easier to create Java JNA binding code automatically with jnaerator. The tool chain would look like this: Delphi source -> create C header -> convert to Java binding -> use Delphi DLL from Java

Original source