views:

164

answers:

2

Hi,

I'm porting an existing .NET 3.5 application into a plug-in for Eclipse.

I want to have my custom UserControl, written in C#, embedded within Eclipse; I've exported it successfully as a COM Control, and it works well in Eclipse Europa.

In Ganymede, it seems the OLE load code has changed, and what originally worked in Europa, fails.

The specific error is when Ganymede loads my control, it queries for IOleObject, receives the proper interface, and then calls SetClientSite on it, which causes my object to lose both its references, and become de-allocated (Ganymede will then crash). The exact same control works flawlessly in both Visual C++ designer and in Europa.

Apart from the obvious .NET attributes and UserControl, is there any specific class I need to inherit from? Specific interfaces I need to implement, or specific behavior change between Europa/VC and Ganymede?

Thanks!

A: 

I've come across similar problems with hosting .NET controls in non .NET environments. There have been problems with how some of my user controls have exposed to COM.

Following the example on this site solved my problem, perhaps it will help you too!

Link

Pwninstein
+1  A: 

If anyone is still having this problem, then please report it on Connect. When done reporting, please post the URL of the bug report here, so people who read this post can vote on it.

If this is still a bug, it would be nice to get it fixed by RTM of .NET 4.0, or at least SP1.

John Saunders