How do I dynamically allocate a value struct and get a pointer to it?
If I have:
value struct x
{
String ^myString;
};
I can do this:
x vsInstance;
x *pvs = &vsInstance; // "Unmanaged pointer" to managed object
And I can do this:
x ^vsInstance = gcnew x;
But I can't do this:
x *pvs = new vsInstance
I need a * pointer rather than a ^ because I am trying to hold this value struct inside an unmanaged class, and I need to dynamically allocate this object every time a class is created.