> > Hi all, sorry for the cross group spam but my question does really
> > fall into both groups. Here's my issue.
[quoted text clipped - 38 lines]
>
> - Show quoted text -
Hi Ben and thanks for replying.
Sorry, you are right I am using VS 2005 and C++/CLI and after much
messing about I managed to get it to work. Basically I removed the
header file for my cpp class definition and bingo, it all worked. Not
sure why and the old school c/c++ guy that sits behind be said that
removing the .h was a bad idea and it shouldn't work...
To my next problem..... My C++/CLI code is trying to return a type
defined in C# but I get a complilation exception
error C2440 'return' : cannot convert from '<type>' to '<type>'
where type is the same thing! :-(
Andy
Ben Voigt [C++ MVP] - 11 Oct 2007 17:20 GMT
>> > Hi all, sorry for the cross group spam but my question does really
>> > fall into both groups. Here's my issue.
[quoted text clipped - 53 lines]
>
> where type is the same thing! :-(
Is it a C# struct or class?
If a class (reference type), make sure you haven't forgotten the ^ (meaning
tracking handle).
> Andy
Ben Voigt [C++ MVP] - 12 Oct 2007 17:40 GMT
> Sorry, you are right I am using VS 2005 and C++/CLI and after much
> messing about I managed to get it to work. Basically I removed the
> header file for my cpp class definition and bingo, it all worked. Not
> sure why and the old school c/c++ guy that sits behind be said that
> removing the .h was a bad idea and it shouldn't work...
And just to mention, I've got a lot of code with ref classes declared in
headers and member functions defined in implementation files, so that should
work.