HI
I got VB6 com interface "LANNTBSMTSCOMP" and VB6 COM object "CLANC".
The probject reference "LANNTBSMTSCOMP" only.
In
VB.NET project I call call "CLANC" without any problem as below:
Code:
Dim lvobjClientLogon As LANNTBSMTSCOMP.IlancClientLogon
Dim lvstrChallenge As String
lvobjClientLogon = CreateObject("CLANC.CClientLogon")
lvstrChallenge = lvobjClientLogon.GetLogonChallenge("1", "2", "3", "4", "5", "6")
But I cant do it in C#... Can anyone help me? I try code as below:
Code:
Type objClientLogonType = Type.GetTypeFromProgID("CLANC.CClientLogon");
LANNTBSMTSCOMP.IlancClientLogon lvobjClientLogon;
lvobjClientLogon =(LANNTBSMTSCOMP.IlancClientLogon)Activator.CreateInstance(objClientLogonType);
object[] objArgues = {"1", "2", "3", "4", "5", "6"};
object c = objClientLogonType.InvokeMember("GetLogonChallenge", BindingFlags.InvokeMethod, null, lvobjClientLogon, objArgues);
Console.Writelin(c.ToString());
in C# i got error :
Unhandled Exception: System.Runtime.InteropServices.COMException (0x80020006): U
nknown name.
Can anyone help me for this??
thanks