470,848 Members | 765 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,848 developers. It's quick & easy.

problem with mixing managed/unmanaged code in several assemblies


I have problems with pointers to unmanaged classes as parameters for
virtual methods, and then overwriting the virtual methods in other

#include "../Plugin/iPlugin.h" //unmanaged plugin interface header

public __gc PluginGui : public Windows::Forms::Form

virtual void plugin(iPlugin* p)=0;
virtual iPlugin* plugin()=0;


#include "../Test/Test.h" //unmanaged iPlugin interface implementation
public __gc TestGUI : public PluginGUI
virtual void plugin(iPlugin* p)
_app = dynamic_cast<Test*>(p);

virtual iPlugin* plugin()
return _app;
Test* _app;
If I load the RenderAppGUI.dll with Assembly::LoadFile and create a
TestGUI CreateInstance I get a TypeLoadException because no
implementation of plugin(iPlugin* p) and plugin() are found.

I guess the problem is that with the include the unmanaged types are
defined in the assembly but are seen as different types in the two
assemblies and therefore the plugin methods in TestGUI are not the
implementation for the abstract methods in PluginGUI.

But how do I fix that ?

Nov 17 '05 #1
0 1149

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by mynab | last post: by
8 posts views Thread by Nadav | last post: by
1 post views Thread by Steve Marsden | last post: by
2 posts views Thread by zamir.khan | last post: by
5 posts views Thread by achutha.sridhar | last post: by
2 posts views Thread by Jon Slaughter | last post: by
1 post views Thread by nIgHtCrAwLeR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.