473,396 Members | 2,013 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

problem with mixing managed/unmanaged code in several assemblies

Hello,

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

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

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

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

and
//RenderAppGUI.dll

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

virtual iPlugin* plugin()
{
return _app;
}
private:
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 1255

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Bob Rock | last post by:
Hello, in the last few days I've made my first few attempts at creating mixed C++ managed-unmanaged assemblies and looking aftwerwards with ILDASM at what is visible in those assemblies from a...
1
by: mynab | last post by:
Hello, I am facing an issue I cannot easily solve. I am writing a non-managed C++ application that I want to be extensible using plugins. The goal is to let people write plugins in any language...
8
by: Nadav | last post by:
Hi, I am writing a performence critical application, this require me to stick to unmanaged C++ as performance is much better using unmanaged C++ ( about 33% better ), Still, I am trying to avoid...
1
by: Steve Marsden | last post by:
Hi All the information I had read suggested that if you had an existing C project that you wished to change to managed code all you had to do was use the /clr switch and then over time you could...
0
by: Ditlef | last post by:
We have a large C++ COM-based project we will migrate (slowly) to .NET. We have several basic libraries we need to wrap with C++ managed wrapper libraries. Having C++ runtime Debug/Release mixed...
2
by: zamir.khan | last post by:
Hello all, New to the groups, sorry if this the wrong forum/etiquette. I am coding a c++ application that requires the use of a timer-triggered event handler. I decided to use the timer provided...
5
by: achutha.sridhar | last post by:
I've a pretty basic question on managed code. I read through couple of.net documentation, and reached a state where I know that managed code would be run by the .Net run time and it has so and so...
2
by: Jon Slaughter | last post by:
How difficult is it for one to integrate unmanaged C++ into C#? I know for functions one can use DLLimport but how does one go about doing it for classes? Do I have to completely reimplement the...
1
by: nIgHtCrAwLeR | last post by:
Hi, I have a managed dll which is a wrapper for an unmanaged dll. I add a reference for managed dll in C# simple application ( A form with just a button. Managed dll gets called on button...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.