G
Guest
Hi,
I am having a serious trouble when calling a .NET Assembly from a NON-CLR
app (VB6 app) through Com Wrapper. The object creation is fine; but when I
try to call its method it says "Object doesn't support this property or
method: 'MethodName'" .
If I add reference to the TLB and do with COM Early binding, it works. How
to get Late-binding client working ?
Here is the first method that works: Tlb file is added in references of VB
project
Dim obj As IMyAssembly
Set obj = CreateObject("My.Namespace.MyAssembly")
obj.DoSomething(); //working fine cheers!
Here is the second method that doesnt work: Tlb file is not added in
references of VB project
Dim obj As Object
Set obj = CreateObject("My.Namespace.MyAssembly")
obj.DoSomething(); // doesnt work says 'Object doesnt support this
property of method 'DoSomething''
I guess I need to supply the "default property" of object or "default
interface" of object but i dont know how to do it in .NET C#.
Any help on this will be appreciated.
Fahad Ashfaque
I am having a serious trouble when calling a .NET Assembly from a NON-CLR
app (VB6 app) through Com Wrapper. The object creation is fine; but when I
try to call its method it says "Object doesn't support this property or
method: 'MethodName'" .
If I add reference to the TLB and do with COM Early binding, it works. How
to get Late-binding client working ?
Here is the first method that works: Tlb file is added in references of VB
project
Dim obj As IMyAssembly
Set obj = CreateObject("My.Namespace.MyAssembly")
obj.DoSomething(); //working fine cheers!
Here is the second method that doesnt work: Tlb file is not added in
references of VB project
Dim obj As Object
Set obj = CreateObject("My.Namespace.MyAssembly")
obj.DoSomething(); // doesnt work says 'Object doesnt support this
property of method 'DoSomething''
I guess I need to supply the "default property" of object or "default
interface" of object but i dont know how to do it in .NET C#.
Any help on this will be appreciated.
Fahad Ashfaque