My IM application setup is like below:
* User Interface module (exe)
* Plugin module ( A polymorphic DLL that provides an abstract interface
for different protocols to the UI module )
* Several Protocol DLLs ( Shared library DLLs that implement the respective protocols, like Jabber, ICQ etc )
Now, I was asked to implement contact list caching feature and that meant doing File I/O.
Since File I/O cannot be done in the protocol DLLs because,
it cannot access the applications private folder ),
I implemented a class deriving from an abstract class interface
in the user interface module.
I then exposed the abstract interface to the Plugin module and protocol DLLs.
Let that abstract interface be named MFileService.
From the protocol DLL this is how I get an instance of MFileService derived class:
The problem is my application is crashing with KERN-EXEC 3 at step 1Code:1. Protocol DLL calls a virtual function on plugin object to get a pointer to MFileService derived object 2. Plugin object calls a virtual function on the user interface module. 3. The user interface module creates an instance of MFileService dervied class and returns it to the caller ( The plugin object ) 4. The plugin object inturn returns it to the protocol DLL.
when its making a virtual function call to plugin object.
* All the virtual function calls made to the plugin object from the protocol
DLL succeeds except the one I recently added.
* The virtual function I newly added to the plugin and
user interface modules return a pointer to MFileService.
* I have not exported any of the virtual functions since all are pure virtual.