如何在纯托管C#中编写IE 8附加组件

时间:2022-05-28 20:08:09

I would like to write an add-on for IE 8, but I want to use pure managed C#. Is this possible yet? I know for the longest time we were talking only C++.

我想为IE 8编写一个附加组件,但我想使用纯托管C#。这可能吗?我知道最长的时间我们只谈论C ++。

3 个解决方案

#1


Ultimately, the C# will end up calling into IE8's COM functions. There's a framework called Spicie that makes this easier, and some other examples here: http://www.enhanceie.com/ie/dev.asp

最终,C#最终会调用IE8的COM函数。有一个名为Spicie的框架使这更容易,还有其他一些例子:http://www.enhanceie.com/ie/dev.asp

Generally, it's a bad idea to write browser extensions in .NET because there's a severe performance impact, and there's the possibility of runtime collisions because only one version of .NET can be loaded into a process currently; if two addons want to use conflicting .NET versions, one will fail.

通常,在.NET中编写浏览器扩展是一个坏主意,因为它会对性能造成严重影响,并且存在运行时冲突的可能性,因为当前只能将一个版本的.NET加载到进程中。如果两个插件想要使用冲突的.NET版本,则会失败。

#2


Have a look at this

看看这个

http://code.msdn.microsoft.com/SpicIE

#3


This question is quite old now, but posting this just in case someone find it useful. =)

这个问题现在已经很老了,但发布这个以防有人发现它有用。 =)

I have another answer here on SO about how to make IE 8 add-ins using C#:

关于如何使用C#制作IE 8加载项,我在这里有另一个答案:

How to get started with developing Internet Explorer extensions?

如何开始开发Internet Explorer扩展?

#1


Ultimately, the C# will end up calling into IE8's COM functions. There's a framework called Spicie that makes this easier, and some other examples here: http://www.enhanceie.com/ie/dev.asp

最终,C#最终会调用IE8的COM函数。有一个名为Spicie的框架使这更容易,还有其他一些例子:http://www.enhanceie.com/ie/dev.asp

Generally, it's a bad idea to write browser extensions in .NET because there's a severe performance impact, and there's the possibility of runtime collisions because only one version of .NET can be loaded into a process currently; if two addons want to use conflicting .NET versions, one will fail.

通常,在.NET中编写浏览器扩展是一个坏主意,因为它会对性能造成严重影响,并且存在运行时冲突的可能性,因为当前只能将一个版本的.NET加载到进程中。如果两个插件想要使用冲突的.NET版本,则会失败。

#2


Have a look at this

看看这个

http://code.msdn.microsoft.com/SpicIE

#3


This question is quite old now, but posting this just in case someone find it useful. =)

这个问题现在已经很老了,但发布这个以防有人发现它有用。 =)

I have another answer here on SO about how to make IE 8 add-ins using C#:

关于如何使用C#制作IE 8加载项,我在这里有另一个答案:

How to get started with developing Internet Explorer extensions?

如何开始开发Internet Explorer扩展?