A Translator for SDK header files

Started by ToutEnMasm, August 08, 2006, 08:55:36 AM

Previous topic - Next topic

ToutEnMasm

This work because you don't use the official name for the GUID
in the winioctl.h , we find
Quote
DEFINE_GUID(GUID_DEVINTERFACE_DISK,                   0x53f56307L, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
//
// Obsolete device interface class GUID names.
// (use of above GUID_DEVINTERFACE_* names is recommended).
//
#define DiskClassGuid               GUID_DEVINTERFACE_DISK

This put  GUID_DEVINTERFACE_DISK as the official name , the translate need to create a named TEXTEQU . This is done creating the sGUID_DEVINTERFACE_DISK who refer to the official name.
Like that When you want to use a guid , there is nothing to search.

Official_Name GUID sOfficial_Name                        ;It is a rule used by many coders and windows.inc

If i take your code , You have created the DISK_GUID  who refers to nothing and need a search to know what is it.
sGUID_DEVINTERFACE_DISK  refers to GUID_DEVINTERFACE_DISK and need no search





azdps

do you think it would be a good idea to have your translator translate the following to:

sGUID_DEVINTERFACE_DISK  TEXTEQU  <{053f56307h,0b6bfh,011d0h,{094h,0f2h,000h,0a0h,0c9h,01eh,0fbh,08bh}}>
GUID_DEVINTERFACE_DISK  GUID  sGUID_DEVINTERFACE_DISK

and have it stored in the include file instead of just:

sGUID_DEVINTERFACE_DISK  TEXTEQU  <{053f56307h,0b6bfh,011d0h,{094h,0f2h,000h,0a0h,0c9h,01eh,0fbh,08bh}}>

?

ToutEnMasm


The TEXTEQU don't generate data,it's only a declaration.

the
Quote
GUID_DEVINTERFACE_DISK  GUID  sGUID_DEVINTERFACE_DISK
could be place only in data en generate binary in the executable file.If I do that, all the GUID off the SDK will be added to the data.It's really not usefull .

azdps


feicong

 hi ,
ToutEnMasm
i build a test for the example of the link: http://pagesperso-orange.fr/luce.yves/Masm_C++.htm
but return many Errors:

Quote
D:\RadASM\Masm32\Include\sdk\sdkddkver.sdk(164) : error A2006: undefined symbol : NOTDEFINED
D:\RadASM\Masm32\Include\sdk\sdkddkver.sdk(204) : error A2006: undefined symbol : DEFINED
D:\RadASM\Masm32\Include\sdk\crtdefs.SDK(220) : error A2005: symbol redefinition : __GOT_SECURE_LIB__
D:\RadASM\Masm32\Include\sdk\crtdefs.SDK(549) : error A2008: syntax error : [
D:\RadASM\Masm32\Include\sdk\crtdefs.SDK(552) : error A2005: symbol redefinition : refcount
D:\RadASM\Masm32\Include\sdk\crtdefs.SDK(554) : fatal error A1010: unmatched block nesting

i don't know what it means!


ToutEnMasm

Hello,
Quote
error A2006: undefined symbol : NOTDEFINED
This symbol is a macro defined in translate.inc.Include translate.inc before the .sdk include files and you will have many less errors.

ToutEnMasm

My first mail give the new version of the translator.
This one have:
     UPDATES for SDK 7.1  (egales.txt have many modifies)
     *corrections made in the code (a few errors was possibles).
     * typedef reports in comment when not used.
     * make you happy if you translate header files generated by midl

     

azdps

ToutEnMasm keep up the great work on your header file translator it works great. :U Is the source code available for download? I would like to see some changes to the gui to make it even easier to use.

ToutEnMasm

Quote
ToutEnMasm keep up the great work on your header file translator it works great.  Is the source code available for download? I would like to see some changes to the gui to make it even easier to use
Thanks for the compliments.Source code isn't available for download (except if i have a warranty he is keep by the masm32 community).I don't want that other assemblers use it.
If you want some changes , put them here.Perhaps if I have some times, I will made them.

ToutEnMasm


Here a usefull trick:
The windows SDK give some CRT headers who are out of date.
To have the c++ header loaded,put them just after translate.inc

ToutEnMasm


Another trick to find all you want in the sdkrc7:
Open sdkrc7\liste.txt
This file contain functions,structures,interfaces,defined dword ... translated from the windows sdk.
You can search one of those names  (search edit box ).
When you have find it ,go UP in the text file and you find the name of his header file .h
Open the .sdk and you have all  the declarations needed.