This tool's purpose is to convert C header files to Masm-style include files.
It is much more powerful than Microsoft's h2inc tool.
The main purpose is to convert the Win32 include files, but it should
work with any C header files as well. It is a simple Win32 console
application, but a 32bit DOS extended binary version is included as well to
be used on Non-Win32 platforms.
a private profile file is used which allows fine-tuning of the
include files to generate.
huge C header sets can be converted in one run (for example the Win32 headers
contained in the PSDK).
prototypes may be written so the include file fits for both dynamic linking
to a dll (using the IAT entries) and static linking to a library.
optionally a .DEF file is written, which can then be converted to
an import library with POLIB.
Known Bugs and Restrictions
In many cases the conversion will not be 100 percent, there will always
remain some places where additional manual modifications will be required:
one should be aware that some C header file declarations simply cannot
be translated to ASM. There are no things like inline functions in ASM,
on some situations h2incx has to "count" braces. This can interfere
with #if preprocessor commands, because h2incx cannot evaluate expressions
in these commands. As a result h2incx may get confused and produce garbage.
h2incx has some limited knowledge about C++, but it's original purpose was
to convert C headers. So some C++ specific keywords may confuse h2incx,
which is also true for templates.
"far" and "near" qualifiers are skipped, so this tool will not work
for 16bit includes.
macros in C header files will most likely not be converted reliably
and therefore may require manual adjustments.