为什么我不能浏览dll来了解其中的内容? [英] Why can't I browse dll to figure what's in it?: "Some components could not be browsed"

查看:103
本文介绍了为什么我不能浏览dll来了解其中的内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找缺少的COM接口X,我怀疑它是在Y.dll中定义的.我可以使用

I'm looking for a missing COM interface X which I suspect is defined in Y.dll. I can peek at this presumptive interface using

grep X Y.dll

表示匹配".呼拉,怀疑得到证实!

which says "matches". Hurrah, suspicion confirmed!

A,当我在Visual Studio Express中使用对象浏览器,尝试将Y.dll添加到我的自定义组件集时,出现错误:无法浏览某些组件".

Alas, when I use the Object Browser in Visual Studio Express, trying to add Y.dll to my Custom Component Set, I get the error: "Some components could not be browsed" in a pop-up window.

那我无法浏览该dll的原因是什么? COM接口是否可以被有意或无意地保护,隐藏,保护或遮盖?显然我需要底漆!

So what are the reasons I can't browse this dll? Can the COM interfaces deliberately or accidentally be protected, hidden, secured, or obscured? Obviously I need a primer!

正式地,所有Microsoft对此的了解似乎都缺乏洞察力:

Officially, all Microsoft knows about this seems to be generally devoid of insight:

当您尝试添加不支持对象浏览的文件类型(例如.htm)时,通常会发生此错误. 和".txt"文件,在组件选择器"对话框中.对象浏览器支持文件类型,例如.bsc,.olb, .tlb,.dll,.exe和.ocx.

This error generally occurs when you attempt to add a file type that does not support object browsing, such as .htm and .txt files, in the Component Selector dialog box. The Object Browser supports file types such as .bsc, .olb, .tlb, .dll, .exe, and .ocx.

严重的是,dll或exe不支持对象浏览的原因是什么?初学者将对教程或书籍的任何指针表示赞赏!谢谢.

Seriously, what are the reasons for a dll or exe to not support object browsing? Any pointers to tutorials or books would be appreciated by this beginner! Thanks.

推荐答案

COM对象浏览器依赖

COM Object browsers rely on metadata (type libraries) exported by COM servers (dll, exe, ocx, etc).

问题在于,不需要COM Server导出有关其实现接口的任何元数据.不幸的是,我发现了很多这样的服务器(因此需要知道其他方式支持哪些CoClasses,Interface等).

The problem is that COM Servers are not required to export any metadata about which interfaces it implements. Unfortunately I have found quite a number of such servers (so one needs to know which CoClasses, Interfaces, etc are supported by other means).

检查您的COM服务器(y.dll)是否包含类似于以下内容的名为"TYPELIB"的资源:

Check if your COM Server (y.dll) contains a resource called "TYPELIB" similar to:

希望这会有所帮助.

这篇关于为什么我不能浏览dll来了解其中的内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆