This code:

DomainThingy^ thingy = (DomainThingy^)_scriptDomain->CreateInstanceAndUnwrap(Assembly::GetExecutingAssembly()->FullName, DomainThingy::typeid->FullName);

Produces this error:

System.InvalidCastException was unhandled 
Message: Unable to cast transparent proxy to type 'Hook.DomainThingy'.

Does anyone knows how to fix it?

Recommended Answers

All 5 Replies

Thanks for that. Let me see if I can come up with a solution or not.

I saw that but it's for CSharp not for Cpp.

It doesn't matter, C# and cli/c++ are close cousins so the solution to your problem is most likely the same. google for that error message and you will find more help

Still nothing. And there is no dynamic type on C++.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.