Hello,
I'm re-writing a VB6 DLL to C#.
The translation is complete and everything works fine, accept the most crucial part.
The VB6 DLL communicates with a remote machine with a CreateObject(..,..) function. It sends an XML(string) and receives an answer from it, also as an XML(string):
Dim objComponent As Object
Dim strXMLOut As String
' get message from MQ
Set objComponent = CreateObject("PMQAccessData.cGetMQData", "NT101")
strXMLOut = objComponent.fGetMQData(strXMLIn, strProject)
In C# I tried the following code, but oType stays null :
Type oType = Type.GetTypeFromProgID("PMQAccessData.cGetMQData", "NT101");
object o = System.Activator.CreateInstance(oType);
strXMLOut = (string)oType.InvokeMember("fGetMQData", System.Reflection.BindingFlags.InvokeMethod, null, o, new object[] { strXMLIn, strProject });
Does anyone have any idea how to tackle this problem?
Thanx! Dennis