如何查看 ocx 文件的接口?
我想查看“.ocx”文件的接口。像这样:
但对于某些 .ocx,我只能看到 5 个函数,像这样:
问题是:如何查看这些 ocx 文件的接口。 我已经尝试过这个:
A.
a) 我想注册它并在 Visual Studio 中查看它。但是当我注册它时,出现错误“LoadLibrary(path:\filename.ocx) failed”。像这样:
b) 然后我使用 'Dependency Walker' 打开 ocx,发现文件依赖没有 DLL文件。
c) 如何注册?
B. 我使用“Dll Export Viewer”,现在我可以看到函数的名称,但仍然无法获取函数的参数。 如何获取函数的参数?
I want to see the interfaces of an ".ocx" file. Like this:
But for some .ocx, I can only see 5 functions, Like this:
The question is: How can I see the interfaces of these ocx file.
I have try this:
A.
a) I want register it and see it in visual studio. But when I register it, an error appears "LoadLibrary(path:\filename.ocx) failed". Like this:
b) Then I used 'Dependency Walker' open the ocx, found the file dependences no DLL files .
c) How can I register it?
B.
I use "Dll Export Viewer" and now I can see the function's name but still can not get the function's parameters.
How can i get the parameters of a function?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您尝试过 OLE/COM 对象查看器吗? http://www .microsoft.com/downloads/en/details.aspx?FamilyID=5233b70d-d9b2-4cb5-aeb6-45664be858b6&displaylang=en
Did you try the OLE/COM Object Viewer? http://www.microsoft.com/downloads/en/details.aspx?FamilyID=5233b70d-d9b2-4cb5-aeb6-45664be858b6&displaylang=en
使用类型库导入器。
由于您使用的是 C++,因此使用 执行此操作可能是最简单的
#import
。这篇代码项目文章提供了分步过程。
Import the type library with the Type Library Importer.
Since you are using C++, it's probably easiest to do this with
#import
.This Code Project article gives step-by-step procedures.
很久以前,我使用过这个叫做 XRay 的工具: X-雷视觉。它使用起来非常简单,我相信在 Windows 7 中仍然可以使用。但和其他工具一样,它需要DLL/OCX嵌入一个类型库,或者你需要找到相应的类型库。
Long time ago, I used this tool called XRay: X-Ray Vision. It was quite simple to use and still works in Windows 7 I believe. But as other tools, it requires the DLL/OCX to embed a Type Library, or you need to find the corresponding one.
该接口在类型库(TLB)中描述。您的 DLL(OCX 是一个 DLL)应在 TypeLibrary 资源中包含 TLB。您可以提取该TLB并获取接口描述。这项工作也应该由 OLE View 来完成。
如果您的 DLL 不包含 TLB 并且未提供 TLB 文件,您将无法获得接口描述。
编辑:“DLL Export Viewer”等工具显示的信息比 OLE View 少。值得使用微软提供的工具。
当您的文件屏幕截图中有修饰名称时,您将获得带有“Microsoft (R) C++ Name Undecorator”(undname.exe) 的函数签名
The interface is described in the type library (TLB). Your DLL (OCX is a DLL) should contain the TLB in a TypeLibrary resource. You can extract this TLB and get the interface description. This job should also be done by OLE View.
If your DLL does not contain a TLB and no TLB file is provided you won't get the interface description.
Edit: Tools like "DLL Export Viewer" showed less information than OLE View. It's worth to use the tools provided by Microsoft.
When you have the decorated names in your files screenshot, you get the function signatures with the "Microsoft (R) C++ Name Undecorator" (undname.exe)