Topic: C++ and DLLs


Author: markl <Mark_Levie@crd.lotus.com>
Date: 1995/08/09
Raw View
(Please bear with me as I am fairly new to C++ so my explanation of
the problem may not be as succinct as it could be.)

Here goes :

I have a base class "a".  From "a" I derived two classes: "b" and
"c".  "b" and "c" override functions in "a" and have there own set of
data members. I'm looking to implement all of functions specific to
"b" (including the overriden functions) in a DLL ;"c" is in another DLL.

My first question is, how are the addresses for these functions
resolved at run time? It seems that you could export the mangled
name of each function in a DEF file (in Windows) then use
GetProcAddress to get the address of the function.  That's fine for
the functions, but what about the this pointer? Is that then still
passed to the function so it can access the correct object's data?

My intention is to reference "b" and "c" objects through base pointers
(pointers to an "a" object) in the application that uses these DLLs.


Any help would be appreciated.

marklevi@tiac.net