Using a COM dll from C# without a type library

前端 未结 7 2200
梦谈多话
梦谈多话 2020-12-14 12:23

I need to use a COM component (a dll) developed in Delphi ages ago. The problem is: the dll does not contain a type library... and every interop feature (eg. TlbImp) in .NET

7条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-14 13:01

    You can also do late binding and then invoke methods through reflection (myObject.InvokeMember("NameOfTheMethod", options, params, etc.)).

    A wrapper should, however, offer better performance and faster marshalling.

提交回复
热议问题