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

ToutEnMasm

  • Member
  • *****
  • Posts: 1189
    • EditMasm
A translator for sdk header files (64 and 32 bits translate)
« on: August 15, 2012, 04:16:27 AM »
Hello,
Last modifie 25/02/2016
version 10.1.(download in one parts,don't view my next post)
It has been made for Win 10.0  and allow to build 64 or 32 bits prog.
He is now able to translate driver headers (km directory)
Support all windows , is a real translate with all features of a windows SDK .
Alignment,Unicode,...........
He is abble to answer the question "What is this and where it is defined",see multiple files translation
Usage:read the readme.rtf file in the zip.
Translate is now in this form:
Quote
UpdateLayeredWindow PROTO hWnd:HWND ,hdcDst:HDC ,pptDst:XMASM ,psize:XMASM ,hdcSrc:HDC ,\
         pptSrc:XMASM ,crKey:COLORREF ,pblend:XMASM ,dwFlags:DWORD

All Prototypes (API and interface) used the standard notation of masm .You have just to follow the SDK help files,usage is the same.

The translation need a very few changes to use what is translate.UNICODE is supported.
Are translated,constants,structures,enums,Interfaces ,prototypes, most common GUID and some macros.A comment (;API) is added before the prototypes to find them quickly(all prototypes are not API).The readme file in the zip say you more.
***************************************************************
This version have made the windows.sdk downloadable on my site
Problem at link solved,Some prototypes have the same name in interfaces and/or are duplicate.
This provide a "error LNK2001: unresolved external symbol"
The title INTERFACE_API_CONFLIT_NOM added in egales.txt is here to solve this

***************************************************************
Before translate anything,have a look at the full set of SDK header files translated (crt 2013 included)
http://masm32.com/board/index.php?topic=563.0

VC++ 2008 header's file translated ( CRT )
http://masm32.com/board/index.php?topic=573.0
=========================================== 

////////////////////////////////// C++ library //////////////////////////////////////////
The defaut prototype is C for the header of the C++,it's not like that in the SDK.
So you have to manually (use an editor) to change:
PROTO ------> PROTO C
You can also have functions with a decorated name in the library.
Use this tool:
http://masm32.com/board/index.php?topic=580.msg4701#msg4701

===================== Dynamic load of functions ============
Some functions could be only used by dynamic load of the dll.
It's the case for the opengl extensions.
In other cases,you haven't the lib or this one change too often.
A dynamic load is also an answer in this cases.
Use this tool:
http://masm32.com/board/index.php?topic=581.msg4705#msg4705
« Last Edit: April 16, 2017, 05:37:23 PM by ToutEnMasm »
Fa is a musical note to play with CL

Gunther

  • Member
  • *****
  • Posts: 3517
  • Forgive your enemies, but never forget their names
Re: A translator for sdk header files
« Reply #1 on: August 15, 2012, 05:14:31 AM »
Hi ToutEnMasm,

well done  :t

Gunther
Get your facts first, and then you can distort them.

Siekmanski

  • Member
  • *****
  • Posts: 1145
Re: A translator for sdk header files
« Reply #2 on: August 15, 2012, 06:41:26 PM »
Unfortunately I can't download the file "http://luce.yves.pagesperso-orange.fr/sdkrc7.cab"
Connection to the server is broken when starting downloading or at 99% of the download.
Now and then I try to download it again but no succes.   :(

ToutEnMasm

  • Member
  • *****
  • Posts: 1189
    • EditMasm
Re: A translator for sdk header files
« Reply #3 on: August 16, 2012, 12:12:31 AM »
Quote
Unfortunately I can't download the file "http://luce.yves.pagesperso-orange.fr/sdkrc7.cab"
it seems there is some problems with my internet provider.I have also some problems to connect my site.
Try later...





Later: part of the translator to download
« Last Edit: December 22, 2014, 08:35:31 PM by ToutEnMasm »
Fa is a musical note to play with CL

jj2007

  • Member
  • *****
  • Posts: 7752
  • Assembler is fun ;-)
    • MasmBasic
Re: A translator for sdk header files
« Reply #4 on: August 16, 2012, 01:00:06 AM »
If it wasn't 17 MB, I'd post it here... ::)

ToutEnMasm

  • Member
  • *****
  • Posts: 1189
    • EditMasm
Re: A translator for sdk header files
« Reply #5 on: September 16, 2012, 03:08:02 AM »
Hello,
I have posted a new version of the translator.

The translation will give you the same advantages as the windows sdk.
Alignment is the same as c++,64 bits ,unicode and ++.
At the instant only the windows sdk had all this.
Other need a modify of there text files.

I have no way to test the 64 bits usage.
Reports on it's use will be usefull.




Fa is a musical note to play with CL

ToutEnMasm

  • Member
  • *****
  • Posts: 1189
    • EditMasm
Re: A translator for sdk header files
« Reply #6 on: September 17, 2012, 06:47:53 AM »
 :icon_mrgreen:
I had forgotten to write the 32_64 values in the prototypes.
Mistake corrected.
Fa is a musical note to play with CL

ToutEnMasm

  • Member
  • *****
  • Posts: 1189
    • EditMasm
Re: A translator for sdk header files
« Reply #7 on: September 22, 2012, 04:47:30 AM »

New version posted had made the "ready to use sdk 7.1" working exactly as the original windows sdk.
Fa is a musical note to play with CL

GoneFishing

  • Member
  • ****
  • Posts: 967
  • Gone fishing
Re: A translator for sdk header files
« Reply #8 on: March 16, 2013, 03:43:24 AM »
Hello ToutEnMasm!

Thank you for reply and link to your post. I've already downloaded headinc.zip . I'll try it.
I'm making my first steps in MASM and it's important for me to understand how to translate C++ headers to MASM includes.

GoneFishing

  • Member
  • ****
  • Posts: 967
  • Gone fishing
Re: A translator for sdk header files
« Reply #9 on: March 19, 2013, 05:07:49 AM »
I've just translated several headers. Your utility is very easy to use and fast. But dbgeng.h has two dependencies which in turn have their own ones and so on ... so I've downloaded your sdkrc7 .cab (without any problems)
Thanks!

Magnum

  • Member
  • *****
  • Posts: 2242
Re: A translator for sdk header files
« Reply #10 on: March 19, 2013, 05:50:45 AM »
I do not understand how these are used.

Thanks,
              Andy
Take care,
                   Andy

Ubuntu-mate-16.04-desktop-amd64

http://www.goodnewsnetwork.org

ToutEnMasm

  • Member
  • *****
  • Posts: 1189
    • EditMasm
Re: A translator for sdk header files
« Reply #11 on: September 23, 2014, 05:15:49 PM »

New version to adapt it to Windows 8.1
** Update of the list of variables (egales.txt)
     This avoid your favorite nightmare,What is this and where it is who generate errors at compile time.

** Many useless (for masm) defines added by MIDL are filtered.
** The search for duplicates names between api and interfaces fonctions is automatised (cherche_duplicate.txt)
    a 1 is added at the end of the interface name function.Made link happy.
** define values too long for ml are cutted in pieces (max 254).
** one correction  Machin bidule[] generate a dword
and more
 
Fa is a musical note to play with CL

ToutEnMasm

  • Member
  • *****
  • Posts: 1189
    • EditMasm
Re: A translator for sdk header files
« Reply #12 on: September 25, 2014, 12:46:49 AM »

corrected problem with _when_ (generating bad prototypes)
Fa is a musical note to play with CL

ToutEnMasm

  • Member
  • *****
  • Posts: 1189
    • EditMasm
Re: A translator for sdk header files
« Reply #13 on: September 26, 2014, 05:06:06 PM »

Posted the version who had made the ready to use sdk 8.1.
It's a little too much filtered to be sure not to fall on a comment.
The file specstrings_undef.sdk is the image of that.
Fa is a musical note to play with CL

ToutEnMasm

  • Member
  • *****
  • Posts: 1189
    • EditMasm
Re: A translator for sdk header files
« Reply #14 on: October 02, 2014, 05:27:44 PM »

Added the translation of conditionnal prototypes ,with #if #else #endif inside,I's the more current form.
Added in structure translation of  ,,; ex:RECT rect,recta,rectb;
added translation of #define Fillmystructure {,,,35]
small modified to decrease the number of manual corrections.
Most often,you have to modify duplicate name who can't be corrected all.
Fa is a musical note to play with CL