I currently have a .dll, one of whose functions I need. While I could LoadLibrary the thing, I somehow prefer having it linked directly (since I have to show my code..... hehehe I'm using ASM where most of my batchmates are using VB or C....). However I believe MASM cannot link directly to a dll, it needs a .lib file to link to the .dll. I guess I could rewrite the dll so that I can make the lib (all I really need is to access an I/O port in WinME or lower.... so I just need to write mov edx,dword ptr mov eax,dword ptr out dx,al in a dll routine.... or do I need to do something else in addition to that?).
I think I once read somewhere right on these boards about someone complaining about masm being unable to link .dll without their associated .lib, then someone showed how to get a .lib from an existing .dll..... but I can't remember it! >.<
And yeah it's been a long time since I've actually posted here, or even (gasp!) programmed wafuuuuuuuuuuuuu!!!
I think I once read somewhere right on these boards about someone complaining about masm being unable to link .dll without their associated .lib, then someone showed how to get a .lib from an existing .dll..... but I can't remember it! >.<
And yeah it's been a long time since I've actually posted here, or even (gasp!) programmed wafuuuuuuuuuuuuu!!!
AmkG,
i dont know if i got the question right, but seens to me you can use IMPLIB.EXE tool.
ancev
i dont know if i got the question right, but seens to me you can use IMPLIB.EXE tool.
ancev
Yeah, I *think* that's what I was looking for.............
I forgot that the .lib of a .dll is called an IMPORT LIBRARY AAARG........... thx.
Obviously I haven't been programming in a LOONG WHILE. Thanks again.
I forgot that the .lib of a .dll is called an IMPORT LIBRARY AAARG........... thx.
Obviously I haven't been programming in a LOONG WHILE. Thanks again.
Hi AmkG,
If you want an import library with decorated names,here is the solution:
-Create an include file full with the function prototypes coming from your DLL.
-After,run Hutch's include to library tool (inc2l) to get an import library for your DLL
inc2l comes with the Masm32 package.
Second,if you would like to use import libraries with non-decorated names, you can try my dll2lib
If you want an import library with decorated names,here is the solution:
-Create an include file full with the function prototypes coming from your DLL.
myfunc1 PROTO :DWORD,:DWORD,:DWORD
func2 PROTO :DWORD,:DWORD
etc...
-After,run Hutch's include to library tool (inc2l) to get an import library for your DLL
inc2l comes with the Masm32 package.
Second,if you would like to use import libraries with non-decorated names, you can try my dll2lib
Thanks vortex! Anyway it seems I have a really OLD copy of MASM32...... I don't have inc2l in the bin directory (I think the MASM32 I have is v7 or v6...)
l2inc says the library has no imports........ just how is dll2lib used?
AmkG,
There is a MASM32 tool where you write the include file yourself and run it and it will produce a library from that include file. It works fine when you have a DLL from another language or don't have the normal library built with a DLL using MASM.
Regards,
http://www.asmcommunity.net/board/cryptmail.php?tauntspiders=in.your.face@nomail.for.you&id=2f46ed9f24413347f14439b64bdc03fd
There is a MASM32 tool where you write the include file yourself and run it and it will produce a library from that include file. It works fine when you have a DLL from another language or don't have the normal library built with a DLL using MASM.
Regards,
http://www.asmcommunity.net/board/cryptmail.php?tauntspiders=in.your.face@nomail.for.you&id=2f46ed9f24413347f14439b64bdc03fd
Yep! My old MASM32 package doesn't have it, but I found it pretty quick. It APPEARS to work, but since I'm doing hardware interfacing without the hardware (hehehe) I can't check if I'm doing it right. But I AM pretty sure it works.
Many thanks!
Many thanks!
I guess I could rewrite the dll so that I can make the lib (all I really need is to access an I/O port in WinME or lower.... so I just need to write mov edx,dword ptr mov eax,dword ptr out dx,al in a dll routine.... or do I need to do something else in addition to that?).
Corect me if I'm wrong but I don't think it is possible to access I/O ports from win9x.
From a DLL it is ;) I think :rolleyes:
l2inc says the library has no imports........ just how is dll2lib used?
You just specify the name of the DLL:
dll2lib kernel32.dll