Article View: borland.public.cppbuilder.nativeapi
Article #6632Re: DLL Question
From: Remy Lebeau (TeamB)
Date: Wed, 20 Apr 2005 22:24
Date: Wed, 20 Apr 2005 22:24
33 lines
2114 bytes
2114 bytes
"Stephane Baillargeon" <solutionsgestico@sympatico.ca> wrote in message
news:4266cd84$1@newsgroups.borland.com...
> - How do I get a list of functions that reside in a DLL
The only way is to manually access the EXPORTS table within the DLL's PE
header. Refer to MSDN for details about accessing the PE header:
Peering Inside the PE: A Tour of the Win32 Portable Executable File
Format
http://msdn.microsoft.com/library/en-us/dndebug/html/msdn_peeringpe.asp
An In-Depth Look into the Win32 Portable Executable File Format
http://msdn.microsoft.com/msdnmag/issues/02/02/PE/default.aspx
> - How do I get the function parameters and return values
You don't, as that information is not stored anywhere. Not unless you want
to manually decode the raw assembly instructions, but that won't actually
tell you much anyway, unless you implement your own lookup tables for
finding known functions within known libraries.
The only exception to this is ActiveX/COM libraries, which usually (but not
always) have a fully detailed TypeLibrary associated with them.
> - How do I execute a DLL dynamically if I don't have the lib file
You will have to use the LoadLibrary() and GetProcAddress() functions to
obtain pointers to the individual exported functions.
Gambit
Technical Details
Message-ID:
<4266d632$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<4266cd84$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,cc17d9227e3b1a4e X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <4266cd84$1@newsgroups.borland.com> Subject: Re: DLL Question Date: Wed, 20 Apr 2005 15:24:44 -0700 Lines: 35 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <4266d632$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1114035762 68.69.17.41 (20 Apr 2005 15:22:42 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail