Type casting problem...Please help me

K

KK

Hi All
i have an interface like this in file Interface.h
__gc __interface IParam
{

};

My implementation class is like this
public __gc class Param : IParam
{
}

The ablove implementation class is in a separate assembly.

In my application i'm using Activator::CreateInstance to create class from
Assembly dynamically
System.Runtime.Remoting.ObjectHandle * hdl ;
hdl = Activator::CreateInstance(AssemblyName, ClassName)

IParam = __try_cast<IParam*>(hdl->Unwrap());

here i'm getting invalid cast operation...
I have included IParam interface in my app as source file.
Can anybody help me what's going wrong..

Thanks and Regards
Krishna
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top