Author Topic: A translator for sdk header files (64 and 32 bits translate)  (Read 29350 times)

LiaoMi

  • Member
  • ****
  • Posts: 922
Re: A translator for sdk header files (64 and 32 bits translate)
« Reply #30 on: July 03, 2020, 03:52:28 AM »
Final version is here in english(US)
http://luce.yves.pagesperso-orange.fr/header.htm
The headinc link give you the translator,The SDK10.0 pack give you SDK headers translated and usable immediately.
You can translate the page in further languages with the button at the lefft.
The headers support 64/32 bits,unicode .. and give you the same alignment as the C headers (This avoid many problems).
You can also use Windows switchs (constants) to adapt the headers at your machine.
The more common headers can be used without changes (they are numerous),others need minor modifies to make the compilator happy.

Hi TouEnMasm,

http://masm32.com/board/index.php?topic=8126.msg89196#msg89196
and
http://masm32.com/board/index.php?topic=8126.msg89199#msg89199

TouEnMasm

  • Member
  • *****
  • Posts: 1805
    • EditMasm
Re: A translator for sdk header files (64 and 32 bits translate)
« Reply #31 on: July 03, 2020, 03:25:07 PM »

I see than you speak about Size_T  and about PTR ,have you  a modify to ask ?
Fa is a musical note to play with CL

LiaoMi

  • Member
  • ****
  • Posts: 922
Re: A translator for sdk header files (64 and 32 bits translate)
« Reply #32 on: July 05, 2020, 05:28:32 PM »

I see than you speak about Size_T  and about PTR ,have you  a modify to ask ?

Hi TouEnMasm,

your constant is defined as
SIZE_T = DWORD ; intsafe.h

but should be SIZE_T =XMASM ; intsafe.h

there are a lot of such places in the SDK, manual correction in this case is not possible. And a question from the past, are you going to publish the source code of your converter?

TouEnMasm

  • Member
  • *****
  • Posts: 1805
    • EditMasm
Re: A translator for sdk header files (64 and 32 bits translate)
« Reply #33 on: July 06, 2020, 03:03:43 AM »

Not an error of the translator,must be the include who have changed.
he is defined in basetsd SDK\10.0.19041.0\shared show:

Quote
typedef ULONG_PTR SIZE_T, *PSIZE_T;
typedef LONG_PTR SSIZE_T, *PSSIZE_T;
translated by headinc in :
Quote
SIZE_T TYPEDEF XMASM
PSIZE_T TYPEDEF XMASM
SSIZE_T TYPEDEF XMASM
PSSIZE_T TYPEDEF XMASM

I will correct this one manually.If you find another like that,verify that the translator give not an another translate and post it here.






Fa is a musical note to play with CL

TouEnMasm

  • Member
  • *****
  • Posts: 1805
    • EditMasm
Re: A translator for sdk header files (64 and 32 bits translate)
« Reply #34 on: July 23, 2020, 02:09:44 AM »
Hello,
The upper needed modifie has been done in the file basetsd.sdk.
I have had bad surprise using COM in 64 bits and this as needed modifies:
riid:DWORD begin riid:XMASM
rclsid:DWORD begin rclsid:XMASM           and those in all the sdk files.
The corresponding changes (REFIID,..,REF..) had been also made in egales.txt used by the translatorus.
There was trouble with COM in 64 bits,32 is not affect by the change
If you have problem's  don't hesitate to post it here.
I will do my best to arrange this






Fa is a musical note to play with CL

LiaoMi

  • Member
  • ****
  • Posts: 922
Re: A translator for sdk header files (64 and 32 bits translate)
« Reply #35 on: October 18, 2020, 08:11:35 PM »

Not an error of the translator,must be the include who have changed.
he is defined in basetsd SDK\10.0.19041.0\shared show:

Quote
typedef ULONG_PTR SIZE_T, *PSIZE_T;
typedef LONG_PTR SSIZE_T, *PSSIZE_T;
translated by headinc in :
Quote
SIZE_T TYPEDEF XMASM
PSIZE_T TYPEDEF XMASM
SSIZE_T TYPEDEF XMASM
PSSIZE_T TYPEDEF XMASM

I will correct this one manually.If you find another like that,verify that the translator give not an another translate and post it here.

Hi TouEnMasm,

this is not true since I compared another constant, I downloaded the latest version of your converter, the file egales.txt contains two constants PSIZE_T = XMASM and SIZE_T = DWORD ; intsafe.h or size_t = DWORD ; intsafe.h, but it should be PSIZE_T = XMASM and SIZE_T = XMASM ; intsafe.h or size_t = XMASM ; intsafe.h. There are a lot of such errors, so there are problems with compilation, correct conversion does not work everywhere, the error example is given above.

Here is the original code from your SDK (WinBase.sdk)...
;API
GlobalAlloc PROTO uFlags:DWORD ,dwBytes:DWORD

but it should be

GlobalAlloc PROTO uFlags:DWORD ,dwBytes:XMASM

 :azn:

TouEnMasm

  • Member
  • *****
  • Posts: 1805
    • EditMasm
Re: A translator for sdk header files (64 and 32 bits translate)
« Reply #36 on: October 20, 2020, 02:23:33 AM »
Corrected,size_t SIZE_T, for headinc .Re-translate of Winbase.sdk to take count of the change in sdkrc100 (um).
ADDED the CUNI,CANS and CANS_UNI macro to create data in unicode and switch easily from ansi to UNI.
There is just need to define UNICODE to switch to unicode for the entire source.
Sample here http://masm32.com/board/index.php?topic=1796.msg19015#msg19015

For sdkrc100 and translatorus here:
http://luce.yves.pagesperso-orange.fr/header.htm
Some Inlines functions  are contents in crt10_32.lib (64) ; -:\sdkrc100\crt_lib\IX86\release\crt10_32.lib printf and more
Fa is a musical note to play with CL

TouEnMasm

  • Member
  • *****
  • Posts: 1805
    • EditMasm
Re: A translator for sdk header files (64 and 32 bits translate)
« Reply #37 on: January 18, 2021, 03:42:22 AM »

added extraction of prototypes in inlines functions,very useful now with recents headers,version 10.3.

Fa is a musical note to play with CL

jj2007

  • Member
  • *****
  • Posts: 11551
  • Assembler is fun ;-)
    • MasmBasic
Re: A translator for sdk header files (64 and 32 bits translate)
« Reply #38 on: January 18, 2021, 04:43:39 AM »
Good to see somebody is still coding here, Yves :thumbsup:

TouEnMasm

  • Member
  • *****
  • Posts: 1805
    • EditMasm
Re: A translator for sdk header files (64 and 32 bits translate)
« Reply #39 on: April 17, 2021, 04:52:15 PM »

modify the translation of  :
unsigned char EncryptionState[15][16];     

http://luce.yves.pagesperso-orange.fr/header.htm

Fa is a musical note to play with CL

LiaoMi

  • Member
  • ****
  • Posts: 922
Re: A translator for sdk header files (64 and 32 bits translate)
« Reply #40 on: April 17, 2021, 09:20:16 PM »

modify the translation of  :
unsigned char EncryptionState[15][16];     

http://luce.yves.pagesperso-orange.fr/header.htm

Hi TouEnMasm,

I don't see any fixes in SDK? Has something changed there? And there are no changes in the source section yet.
http://luce.yves.pagesperso-orange.fr/SourceCode.htm

TouEnMasm

  • Member
  • *****
  • Posts: 1805
    • EditMasm
Re: A translator for sdk header files (64 and 32 bits translate)
« Reply #41 on: April 17, 2021, 11:03:30 PM »
The fix is in headinc (10.4) who translate it now the good way (you can verify this translating test.txt).
Without promise,I will do what i can to modify the sdk files.
Fa is a musical note to play with CL

TouEnMasm

  • Member
  • *****
  • Posts: 1805
    • EditMasm
Re: A translator for sdk header files (64 and 32 bits translate)
« Reply #42 on: April 19, 2021, 03:01:02 AM »
I have corrected some  importants files in the header package.WinUser wincrypt ...
In headinc,I have made a full adaptation for  multi dimensionnal structures and constantes.
4 levels are needed by the sdk ,headinc can do 5.
Fa is a musical note to play with CL

TouEnMasm

  • Member
  • *****
  • Posts: 1805
    • EditMasm
Re: A translator for sdk header files (64 and 32 bits translate)
« Reply #43 on: May 26, 2021, 04:32:37 PM »
Hello,
Headinc hab been updated to translate the last sdk 10.0.19041.0
The translation of the typedef had been re-writed and use the ptr instead of changing it in XMASM
What is pointed on by the ptr is shown in comment to avoid the questions of the compiler.

The sdkrc100 begin a carefull update to the  10.0.19041.0 version.
At this time,only the files used by windows.h (80 files) and the CRT(vc dir) had beeen changed.
Fa is a musical note to play with CL

TouEnMasm

  • Member
  • *****
  • Posts: 1805
    • EditMasm
Re: A translator for sdk header files (64 and 32 bits translate)
« Reply #44 on: May 27, 2021, 04:18:39 PM »
Hello,
I made an oversight in the 10.6 version,corrected in the 10.7
I have also eliminates the risk with annotations in structures.
Fa is a musical note to play with CL