Hey all,

I need to convert some tapi structures that are not included in the windows32.inc file to masm32 compatible format. I have the Microsoft Visual Studio tapi.h file, but i'm not about to manually convert it. What program do you guys recommend? Hutch and company, what did you use to generate all those inc files?

If any of you says h2inc please also give me the parameters that will make it work. I've tried it and it failed miserably.

Posted on 2002-03-10 22:54:01 by Lysic
sorry lysic,

thats how our assembly inc files are made now adays. back in the good old days h2inc would be pretty effective. now adays things are done manually. the .h files are alot more complex then they used to be and no one has come up with a utitlity to do it right.
Posted on 2002-03-11 00:32:53 by smurf
smurf said it all, you get better with practice but you never get good at converting C/C++ header files to asm format, just a pile of messy conversions and documentation checking to try and get it right.


Posted on 2002-03-11 01:18:17 by hutch--
The attitudes expressed in these replies is quite disappointing, comming from so called programmers.
Posted on 2002-03-11 08:12:50 by Boggy
nice Avatar :alright:
Posted on 2002-03-11 08:22:01 by bazik
Ok hutch and smurf, so it's up to me to reinvent the wheel... or at least redesign it, rite?

I don't think that it should be too hard to make a proggie that extracts structures and constants while ignoring everything else. The only snag might be getting those cross defined values from other files, like in:

(OTHERCONSTANT is in another .h file)

I know that I had previously converted some of these structures to masm compatible format and I included them in WINDOWS.inc. Unfortunately, when masm32 v. 7 came out, I foolishly deleted the entire masm32 v. 6 :( . Hutch, if I convert them again, will you post them into the official Windows.inc, to be released in v. 8 or sooner?

Posted on 2002-03-11 08:50:12 by Lysic
boggy: im not much of a programmer. i think of myself more as a student but i do try to help out where i can.

i'm awaiting your h2inc utility though. it seems this topic has inspired you.:grin:
Posted on 2002-03-11 09:49:47 by smurf

I only intend to do a "quick and dirty" job in C++ or VB. Not much inspiration...
Posted on 2002-03-11 09:54:03 by Lysic
Lysic, it might be easier to throw something together in PERL or Python?
Posted on 2002-03-11 10:15:48 by bitRAKE
Bitrake, recursion might be self explanatory, but Perl and Python sure aren't ;) . I guess what I'm trying to tell you is that I "speak" very few languages: only C++, VB and ASM :)
Posted on 2002-03-11 12:10:14 by Lysic
I'm learning both of them right now, and they seem to be really geared towards text processing - which ASM, C/++, VB are not. It's the whole reason for me learning them. So far I think Python is better than PERL.
Posted on 2002-03-11 12:21:35 by bitRAKE
Hi !

Just use an editor with an very good macro-language. UEdit32 has a good one which is able to do IF/THEN/ELSE-clauses. (With some tricks it is possible to let UEdit count numbers up and down ...)

I've done so with the DX8.1-Includes ...

It's a bit better than coding a translator, because it's easier to change the macros to your benefits while converting !

Greetings, CALEB
Posted on 2002-03-11 19:10:03 by Caleb
How can you do that? Can you elaborate, Caleb? Maybe give an example of the syntax?
Posted on 2002-03-11 22:42:12 by Lysic

The constants are the easy things to convert, if you know your way around VB and the string instructions, you can rip them to pieces but the conditional compile statements are a real pain to handle unless you want to write a C compiler front end.

Normal structures are not too bad to convert from C/C++ to ASM format if you know the data types but repeated different comment styles and inbuilt unions make automatic conversions no real joy to do.

I have done a lot of this stuff over time and so did Iczelion but I still have not seen a good conversion utility.

LATER : I just had a look at the whistler edition sdk version of TAPI.H and it is a 175k file so it will be no joy to convert manually. The conversion from #DEFINE to EQU can be handled with no real problems in VB, the structures are more work again but if you convert all of the C/C++ data types that are DWORD size to DWORD, you will make a lot of that easier to do. You wil have to write the code to handle split lines and rejoin them as single lines before you convert them but this is no big deal.


Posted on 2002-03-12 00:58:46 by hutch--
Just look the "num" and "hex" UltraEdit32-macros (Version 8 at least ?) here:
Posted on 2002-03-12 02:22:18 by Caleb
Anyone has a DirectX inc file for NASM or compatible?
I have only a directdraw include, but that includes only directdraw:)
Posted on 2004-06-24 09:48:19 by Anonymous