Lafdis
May 11th, 2005, 09:04 AM
Hi,
i want to reimplement the following code written in VB6 with C#
"Set objConnection = CreateObject("MY_TLIB.connection", IpAddress) "
where :
MY_TLIB.connection ist the transformed typelib from VB6 into C# with tlbimp.exe
objConnection is of type MY_TLIB.connection
IpAdress ist the String containing the IP-Adress of the server, i want to connect to.
I have tried it with this code but it does not work:
Type t = Type.GetTypeFromProgID("MY_TLIB.connection", "theIPAddress");
Object o = Activator.CreateInstance(t);
What is wrong?
i want to reimplement the following code written in VB6 with C#
"Set objConnection = CreateObject("MY_TLIB.connection", IpAddress) "
where :
MY_TLIB.connection ist the transformed typelib from VB6 into C# with tlbimp.exe
objConnection is of type MY_TLIB.connection
IpAdress ist the String containing the IP-Adress of the server, i want to connect to.
I have tried it with this code but it does not work:
Type t = Type.GetTypeFromProgID("MY_TLIB.connection", "theIPAddress");
Object o = Activator.CreateInstance(t);
What is wrong?