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

LiaoMi

  • Member
  • ****
  • Posts: 729
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: 1574
    • 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: 729
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: 1574
    • 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: 1574
    • 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: 729
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: 1574
    • 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: 1574
    • 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: 11135
  • 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: