News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

A translator for sdk header files (64 and 32 bits translate)

Started by TouEnMasm, August 15, 2012, 04:16:27 AM

Previous topic - Next topic

LiaoMi

Quote from: TouEnMasm on May 27, 2021, 04:18:39 PMHello,
I made an oversight in the 10.6 version,corrected in the 10.7
I have also eliminates the risk with annotations in structures.

Hi TouEnMasm,

we will test it, thanks for your work  :thumbsup:

P.S.
Did you check knownfolders.h?
http://masm32.com/board/index.php?topic=9282.0

TouEnMasm


Thanks for your help,I have made a last change in the code ,The typedef multi-dimensionnal are now translated as strucrure and usable by MASM.
Fa is a musical note to play with CL

TouEnMasm

 :greensml:
I hope last change this time,Some structures wasn't recognize as there.Corrected.
Corrected thread problem,some files wasn't translate (list of files).
A very few number of files don't want to be translated in a list (threaded) and can be only translated as individual.
Those are
Quote
H:\Program Files\editmasm\ref\outils\translator\windows.phone.restricted.cellular.rcspresence.h
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\abi\windows.phone.restricted.cellular.videotelephony.h
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\shared\ndis\version.h
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\km\hbapiwmi.h
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\km\iscsidef.h
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\km\iscsiop.h
I don't know for what on 2000 files those ones don't want to be translate in a thread.


Fa is a musical note to play with CL

TouEnMasm

Hello,
Hope was lost but not the result.
This one:
Filter the MIDL_PASS Lines
Filter the VC++ structures and made a report in the journal.txt.
Solve the thread problem (Not enough memory)
                                        Three files are still resisting to the translation (group files mod,list) ,they are in asm (kxarm..).
Must stay the usual errors to correct.
* Constants not declared        (version number ,you can use an equate with the first term of the comparison GE)
* redefinitions of symbols  name = aname ....conflicting definitions

Tested on the whole sdk 10.0.19041.0
Don't be afraid by the needed corrections,one ; to put definitions in comment is very usefull.
Chance is also possible,It's it work at the first time,It's not me but the chance.


Fa is a musical note to play with CL

TouEnMasm

Hello,
The c++ use complex rules to give a size at the structures with bitfields ,record for masm.
light explain  are here https://docs.microsoft.com/en-us/cpp/cpp/cpp-bit-fields?view=msvc-160
The 11.3 version of headinc give the correct size for those structures.
https://github.com/ToutEnMasm71100
Fa is a musical note to play with CL

LiaoMi

Quote from: TouEnMasm on June 17, 2021, 07:22:30 PMHello,
The c++ use complex rules to give a size at the structures with bitfields ,record for masm.
light explain  are here https://docs.microsoft.com/en-us/cpp/cpp/cpp-bit-fields?view=msvc-160
The 11.3 version of headinc give the correct size for those structures.
http://luce.yves.pagesperso-orange.fr/header.htm

Hi TouEnMasm,

https://github.com/ToutEnMasm71100/editMasm/blob/main/editmasm.7z

La page que vous demandez est introuvable.
Mais il y a des solutions :

vérifiez l'adresse de la page
précisez-nous votre demande
Vous avez aussi la possibilité de retourner en page d'accueil.

TouEnMasm

Mistake of mine,corrected.
The compressed file can be a zip or a 7z (for various reasons)
Better is to connect to the page https://github.com/ToutEnMasm71100/editMasm

Fa is a musical note to play with CL

LiaoMi

Quote from: TouEnMasm on June 18, 2021, 03:23:34 PM
Mistake of mine,corrected.
The compressed file can be a zip or a 7z (for various reasons)
Better is to connect to the page http://luce.yves.pagesperso-orange.fr/Editmasm.htm

The link does not work in any conditions  :sad:

TouEnMasm

Direct links:
https://github.com/ToutEnMasm71100/editMasm/blob/main/editmasm.7z
https://github.com/ToutEnMasm71100/Translator/blob/main/translatorus.7z

I verify if the links works and modify this post if necessary.
EDIT: These are New 'links' to the new GitHub page.
Fa is a musical note to play with CL

HSE

Equations in Assembly: SmplMath

TouEnMasm

A first translate of the SDK KIT 10.0.19041.0,The very last SDK (2021)
The more comon applications can used it without modifies.
For the others,a few modifies will be needed (Incompatible name,re-definition, ..)
Headinc had been also modify a little to avoid too many corrections.
Too many errors in the file,suspect used of C++ structures not translatable.


Tracking errors:
QuoteSome files use RESERVED as an EQU ,this generate errors with Structures who use it as local.
The better thing to do is to rename those EQU as you want.They are on those files,made it manually.
H:\sdkrc100\shared\bdatypes.sdk
Nombre de reserved : 1        ;corrected
H:\sdkrc100\um\encdec.sdk
Nombre de reserved : 2        ;corrected
H:\sdkrc100\um\Icm.sdk
Nombre de reserved : 1        ;corrected
H:\sdkrc100\um\minidumpapiset.sdk
Nombre de reserved : 2        ;--------- ReservedStream0 not dangerous
H:\sdkrc100\um\sessdirpublictypes.sdk
Nombre de reserved : 1        ;RESERVED_FOR_LEGACY

The result is a very less number of problems


Fa is a musical note to play with CL

LiaoMi

Quote from: TouEnMasm on June 24, 2021, 11:51:52 PM
A first translate of the SDK KIT 10.0.19041.0,The very last SDK (2021)
The more comon applications can used it without modifies.
For the others,a few modifies will be needed (Incompatible name,re-definition, ..)
Headinc had been also modify a little to avoid too many corrections.
Too many errors in the file,suspect used of C++ structures not translatable.
http://luce.yves.pagesperso-orange.fr/sdkrc100_KIT_10.0.19041.0.7z

Tracking errors:
Quote
Some files use RESERVED as an EQU ,this generate errors with Structures who use it as local.
The better thing to do is to rename those EQU as you want.They are on those files,made it manually.
H:\sdkrc100\shared\bdatypes.sdk
Nombre de reserved : 1       ;corrected
H:\sdkrc100\um\encdec.sdk
Nombre de reserved : 2       ;corrected
H:\sdkrc100\um\Icm.sdk
Nombre de reserved : 1       ;corrected
H:\sdkrc100\um\minidumpapiset.sdk
Nombre de reserved : 2       ;--------- ReservedStream0 not dangerous
H:\sdkrc100\um\sessdirpublictypes.sdk
Nombre de reserved : 1       ;RESERVED_FOR_LEGACY

The result is a very less number of problems



Hi TouEnMasm,

I will check on old projects, thanks  :thumbsup:


TouEnMasm

Hello,
major Updates in the 11.8 version.
*** All prototypes have Now a  a defined call (cproto or  stdproto ) defined in the translated32(64).inc.
Those two files  are in the package and must be updated https://github.com/ToutEnMasm71100/Translator/blob/main/translatorus.7z
A new section DEFINE_PROTO in the egales.txt allow the user to change that.
The start of the line give The masm definition defined in the translate32(64).inc ,just after follow The .h defines in the same lines.
*** A new method is in use to filter the argument in the structure,function ,interface ...
The method never failed except when a reference isn't found in the argument.
The Journal.txt show "failed to find Argument FiltrageArgumentPrototype"  .
This happen when the first name of a structure ior union is in used instead of the last.
On 1200 files i have find about ten of them.You need to modify the source header to correct the error.
***** corrected the declare_interface translation and made some modifies for less and less modifies to do.
***** long long,long double  are translated  correctly. If you find other double or triple (they exist) values just say it here.





Fa is a musical note to play with CL

TouEnMasm

Corrected a mistake that made appear function without declaration of call  wthout the word proto.
The new version verify that the function don't use VARARG if it isn't a C call and made the correction if needed.
You see "XXX Error on call ... VARARG must be C ,corrected " in journal.txt.
You can let things are they are or made a search to find the call declaration and add it in the section DEFINE_PROTO in egales.txt



Fa is a musical note to play with CL

TouEnMasm


New things added:
* The sdk use an opaque pointer with no structure for reasons only Known by microsoft.
   To solve that and avoid many errors generated I have added an INVISIBLE empty structure where those pointer can use (she is in translateXX.inc).
* structures have two names,the last is the more used but this generate errors when the first is used.
   To solve that i have added a control to only use the last name.All first name disappear in the translation.
* corrected an error who made some incompatible names not replaced

I have tested this version on the bigger files I have found and the result show that things are really more simple to do
Fa is a musical note to play with CL