🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #1693

C++ and DLLs

#1693
From: markl
Date: Wed, 09 Aug 1995 19:00
24 lines
1302 bytes
(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
Technical Details
Message-ID: <40b0l0$le4@sundog.tiac.net>
Path: arc1-ca.pugleaf.net!sundog.tiac.net!usenet

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sundog.tiac.net!usenet
From: markl <Mark_Levie@crd.lotus.com>
Newsgroups: comp.std.c++
Subject: C++ and DLLs
Date: 9 Aug 1995 19:00:48 GMT
Organization: The Internet Access Company
Message-ID: <40b0l0$le4@sundog.tiac.net>
NNTP-Posting-Host: marklevi.tiac.net