开发者

regasm and tlb (registering a .NET library for COM interop)

开发者 https://www.devze.com 2023-01-04 14:20 出处:网络
I have .NET assembly with one public class and several private classes. I am trying to register it for COM interop so that I can call it from VBA, using the following command:

I have .NET assembly with one public class and several private classes.

I am trying to register it for COM interop so that I can call it from VBA, using the following command:

regasm /tlb foo.dll /codebase

Subsequently, when I open up the .tlb file in Visual Studio's "object browser", I see that the library does not expose any types.

Any thoughts?

I realize that there isn't mu开发者_如何学Pythonch specific information here, so if you let me know what would be diagnostically useful, I will try to provide.


I had to mark my public type with [ComVisible(true)].


Two things to help:

  1. I don't think that VS2008 object browser allows viewing of tlb files generated from .NET assemblies - I would recommend using iTripoli's Type Library Viewer to make sure that you are diagnosing the right problem;
  2. Try using the /verbose option, to see what kind of problems Regasm has encountered.
0

精彩评论

暂无评论...
验证码 换一张
取 消