.Net to COM Interop Tester

2019-07-23 07:31发布

I made a class in C# that I am exposing to COM. I can register it just fine using RegAsm.exe.

I would like to test it before I send it off, but using TlbImp.exe gives me an error of "Type libaray was exported from a CLR assembly and cannot be re-imported as a CLR assemply."

What is a good way to test this?

2条回答
Anthone
2楼-- · 2019-07-23 08:01

Use PowerShell:

$myObj = new-object -comObject ProgId
查看更多
老娘就宠你
3楼-- · 2019-07-23 08:17

You can create a VB macros in word\excel\etc:

Dim obj As Object
Set obj = CreateObject("progid here")
Call obj.SomeMethodForTest()
查看更多
登录 后发表回答