Delphi插件框架 [英] Delphi plugin framework

查看:562
本文介绍了Delphi插件框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想设计Delphi插件框架。有三个选项:

1. DLL

2. BPL

3. COM接口


每个选项都有一些缺点。

I want to design Delphi plugin framework. There are three options:
1. DLL
2. BPL
3. COM interface

Every option has some disadvantage.

DLL - 带有MDI重复的Promblem,插件中的表单无法嵌入到主机exe - mdi应用程序中。

BPL - Every *。 bpl插件和* .exe宿主应用程序必须使用相同版本的Delphi编译。

COM - Interfaces {xxx-xx-xxx-xx}必须在系统中注册,(regsvr)是便携的!

DLL - Promblem with MDI apllication, forms from plugin cannot be embeded to the host exe - mdi application.
BPL - Every *.bpl plugin and *.exe host application must be compiled with the same version of Delphi.
COM - Interfaces {xxx-xx-xxx-xx} must be registered in system, (regsvr) So plugin framework cannot be portable!

一切都是真的我上面写的吗?如果没有,请纠正我,还是有其他可能性?

感谢

Is everything true what I wrote above? If not, please correct me, or is there some other possibility?
thanks

推荐答案

你写的是正确的。所有这些都有优点和缺点,问题是什么对你很重要,你没有说你想做什么,所以我们不能告诉你如何做。

Yes, what you wrote is correct. All of these have advantages and disadvantages, the question is what is important for you, you didn't say what you want to do, so we can't tell you how to do it.

一般来说,我会默认选择BPL,使用DLL,如果你需要使用它从非Delphi应用程序,并选择COM只有如果你真的有。

In general, I would pick BPL by default, use DLL if you need to use it from non Delphi apps, and pick COM only if you really have to.

另一种方法是不构建自己的,因为有几个Delphi插件框架可用。

The alternative is to not build your own, since there are several Delphi plugin frameworks available.

此外,此主题之前已讨论过,请查看:

Also, this topic has been discussed here before, check out:

  • how-best-to-add-plugin-capability-to-a-delphi-program
  • plugins-system-for-delphi-application-bpl-vs-dll

这篇关于Delphi插件框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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