Delphi插件框架 [英] Delphi plugin framework

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

问题描述

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

1. DLL

2. BPL

3. COM界面


每个选项都有一些



DLL - 使用MDI复制的标记,插件的形式无法嵌入主机exe - mdi应用程序。

BPL - 每个*。 bpl插件和* .exe主机应用程序必须使用相同版本的Delphi进行编译。

COM - 接口{xxx-xx-xxx-xx}必须在系统中注册,(regsvr)所以插件框架不能便携式!



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

谢谢

解决方案

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



一般来说,我将默认选择BPL,如果您需要使用非Delphi应用程序,请使用DLL,如果您真的要选择COM。



替代方法是不建立自己的,因为有几个Delphi插件框架可用。



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




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

Every option has some disadvantage.

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.

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.

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:

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

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