How do I call .NET code (C#/vb.net) from vbScript?

后端 未结 3 1626
北荒
北荒 2021-02-04 18:59

I imagine I can compile a C# DLL and then expose it as a COM object so that it can be CreateObject\'d from VBscript. I\'m just not sure the steps involved in doing this...

3条回答
  •  长情又很酷
    2021-02-04 19:26

    You should use the regasm utility to register an assembly (just like you do regsvr32 with COM servers). Then you can use it from COM. Make sure it's installed in the GAC. The stuff should have [ComVisible(true)] to be usable from COM.

提交回复
热议问题