Hi friends,
Here is my tool converting MS COFF import libraries to MASM include files.
Tested with import libraries coming with Hutch's masm32 package and PellesC V3.00
The tool accepts wildcards like *.lib
http://vortex.masmcode.com/files/lib2inc10.zip
Hi Erol,
You have certainly been a busy lad creating all these nice tools and we are all better off for it.
You have 'my' thanks,
Paul
Thanks Vortex :U
Hi friends,
Here is lib2inc V1.1 :
- Fixed bug with duplicate names from user32.lib ( Many thanks Paul informing me about the bug )
The tool is able to extract fuction prototypes from static libraries. If you have the time, could you test the tool with static libs?
http://vortex.masmcode.com/files/lib2inc11.zip
Here is the include file set extracted from Pelles import libraries V 4.00 beta1 :
http://vortex.masmcode.com/files/PellesC_incV11.zip
Hi Erol,
That was quick, I will check it out later today. Thank you.
Paul
Great job Vortex :U
Here is version V1.11 :
- Fixed bug : lib2inc is now able to extract function names with leading @ :
@DnsGetDomainName PROTO :DWORD
@DnsIsAMailboxType PROTO :DWORD
etc...
http://vortex.masmcode.com/files/lib2inc111.zip
http://vortex.masmcode.com/files/PellesC_inc111.zip
Here are the include files extracted from PellesC library set V4.00 beta 3 :
http://vortex.masmcode.com/files/PellesC4b3_inc.zip
Here is lib2inc V1.2 translated to Poasm. Now, the tool supports both MASM and POASM
http://vortex.masmcode.com/files/lib2inc12.zip
Include file set extracted from Pelles import libraries 4.00.50
http://vortex.masmcode.com/files/PellesC_inc12.zip
Here is lib2inc V1.3 supporting static libraries. To create an include file from a static library :
lib2inc statlib.lib -s
As usually, creating include files from import libraries :
lib2inc importlib.lib
http://vortex.masmcode.com/files/lib2inc13.zip
Here is lib2inc V2.0 now supporting Fasm.
Usage : lib2inc libfile.lib [options]
Switches :
-s : set global calling convention to STDCALL for MASM \ POASM
MessageBoxA PROTO STDCALL :DWORD,:DWORD,:DWORD,:DWORD
-fd : output EXTERNDEFs for Fasm - direct calls
lib2inc outputs include files enabling direct function calls
EXTERNDEF '_MessageBoxA@16',MessageBox
-fi : output EXTERNDEFs for Fasm - indirect calls
lib2inc outputs include files enabling indirect function calls
EXTRNDEF '__imp__MessageBoxA@16',MessageBox
If the user doesn't specify any optinonal parameter then the tool emits standard include files for Masm.
http://vortex.masmcode.com/files/lib2inc20.zip
Hi Vortex,
Your tools keep getting better. Take a rest every now and then.
Paul
Hi Paul,
Thanks for your support.
Version 2.1 supporting LzAsm :
Switches :
Quote-s : set global calling convention to STDCALL for MASM \ POASM
MessageBoxA PROTO STDCALL :DWORD,:DWORD,:DWORD,:DWORD
MessageBox equ <MessageBoxA>
-fd : output EXTERNDEFs for Fasm - direct calls
lib2inc outputs include files for direct function calls
EXTERNDEF '_MessageBoxA@16',MessageBox
-fi : output EXTERNDEFs for Fasm - indirect calls
lib2inc outputs include files for indirect function calls
EXTRNDEF '__imp__MessageBoxA@16',MessageBox
-lz : output LzAsm include files
lib2inc outputs include files for LzAsm
PROCDESC MessageBoxA :DWORD,:DWORD,:DWORD,:DWORD
MessageBox equ <MessageBoxA>
http://vortex.masmcode.com/files/lib2inc21.zip
Thanks, keep up the excellent work. :U
Hi Mark,
Thanks for your support.
Vortex,
Thanks for this tool. I use it (and have used it for some time now) in all of my library projects (some of which are written in C) to automatically construct my includes for use with MASM. Very useful.
Regards,
Tim
Hi Tim,
Thanks for your kind words.
Version 2.2 supporting Solar Assembler.
An example :
lib2inc kernel32.lib -so
extern ActivateActCtx alias _ActivateActCtx@8
extern AddAtom alias _AddAtomA@4
extern AddAtomW alias _AddAtomW@4
extern AddConsoleAlias alias _AddConsoleAliasA@12
.
.
.
The zip file includes a SolAsm COFF example linked with Pelle's linker Polink.
http://vortex.masmcode.com/files/lib2inc22.zip
Added SolAsm support :
http://vortex.masmcode.com/files/lib2inc22.zip