Symbian
Symbian OS Library

FAQ-0582 Can I derive from a class implemented in an EPOC32 DLL?

[Index][spacer] [Previous] [Next]



 

Classification: C++ Category: Development
Created: 01/31/97 Modified: 12/19/2001
Number: FAQ-0582
Platform: Not Applicable

Question:
Can I derive new classes from an EPOC32 class implemented in a DLL?

Answer:
Yes - both MSVC and GCC support the ability to derive classes across a DLL boundary.
Actually, the only issue is with virtual functions: the DLL needs to export all the virtual functions which your class doesn't override. If it doesn't then you will get a link-time error, so it's safe to go ahead and try.
For example, you could derive a class from CConsole (implemented in ECONS.DLL) which overrides the virtual Write function, copying everything to a log file before invoking CConsole::Write to write to the screen.