Re: exporting classes from DLL using def file and NONAME

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



(2b|!2b)==? wrote:
I am exporting classes and functions from a DLL, using a DEF file and
NONAME. I am obtaining the mangled or 'decorated' names by running
dumpbin on the generated DLL.

My assumption regarding the names in my DEF file are the following:


1). The exported names will not change so long as I use the same
compiler to generate the DLL each time

True. Actually, VC++ name decoration has been very stable since V1.0,
although minor changes (mostly additions) have occurred.


2). The exported name for a method will not change so long as its
signature does not change - EVEN if the signature of other methods of
the same class change

True.


3). The exported name for a method will not change so long as its
signature does not change - EVEN if NEW methods are ADDED to the class
interface

True.


4). The exported name for a method will not change so long as its
signature does not change - EVEN if EXISTING methods are REMOVED from
the class interface

True.


5). The exported name for a method will not change so long as its
signature does not change - EVEN if new fields are added/removed to
the class

True.


6). The exported name for a method will not change so long as its
signature does not change - EVEN if new methods are added to the
library that contains the class

True.



The reasons I ask these questions is that I intend to obtain the
current 'decorated names' and assigh ordinal numbers to them and
export the classes that way. Going forward,I envisage adding new
methods etc to existing classes, and I need to know enough about what
happens underneath the hood, so I may develop an effective stratgey
regarding backward compatability with clients that consume my library

A bit of a pain, but it should work as you envision it.

-cd


.



Relevant Pages

  • Re: exporting classes from DLL using def file and NONAME
    ... dumpbin on the generated DLL. ... Actually, VC++ name decoration has been very stable since V1.0, although minor changes have occurred. ... signature does not change - EVEN if the signature of other methods of ... the class interface ...
    (microsoft.public.vc.language)
  • Re: exporting classes from DLL using def file and NONAME
    ... dumpbin on the generated DLL. ... Actually, VC++ name decoration has been very stable since V1.0, ... signature does not change - EVEN if the signature of other methods of ... the class interface ...
    (microsoft.public.vc.language)
  • Re: name decoration issue in DLL
    ... Name decoration depends only ... extern "C" suppresses name mangling, ... one must use DEF file. ... control name decoration for both DLL exported names and current DLL ...
    (microsoft.public.vc.language)
  • Re: Identifying parameter(s) on Functions in unmanaged DLLs
    ... P/Invoke declaration in your program? ... Windows API function, you can look in the documentation for the signature, ... > unmanaged DLL, ... > public static extern int MsgBox(PARMETER??? ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Accessing Delphi DLLs
    ... Both the calling app and DLL have myUnit in their uses clause. ... The notation you wrote above tries to make the function "acquire" its signature from a function-pointer type, but that doesn't work because, as you've noted, that's not really a function declaration. ... AddNumbersSignature = AddNumbers; ...
    (alt.comp.lang.borland-delphi)