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

Gunther

  • Member
  • *****
  • Posts: 3517
  • Forgive your enemies, but never forget their names
Re: A translator for sdk header files
« Reply #15 on: October 02, 2014, 10:05:24 PM »
ToutEnMasm,

is it the current zip file under the first post of this thread?

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

ToutEnMasm

  • Member
  • *****
  • Posts: 1189
    • EditMasm
Re: A translator for sdk header files
« Reply #16 on: October 03, 2014, 12:16:52 AM »

Yes ,he is in the first post.
 
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 #17 on: October 03, 2014, 02:08:25 AM »
Thank you, ToutEnMasm.

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

ToutEnMasm

  • Member
  • *****
  • Posts: 1189
    • EditMasm
Re: A translator for sdk header files
« Reply #18 on: October 03, 2014, 04:28:04 AM »

corrected a problem with multiple files translation.This is done in a thread and the heap memory was fragmented.There was less variables found and more Unknown(inconnu) generated.
Fa is a musical note to play with CL

ToutEnMasm

  • Member
  • *****
  • Posts: 1189
    • EditMasm
Re: A translator for sdk header files
« Reply #19 on: October 09, 2014, 06:08:22 PM »
Added the missing alignment on Union.
Headinc align now in the same way as the c++ instruction
#pragma pack(push,N)   
#pragma pack(pop)

To view the alignment:
#pragma pack(show)   
or
SHOW_ALIGNMENT   STRUCT DEFALIGNMASM
;SHOW_ALIGNMENT size=18h BYTE,1Ah WORD,1CH DWORD,20h QWORD
   zaaaff QWORD ?
   xbaaff BYTE ?
   ycaaff DWORD ?
   wdaaff WORD ?
   qeaaff BYTE ?
   rfaaff QWORD ?
SHOW_ALIGNMENT      ENDS

« Last Edit: October 09, 2014, 11:20:29 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 #20 on: October 10, 2014, 04:12:50 AM »
Thank you, ToutEnMasm.  :t

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

ToutEnMasm

  • Member
  • *****
  • Posts: 1189
    • EditMasm
Re: A translator for sdk header files
« Reply #21 on: November 20, 2014, 09:02:03 PM »
Minor changes
Quote
#define SRCCOPY             (DWORD)0x00CC0020 /* dest = source */ ;corrected
#define SRCCOPY             0x00CC0020
_aaaaaaaaaaaaaaaaa              ();corrected
_aaaaaaaaaaaaaaaaa()
The 8.4 version wait the next windows sdk before new changes
Fa is a musical note to play with CL

ToutEnMasm

  • Member
  • *****
  • Posts: 1189
    • EditMasm
Re: A translator for sdk header files
« Reply #22 on: November 21, 2014, 03:12:59 AM »
corrected a bug  :icon_mrgreen:
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 #23 on: November 21, 2014, 07:19:48 AM »
Hi ToutEnMasm,

thank you for sharing it. Good work.

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

ToutEnMasm

  • Member
  • *****
  • Posts: 1189
    • EditMasm
Re: A translator for sdk header files (64 and 32 bits translate)
« Reply #24 on: October 01, 2015, 07:20:55 PM »
New version
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
Argument of prototype  like "float Number[4]" are translated as structure
Cherche_Duplicate.txt avoid duplicate between  Interface fonctions and api who generate link errors.
some more corrections ..
Fa is a musical note to play with CL

ToutEnMasm

  • Member
  • *****
  • Posts: 1189
    • EditMasm
Re: A translator for sdk header files (64 and 32 bits translate)
« Reply #25 on: October 12, 2015, 04:49:56 AM »

Full update for Windows 10.0 (Cherche_Duplicate.txt who avoid problems at link)
Added a filter on the prototypes Argument. offset:DWORD = aoffset:DWORD
see INCOMPATIBLE in egales.txt,you can modifie the list as you want.
Fa is a musical note to play with CL

ToutEnMasm

  • Member
  • *****
  • Posts: 1189
    • EditMasm
Re: A translator for sdk header files (64 and 32 bits translate)
« Reply #26 on: December 15, 2015, 07:37:22 PM »
added strsafe functions (inline) to the crt lib (Windows 10 inline functions)
macros_forum.inc added ,macros of the masm32 package usable with the translated sdk
small modifies.
error
http://masm32.com/board/index.php?topic=563.msg4563#msg4563
Fa is a musical note to play with CL

ToutEnMasm

  • Member
  • *****
  • Posts: 1189
    • EditMasm
Re: A translator for sdk header files (64 and 32 bits translate)
« Reply #27 on: February 14, 2016, 08:27:12 PM »
New version (Windows 10 headers)
---- Translate c++ interface , the d2XXX.h will be fully translated.
---- Extended his use to the driver headers.
The translate of structures accept now complex forms with macros and proto.
usual updates,more filters.
Fa is a musical note to play with CL

ToutEnMasm

  • Member
  • *****
  • Posts: 1189
    • EditMasm
Re: A translator for sdk header files (64 and 32 bits translate)
« Reply #28 on: February 26, 2016, 02:06:56 AM »
Further modifies to fulfill the km directorie:
C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\km

Further files need to be modifies before translate.
This version give better informations to find wich ( or ) is missed in one block of (())(()))
Macro with structure arguments Inside are not translate.
to do that ,change the c++ macro in c++ structure and rename the translate  a MACRO.

This complex form of structure:
Quote
typedef struct _CLS_SCAN_CONTEXT
{
    CLFS_NODE_ID cidNode;
    PLOG_FILE_OBJECT plfoLog;
    __declspec(align(8)) ULONG cIndex;
    __declspec(align(8)) ULONG cContainers;
    __declspec(align(8)) ULONG cContainersReturned;
    __declspec(align(8)) CLFS_SCAN_MODE eScanMode;
    __declspec(align(8)) PCLS_CONTAINER_INFORMATION pinfoContainer;
   
} CLS_SCAN_CONTEXT, *PCLS_SCAN_CONTEXT, **PPCLS_SCAN_CONTEXT;
is translated like that
Quote
CLS_SCAN_CONTEXT   STRUCT DEFALIGNMASM
   cidNode CLFS_NODE_ID ?
   plfoLog PLOG_FILE_OBJECT ?
__declspec(align(8))
   cIndex DWORD ?
__declspec(align(8))
   cContainers DWORD ?
__declspec(align(8))
   cContainersReturned DWORD ?
__declspec(align(8))
   eScanMode BYTE ?
__declspec(align(8))
   pinfoContainer PCLS_CONTAINER_INFORMATION ?
CLS_SCAN_CONTEXT      ENDS

The translater let's you rewrite the __declspec MACRO as you want (align 8 is enough).


Fa is a musical note to play with CL