IDL 文件中的接口声明位置
我正在开发一个项目,该项目正在将使用 COM / MFC 广泛编写的(非常)旧(且相当大)程序升级为使用 WPF / 托管 .NET 组件,其中一部分正在尝试移植将 IDL 中声明的旧 COM 接口转换为托管 C# 接口。在“库”块内部和外部声明的接口有什么区别?
I'm working on a project that's upgrading a (very) old (and considerably large) program written extensively with COM / MFC to using WPF / managed .NET components, and part of it is trying to port over old COM interfaces declared in IDLs to managed C# interfaces. What's the difference between interfaces declared inside and outside 'library' blocks ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
没有一个。在
library {}
中声明一个接口只是确保它存在于类型库中,即使它没有被任何组件类引用。对于您的 C# 声明来说没有什么重要的。There isn't one. Declaring an interface inside
library {}
just ensures it is present in the type library even if it isn't referenced by any coclasses. Nothing that matters to your C# declarations.