Wonderful interview. VERY interesting stuff here guys. I really learnt a trick or two. If a VS VC++ team member drops by this thread, I would like to know if there is any information, good or bad, about support for VC++ being added to the VS Class Designer (as supported for C#, VB.net etc).
BenZilla wrote:Really good interview.You guys should put up some kind of cheat sheet with the most usefull keyboard commands somewhere.
BenZilla wrote:Really good interview.You guys should put up some kind of cheat sheet with the most usefull keyboard commands somewhere.
Trackerball, I was definitely not trying to skirt the issue, it's more that I was not always expecting those questions The short answer to your question is this:- a managed class (ref class A {}) can only hold pointers to native types- a native class (class B {}) can not hold a managed handle directly, instead you should use gcroot<T> as follows:#include <vcclr.h>using namespace System;class B {public: gcroot<String^> str; // can use str as if it were String^ B() {}};int main() { B b; b.str = gcnew String("hello"); Console::WriteLine( b.str ); // no cast required}I hope that answers the question. If you want to learn more, I gave a talk about interop at Tech-Ed and I have some posts about it over at http://blogs.msdn.com/borisj.-- Boris