有哪些工具可以将 Delphi 7 应用程序转换为 C# 和 .Net 框架?

What tools exist to convert a Delphi 7 application to C# and the .Net framework?(有哪些工具可以将 Delphi 7 应用程序转换为 C# 和 .Net 框架?)

本文介绍了有哪些工具可以将 Delphi 7 应用程序转换为 C# 和 .Net 框架?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我维护着一个用 Delphi 7 编写的旧的仅限 PC 的应用程序.尽管 Delphi 过去为我提供了很好的服务,但我现在只将它用于这个应用程序,并且发现我的语言技能正在下降.它的语法与我的 Java/Ruby 的日常工作"语言太不同了,所以我需要更长的时间才能开始编写新代码,而且它太旧了,我没有使用很多 接口所以现在对我来说似乎很古老的代码没有被管理!

I maintain an old PC-only application written in Delphi 7. Although Delphi has served me very well in the past I now only use it for this one application and find my skills with the language diminishing. Its syntax is too different from my 'day job' languages of Java/Ruby so it takes me longer to get into the groove of writing new code, plus it is so old I have not used many interfaces so the code is not managed which seems ancient to me now!

我的许多用户正在迁移到 Vista,这可能会在兼容模式下运行应用程序,或者可能会遇到 GPF 问题,具体取决于他们的 PC 由其 IT 部门配置的方式,因此我必须对应用程序进行一些维护.我想知道我是否应该跳到更熟悉的堆栈.

Many of my users are moving to Vista which may run the app in compatibility mode or may have GPF problems depending on how their PC is configured by their IT department, so I have to do some maintenance on the application. I'm wondering if I should jump to a more familiar stack.

是否有自动化工具可以完成将代码库转换为 C# 的工作,让我专注于任何非标准组件的转换?我正在使用一个名为 AbsoluteDatabase 的嵌入式数据库组件,它与 BDE 兼容并始终使用标准 SQL,并且一个原生的 Delphi HTML 浏览器组件,可以用微软世界的东西换掉.

Is there an automated tool that will do the legwork of converting the code base to C#, leaving me to concentrate on the conversion on any non-standard components? I'm using an embedded database component called AbsoluteDatabase which is BDE compatible and using standard SQL throughout, and a native Delphi HTML browser component which can be swapped out with something from the Microsoft world.

这些转换工具有多好?

推荐答案

我不知道有任何自动化工具可以进行这种转换.我个人建议你坚持使用 Delphi,也许只是升级到新版本.我见过几个代码 DOM 试图从 Delphi 转换为 C#,但这并没有解决库问题.

I am not aware of any automated tools for making that conversion. Personally I would suggest you stick with Delp maybe just upgrade to a new version. I have seen a couple code DOM's that attempt to convert from Delphi to C#, but that doesn't address the library issue.

CodeGear(以前称为 Borland)有一个从 C# 到 Delphi 工作正常的工具.我会假设朝着另一个方向发展的工具也会起作用(需要大量编辑).这是一个瑞典工具,它使用相同的 CodeDOM 原则,来自 Delphi到 C#(和许多其他语言).还有其他的,我现在找不到.

CodeGear (formally Borland) has a tool for going from C# to Delphi that works OK. I would assume the tools that go the other direction will work the same (requiring a lot of editing). Here is a Swedish tool that works on the same CodeDOM principle to go from Delphi to C# (and a number of other languages). There are others, I just can't find them right now.

另一种选择是升级到更新版本的 Delphi for .NET 并以这种方式将您的代码移植到 .NET.一旦你让它在 Delphi for .NET 中工作(这将非常容易,除了嵌入式数据库,除非它们有 .NET 版本)你可以使用 .NET Reflector 和 文件反汇编器 将 IL 反转为 C#.您仍将使用 VCL,但您可以使用 C# 代替 Object pascal.

Another option would be to upgrade to a more resent version of Delphi for .NET and port your code to .NET that way. Once you get it working in Delphi for .NET (which will be pretty easy, except for the embedded DB, unless they have a .NET version) you can use .NET Reflector and File Disassembler reverse the IL to C#. You will still be using the VCL, but you can use C# instead of Object pascal.

另一个类似的解决方案是将其移植到 Oxygene by RemObjects.我相信他们有一个到 WinForms 的 Delphi Win32 迁移路径.然后使用 .NET Reflector 和 文件反汇编器 将 IL 反转为 C#.

Another similar solution would be to port it to Oxygene by RemObjects. I believe they have a Delphi Win32 migration path to WinForms. Then use .NET Reflector and File Disassembler reverse the IL to C#.

简而言之,没有简单的答案.语言迁移比库迁移更容易.这在很大程度上取决于您使用的第 3 方组件(AbsoluteDatabase 之外)以及您是否直接在应用程序中进行了任何 Windows API 调用.

In short, no easy answers. Language migration is easier then library migration. A lot of it depends on what 3rd party components you used (beyond AbsoluteDatabase) and if you made any Windows API calls directly in your application.

另一个完全不同的选择是寻找离岸团队来维护应用程序.他们可能可以很便宜地做到这一点.你可以在国内找人,但毫无疑问会花费更多(尽管美元贬值和就业市场不佳,你永远不知道......)

Another completely different option would be too look for an off shore team to maintain the application. They can probably do so cheaply. You could find someone domestically, but it would cost you more no doubt (although with the sagging dollar and poor job market you never know . . . )

祝你好运!

这篇关于有哪些工具可以将 Delphi 7 应用程序转换为 C# 和 .Net 框架?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:有哪些工具可以将 Delphi 7 应用程序转换为 C# 和 .Net 框架?