我试图在我的网站上使用TrustCommerce。我从网站上安装了dll文件,但我无法使用它#39;我应该能够使用myObject.PushParam(string)
并且它无法使用。我有什么东西在这里失踪吗?我在PHP中找到了article:
public static void TrustCommerce()
{
//TCLinkNET.TClinkClass.
object myObject = Orders.COMCreateObject("TCLINKCOMLib.TClinkClass");
}
public static object COMCreateObject(string sProgID)
{
// We get the type using just the ProgID
Type oType = Type.GetTypeFromProgID(sProgID);
if (oType != null)
{
return Activator.CreateInstance(oType);
}
return null;
}
答案 0 :(得分:0)
将COM引用添加到项目中,然后将为COM生成一个introp程序集。您使用的方式需要反射来调用COM方法。 3.5或更低,不要忘记与您的应用程序安装程序分发互操作程序集。