News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

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

Gunther

ToutEnMasm,

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

Gunther
You have to know the facts before you can distort them.

TouEnMasm

Fa is a musical note to play with CL

Gunther

You have to know the facts before you can distort them.

TouEnMasm


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

TouEnMasm

#19
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

Fa is a musical note to play with CL

Gunther

You have to know the facts before you can distort them.

TouEnMasm

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

TouEnMasm

#22
corrected a bug   :mrgreen:
Fa is a musical note to play with CL

Gunther

Hi ToutEnMasm,

thank you for sharing it. Good work.

Gunther
You have to know the facts before you can distort them.

TouEnMasm

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

TouEnMasm


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

TouEnMasm

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

TouEnMasm

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

TouEnMasm

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

TouEnMasm

Final version is here in english(US)
https://github.com/ToutEnMasm71100

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.
Fa is a musical note to play with CL