K
KK
Hi all
Can anybody help me what's going wrong here and how to correct it.
Code is as follows....
System::Object * GetObjectFromAssembly()
{
Assembly * pMyAssembly = Assembly::Load("MyAssembly");
Type * pMyType = pMyAssembly->GetType("MyNameSpace.MyClass");
System::Object * pRet = pMyType->CreateInstance();
pMyAssembly = 0;
return pRet;
}
Here i'm getting the error as "pRet is disposed." How to create object from
Assembly at runtime and use it?
Thanks and Regards
Krishna
Can anybody help me what's going wrong here and how to correct it.
Code is as follows....
System::Object * GetObjectFromAssembly()
{
Assembly * pMyAssembly = Assembly::Load("MyAssembly");
Type * pMyType = pMyAssembly->GetType("MyNameSpace.MyClass");
System::Object * pRet = pMyType->CreateInstance();
pMyAssembly = 0;
return pRet;
}
Here i'm getting the error as "pRet is disposed." How to create object from
Assembly at runtime and use it?
Thanks and Regards
Krishna