The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: shashank_tulsyan on November 13, 2006, 01:23:07 PM

Title: jni.h to jni.inc
Post by: shashank_tulsyan on November 13, 2006, 01:23:07 PM
I converted jni.h to jni.inc using h2inc.
While compiling the some asm file which includes it, the compiler tells that :vararg uses C calling convention. Well that ":vararg" came after converting jni.h to jni.inc. One more thing, during declaration of such types, the specifier STDCALL is present, even then :vararg is troubling. Does this mean I cannot use the file, because in no way I'll find it convinient to change calling convention to C.
Someone please tell me a way to make a useable jni.inc.
The command that I used :
h2inc /WIN32 jni.h
Thanks
Title: Re: jni.h to jni.inc
Post by: hutch-- on November 13, 2006, 01:52:51 PM
shashank,

If its the old Microsoft h2inc, you are in trouble in that it generally does not work correctly on modern C/C++ files. STDCALL does not support :VARARG, you need to specify the C calling convention in the prototype to do this. If the include file is not a very large one, it may be quicker to convert it manually than to try and get an automated technique to work.

You could have a look in the windows.inc subforum as one of our members ToutEnMasm is developing a header file converter that looks like it wioll end up a very useful tool.
Title: Re: jni.h to jni.inc
Post by: shashank_tulsyan on November 13, 2006, 04:08:55 PM
Thanks hutch--,
ToutEnMasm's translator did some trick. It was in German so I don't know what I actually did. But, I did a successful compilation, and if anthing goes wrong I know where to find help.