In .NET programs I can create a generic type by:
System::Type::MakeGenericType(...)
There must be a way to do that in native C++ for a .NET type (with _TypePtr). I am hosting my own CLR instance and not using C++/CLI. (Here’s an example of how that can be done.) My approach for that is:
_TypePtr BuildGenericType(_TypePtr spGenericType, _TypePtr spTypeArgs[])
{
return spGenericType-> ..... ???
}
But there is no method like MakeGenericType, and I don’t know where to find it. Any ideas on how to solve this?
Finally i found a workaround myself.
At first i need an additional assembly that wraps System::TypeBuilder
This additional assemly i load from c++
And there i run these sexy lines, where CLRAssembly is an abstraction layer for clr.
Finally i can run my example method like this:
Finally it works pretty good. 🙂
/Solved