Definition file to MASM include file converter

Started by Vortex, June 16, 2005, 07:56:17 AM

Previous topic - Next topic

Vortex

def2inc converts a definition file created by Iczelion's lib2def tool to MASM include files containing function prototypes. The definition files ( .icz ) are created from Pelle's import libraries.Using Iczelion's lib2def tool supported by def2inc is a simple methode to create MASM include files from MS COFF import libraries.Notice that the tool should be at the same directory where the .icz definitions files are located. def2inc accepts wildcards like *.inc

To get information about lib2def :

http://spiff.tripnet.se/~iczelion/importlib.html
Code it... That's all...

Vortex

Version 1.11
Now, the tool is redesigned to convert  module definiton files.
Quotedef2inc converts a module definition file to MASM include files containing function prototypes. Notice that the tool should be at the same directory where the module definitions files are located. def2inc accepts wildcards like *.def

The module definition file should have the following format :

LIBRARY kernel32
EXPORTS
"_ActivateActCtx@8"
"_AddAtomA@4"
"_AddAtomW@4"
etc.
Code it... That's all...

lvckyluke

here another version of def2inc..

program read def file that has quote/tab/space before function name,ordinals/hints,equivalent name,and comments..

lvckyluke

fix info
adding switch for icz file

lvckyluke

this version should read MASM/POASM definition file format..
for stdcall must be in decorated format..

POLIB def format

LIBRARY blabla
"_func1@4"     ; stdcall
"_func2@12"
"func3"           ; cdecl
...


LINK def format

LIBRARY blabla
EXPORTS _func1@4    ; stdcall
EXPORTS _func2@8
EXPORTS func3          ; cdecl
...

Vortex

Version 1.2

Some functions have also an ANSI version, the new swicth -d will display duplicate symbols :

def2inc user32.def

Duplicate name in user32.def , BroadcastSystemMessage
Duplicate name in user32.def , CallMsgFilter
Duplicate name in user32.def , GetAltTabInfo
Duplicate name in user32.def , GetWindowModuleFileName
Duplicate name in user32.def , IsDialogMessage
Duplicate name in user32.def , RealGetWindowClass
Duplicate name in user32.def , TranslateAccelerator


Only the ANSI version of those functions are passed to the final include file.

http://www.vortex.masmcode.com/files/def2inc12.zip
Code it... That's all...

Vortex

Version 2.0

- New version coded with Pelle's C development tools V5.0
- String handling tasks moved to assembly subroutines
- No any dependency to msvcrt.dll

http://vortex.masmcode.com/files/def2inc20.zip
Code it... That's all...