I can't seem to remember the tools to convert libraries(.lib) into dlls? And also extract information from libraries ... Can't even remember if such tools exists. Does anybody here remember the tools? :(
Posted on 2002-06-19 17:05:31 by stryker
Hi,

Copy from Ichelion "How toCreate your own MASM Import Libraries" Tutorial.



Creating MASM Import Libs from DLLs
If you are willing to push parameters on the stack and execute functions with call, you can create import lib from any DLL for use with MASM like this:
use dumpbin.exe which comes with Visual C++ to dump the names of the export functions in the DLL.
Dumpbin /EXPORTS blah.dll > output.txt
After you got the list of function names, create a module definition file (.def) from them. For example, if the function contains only one function, GetSomeLine, type the following lines into a text file:
LIBRARY blah
EXPORTS
GetSomeLine
Save it as blah.def
Run lib.exe to create the import lib from the module definition file, like this:

lib /DEF:blah.def
That's it. You'll get blah.lib which you can use with MASM so long as you don't use invoke with the functions in the import lib.



have nice days,
Posted on 2002-06-19 18:20:59 by CYDONIA
yes!! I now remember lib2def is the tool I was looking for.

Thanks!!! :alright:
Posted on 2002-06-19 19:58:35 by stryker
I have just finished a DLL to DEF tool that may help here. It will only do named functions, it does not support ordinals yet.

The main purpose of the tool is for people who have or write DLLs in non microsoft languages who need to construct an import library.

This tool automates the creation of the DEF file directly from the DLL.

Regards,

hutch@movsd.com
Posted on 2002-06-19 22:21:25 by hutch--
Nice tool hutch!!! ... I was also looking for this but since this has not existed yet (as far as I can remember) until now. I didn't asked the forum.

The reason I asked for the lib2def was I just need the names that existed on a particular library.

:alright: Nice Job! Works Great!
Posted on 2002-06-19 22:25:43 by stryker