Pelles C forum

C language => Tips & tricks => Topic started by: Vortex on June 16, 2005, 07:56:17 AM

Title: Definition file to MASM include file converter
Post by: Vortex on June 16, 2005, 07:56:17 AM
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
Title: Definition file to MASM include file converter
Post by: Vortex on October 08, 2005, 01:56:52 PM
Version 1.11
Now, the tool is redesigned to convert  module definiton files.
Quote
def2inc 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.
Title: def2inc another version
Post by: lvckyluke on June 01, 2006, 04:19:00 AM
here another version of def2inc..

program read def file that has quote/tab/space before function name,ordinals/hints,equivalent name,and comments..
Title: updated
Post by: lvckyluke on June 01, 2006, 06:20:09 PM
fix info
adding switch for icz file
Title: another version w/ msvcrt
Post by: lvckyluke on June 22, 2006, 09:38:08 PM
this version should read MASM/POASM definition file format..
for stdcall must be in decorated format..

POLIB def format
Code: [Select]

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


LINK def format
Code: [Select]

LIBRARY blabla
EXPORTS _func1@4    ; stdcall
EXPORTS _func2@8
EXPORTS func3          ; cdecl
...
Title: Re: Definition file to MASM include file converter
Post by: Vortex on December 09, 2007, 01:34:28 PM
Version 1.2

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

Code: [Select]
def2inc user32.def
Code: [Select]
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
Title: Re: Definition file to MASM include file converter
Post by: Vortex on June 24, 2008, 07:42:23 PM
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