|
-
June 9th, 2009, 06:25 AM
#1
InvalidCastException with COM set methods
Hi All,
I am referring to an ActiveX dll in my windows project when i looked into metatdata there are some methods like say set_Test(ref object __MIDL_0543).
Now i want to set Test from my .net code, in vb code it is set as
Set objectName.Test = otherObject
With c# it is done like
object newObject = otherObject // otherObject is of type say Other
objectName.set_Test(ref newObject)
The above line throws then an InvalidCastException, so what should we do here.
Please suggest.
Thanks,
Anurodh
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|