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 ( 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:
Protocol DLL calls a virtual function on plugin object to get a pointer to MFileService derived object
Plugin object calls a virtual function on the user interface module.
The user interface module creates an instance of MFileService dervied class and returns it to the caller ( The plugin object )
The plugin object inturn returns it to the protocol DLL.
The problem is my application is crashing with KERN-EXEC 3 at step 1 when its making a virtual function call to plugin object.
HINTS:
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.