Re: Using DLLs generated by BlackBox

From: [at]} <Stewart>
Date: Fri, 06 Apr 2001 12:17:28 +0800

Folks,

I've always found it hard to get dlltool/dllwrap to do the right thing.
Even with --export-all-symbols, it only seems to export symbols in the
symbol table. In this situation, I think you need to process the ordinals
table, at least to generate a .DEF file.

Assuming you have Visual C, do:

  dumpbin /exports mydll.dll

You should get:

<QUOTE>
Dump of file mydll.dll

File Type: DLL

  Section contains the following exports for Mydll.dll

           0 characteristics
    30AA173C time date stamp Thu Nov 16 00:37:16 1995
        0.00 version
           1 ordinal base
           2 number of functions
           2 number of names

    ordinal hint RVA name

          1 0 00001035 Gcd
          2 1 0000106D Lcm
</QUOTE>


This last bit should be enough to reconstruct a .DEF file. For example:

  EXPORTS
    Gcd {([at]})nowhere.xy
    Lcm {([at]})nowhere.xy

or something like that. I would be surprised if there is not a utility
somewhere to do this. If not, it should be possible to process the output
of dumpbin to generate a .DEF file. That would get around the problem that
Blackbox does not output .DEF or .EXP files when it generates DLLs.

Its unfortunate that Microsoft's shared library architecture requires this
sort of nonsense (ie. separate .DLL, .DEF, .LIB, and .H files). They could
easily have done a better job.

I hope this helps.

Cheers,
  Stewart

"Danforth, Douglas" wrote:
>
> Greg, et. al.,
>
> There seems to be a dlltool.exe that is purported to
> generate .def files from .dll from which one can then
> with a imptool.exe generate an import liberary .lib,
> HOWEVER,
> I have tried dlltool.exe and have not been able to
> successfully export the symbols within the dll.
>
> Using the BB hex form to open the dll I can see the two
> functions 'Gcd' and 'Lcm'. But when I run dlltool
> it claims there are no 'symbols' and does not put
> them into the .def file.
>
> dlltool.exe also has a '-l' switch that specifies an
> 'interface library' which may be an 'import library'
> but since it doesn't see the symbols in the dll it
> also does not put them in the .lib file.
>
> I have the source for dlltool.c but with all the
> #includes (which are part of the GNU package) and
> the number of #define I don't think it is in my
> favor to attempt to convert it to Component Pascal.
> Still searching for a solution ...
>
> Some URLs:
> Documentation for executing dlltool.exe
> http://muffin.physik.uni-bremen.de/cgi-bin/info2html?(binutils)dlltool
>
> dlltool.c and dlltool.exe download site
> http://chronos.cs.msu.su/MinGW32/Khan_Mumit/snapshots/dlltool/
>
> ---
> Douglas G. Danforth, Ph.D. - Research Scientist
> QuikCAT.com 6700 Beta Drive, Suite 200, Mayfield Village, OH 44143-2335
> danforth{([at]})nowhere.xy
>
> ]-----Original Message-----
> ]From: Greg Edwards [mailto:gedwards{([at]})nowhere.xy
> ]Sent: Wednesday, April 04, 2001 12:10 PM
> ]To: Danforth, Douglas
> ]Subject: RE: Using DLLs generated by BlackBox
> ]
> ]
> ]Hi Doug,
> ]
> ]If you figure this out, could you let me (and the BBList) know
> ]how you did
> ]it because I'd like to do the same thing!
> ]
> ]Thanks, and hope things are going well.
> ]-Greg
> ]
> --------------------------------------------
>
> To unsubscribe from this mailing list, send a message containing the word "unsubscribe" to:
> blackbox-request{([at]})nowhere.xy
>
> To get a list of valid e-mail commands and instructions on their usage, send a message containing the word "help" to the above address.
>
> Send any problem reports or questions related to this email list to the list owner at
> owner-blackbox{([at]})nowhere.xy
--------------------------------------------

To unsubscribe from this mailing list, send a message containing the word "unsubscribe" to:
   blackbox-request{([at]})nowhere.xy

To get a list of valid e-mail commands and instructions on their usage, send a message containing the word "help" to the above address.

Send any problem reports or questions related to this email list to the list owner at
   owner-blackbox{([at]})nowhere.xy
Received on Fri Apr 06 2001 - 04:17:28 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:27:44 UTC