Platform SDK headers into MASM headers

Started by Zap, April 23, 2009, 09:43:12 AM

Previous topic - Next topic

Zap

hi,
i hear theres a program transforming subj.
when i need one or two functions,i do it myself & put them in .asm,
but i`m going to use winsock2.h,so there`s a lot to do by hand.
Thanx.

Vortex

Hi Zap,

Welcome to the forum.

You would like to have a look at Japheth's h2incx tool :

Quote
About h2incx
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.
Features

    * 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, for example.
    * 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.

http://japheth.de/h2incX.html

ToutEnMasm


drizz

Vortex, you missed the link pointing to already translated complete PSDK headers:
http://japheth.de/win32inc.html

The truth cannot be learned ... it can only be recognized.