Thread overview
Going to create a tool for importing libs
Jul 24, 2001
SStallone
Jul 24, 2001
Cesar Rabak
Jul 25, 2001
SStallone
Jul 25, 2001
Cesar Rabak
Oct 14, 2001
LM
July 24, 2001
I try to create a tool that helps creating the right .def files for DLL.

this is thought so

sc xxxx.c > imp.def

then my tool will remove all error messages but not the import names with @x then it adds EXPORTS to first line of imp.def

you must enter the names of dlls that are needed in the imp.def file manually.

perhaps someone has a good idea for doing this automaticially

stay tuned perhaps i manage it or i will never sleep well



July 24, 2001
SStallone wrote:
> 
> I try to create a tool that helps creating the right .def files for DLL.
> 
> this is thought so
> 
> sc xxxx.c > imp.def
> 
> then my tool will remove all error messages but not the import names with @x then it adds EXPORTS to first line of imp.def
> 
> you must enter the names of dlls that are needed in the imp.def file manually.
> 
> perhaps someone has a good idea for doing this automaticially

If the only remaining task is to remove the @x it can be done easily with scripting languages like AWK, Perl or (my favorite) Python*.

> 
> stay tuned perhaps i manage it or i will never sleep well

HTH

Cesar

(*) and yes I _know_ about Ruby, but have not personal experience with
it!
July 25, 2001
> If the only remaining task is to remove the @x it can be done easily with scripting languages like AWK, Perl or (my favorite) Python*.

That's not correct. We MUST add these @x suffixes to the .def files as M$
semms to have them cut out of the dll. Bad M$. I still don't know why C++
needs these suffixes. Thes suffixes stand for the total ammount of bytes
that are used by parameters.
    @0 means this function has no parameters
    @4 means this function has 4 bytes of parameters (2 WORDS or 1 DWORD)

I even believe that these informations ARE in the dll. You only need to fund them.


Best regards
Chris (from Germany)



July 25, 2001
SStallone wrote:
> 
> > If the only remaining task is to remove the @x it can be done easily with scripting languages like AWK, Perl or (my favorite) Python*.
> 
> That's not correct. We MUST add these @x suffixes to the .def files as M$
> semms to have them cut out of the dll. Bad M$. I still don't know why C++
> needs these suffixes. Thes suffixes stand for the total ammount of bytes
> that are used by parameters.
>     @0 means this function has no parameters
>     @4 means this function has 4 bytes of parameters (2 WORDS or 1 DWORD)
> 
> I even believe that these informations ARE in the dll. You only need to fund them.

When we arrive at a means to get this info, we can automate it! In fact adding @x to .def files is even easier. .
October 14, 2001
sstallone@gmx.de (SStallone) wrote in <9jj2d4$sjt$1@digitaldaemon.com>:
>I try to create a tool that helps creating the right .def files for DLL.

Don't know if the object file formats are compatible, but the mingw compiler has some tools for creating .def files from standard DLLs.  For more information, check pexports at http://www.is.lg.ua/~paul/devel/binutils.html and impdef at http://www.geocities.com/Tokyo/Towers/6162/impdef.zip

Hope this is useful.

Laura
http://groups.yahoo.com/group/CppDesign