将browserui.dll添加到项目 [英] Adding browseui.dll to the project

查看:64
本文介绍了将browserui.dll添加到项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我正在尝试为IE开发一个插件,我想将Browseui.dll添加到我的项目中,但是我可以看到此错误消息

无法添加对"C:\ BROWSEUI.DLL"的引用.请确保该文件可访问,并且是有效的程序集或COM componenet.

有谁知道错在哪里吗?
在此先感谢.

Hi all, I''m trying to develop an add-on for IE, and I want to add browseui.dll to my project, but I can this error message

A reference to "C:\BROWSEUI.DLL" could not be added. Please make sure that the file is accessible, and that is a valid assembly or COM componenet.

Does anyone have idea what''s wrong?
Thanks in advance.

推荐答案

如果这不是有效的.NET程序集或COM组件,则需要使用P/Invoke.要了解它,请参阅:
http://en.wikipedia.org/wiki/Platform_Invocation_Services [ http://msdn.microsoft.com/library/en-us/vcmxspec/html/vcmg_PlatformInvocationServices.asp [^ ].

此CodeProject文章也可能有用:
基本P/调用 [ http://en.wikipedia.org/wiki/C%2B%2B/CLI [ ^ ],
http://www.ecma-international.org/publications/standards/Ecma-372.htm [^ ],
http://msdn.microsoft.com/en-us/library/xey702bw.aspx [ ^ ],
http://msdn.microsoft.com/en-us/library/3bstk3k5 [ ^ ].

其他所有内容仅取决于该库中的内容.

祝你好运,
—SA
If this not a valid .NET assembly or a COM component, you will need to use P/Invoke. To learn it, please see:
http://en.wikipedia.org/wiki/Platform_Invocation_Services[^],
http://msdn.microsoft.com/library/en-us/vcmxspec/html/vcmg_PlatformInvocationServices.asp[^].

This CodeProject article can also be useful:
Essential P/Invoke[^].

Another alternative could be using C++/CLI, especially if the library file is written in C++ or C and you have the header files. You can create additional a mixed-mode project (managed+unmanaged) which would serve as an interface between native unmanaged code and .NET. You can wrap unmanaged code into managed "ref" C++/CLI classes/structures, make public what you need to use, and use the resulting executable as a regular .NET assembly, by referencing it in your C# project. Please see:
http://en.wikipedia.org/wiki/C%2B%2B/CLI[^],
http://www.ecma-international.org/publications/standards/Ecma-372.htm[^],
http://msdn.microsoft.com/en-us/library/xey702bw.aspx[^],
http://msdn.microsoft.com/en-us/library/3bstk3k5[^].

Everything else solely depends on what''s in that library.

Good luck,
—SA


这篇关于将browserui.dll添加到项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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