The H2INC utility translates C header files into MASM-compatible include files. C header files normally have the extension .H; MASM include files normally have the extension .INC. This is the origin of the program's name: “H to INC.”
H2INC simplifies porting data structures from your C programs to MASM programs. This is especially useful when you have
A program that mixes C code and MASM code with globally accessible data structures
A program prototyped in C that you're translating to MASM for compactness and fast execution
The H2INC program translates data declarations, function prototypes, and type definitions. H2INC does not convert C code into MASM code. When H2INC encounters a C statement that would compile into executable code, H2INC ignores the statement and issues a warning message to the standard output.
H2INC accepts C source code compatible with Microsoft C 6.0 and creates include files suitable for MASM 6.0. These include files will not work with versions of MASM prior to 6.0.
H2INC is designed to translate project header files that you have written specifically for translation to MASM 6.0 include files. It is not designed to translate header files such as PM.H and WINDOWS.H.
This chapter explains how H2INC performs the C code translation and how the command-line options control the conversions.