使用.NET读取Delphi TClientDataset文件

发布于 2024-11-03 23:57:44 字数 183 浏览 6 评论 0原文

我需要使用 .NET 代码读取使用 Delphi 中的 TClientDataset 类编写的文件。 此处提到的解决方案对我不起作用。

I need to read Files that are written with the TClientDataset class from Delphi with .NET Code. The Solution mentioned here does not work for me.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

风吹雪碎 2024-11-10 23:57:45

“不在 Windows 平台上运行的 dotNet 程序” 对我来说意味着您正在部署 Mono 应用程序。可能在 Linux 上,如果是这种情况,请尝试 WINE 并查看 上面建议的 Delph 应用 按预期工作。如果是,则您离开 dotnet 应用程序机器的问题已解决,因为两者将在同一硬件上运行,无需通过网络进行通信。

编辑:由于OP现在指定他正在使用MonoDroid和Monotouch,因此不能使用Wine - 剩下的选项是:

  • 对格式进行逆向工程(首先咨询律师以保护自己免受伤害)
  • 向Embarcadero询问文件的定义(我对此不抱太大希望)
  • 修改 Delphi/C++ 应用程序以导出 XML 格式的文件
  • 创建一个 Delphi 应用程序来预处理这些 *.cd,并将它们导出到 XML,然后再将它们发送到 iOS / Android 机器。

在四种选择中,第四种可能是最快的 - 最好的一种是第三种。

第一个可能会给你带来麻烦,因为世界各地都有针对工程师的法律(在美国有 DMCA,我听说这是非常严厉的 - 但 IANAL 甚至不是美国公民)。

第二个是赌注。

"A dotNet program that does not run on Windows platform" means to me that you're deploying a Mono application. Possibly on Linux, if that's the case try WINE and see if the Delph app suggested above works as expected. If yes, your problem of leaving the dotnet app machine is solved as both will run on the same hardware without communication through network.

EDIT: since the OP now specified that he's using MonoDroid and Monotouch, and therefore can't use Wine- the remaining options are:

  • Reverse engineer the format (consult a lawyer first to protect yourself from harm)
  • Ask Embarcadero for a definition of the file ( I don't put much hope on it)
  • Modify the Delphi/C++ Application to export the files in XML
  • Create an Delphi application to preprocess those *.cds and export them to XML before sending them to the iOS / Android machine.

Of the four alternatives, the fourth one is possibly the fastest - the best one is the third.

The first one can get you in trouble because of all those laws against rev engineer around the world ( in USA there are DMCA which I heard is very draconian - but IANAL and not even an US-citizen).

The second one is a bet.

掀纱窥君容 2024-11-10 23:57:45

您需要使用 Delphi 编写一个小应用程序来读取 cds 文件并将其内容写入您可以从 .Net 读取的文件(您选择适当的格式)。您可以下载 Delphi 的免费试用版。您可以在单独的电脑上开发该应用程序。您可以将输入 *.cds 文件从有问题的平台传输到该新应用程序所在的电脑。然后,您运行该应用程序并将新创建的输出文件通过 ftp 传输到有问题的平台,然后使用 .Net 读取它。

您可以使用 ftp 将文件从一个平台移动到另一个平台。如果您需要在另一个平台上使用(或即将制作!)一个不错的工具,则没有理由将自己锁定在一个平台上。 :-)

You need to use Delphi to write a small app to read the cds file and write its contents to a file that you can read from .Net (you choose the appropriate format). You can download free trial versions of Delphi. You can develop the app on a separate pc. You can ftp the input *.cds file from your problematic platform to the pc where this new app will reside. You then run the app and ftp the newly created output file to your problematic platform, then read it with .Net.

You can move files from one platform to another with ftp. No reason to lock yourself into one platform if there's a nice tool you need to use (or about to make!) on another platform. :-)

要走就滚别墨迹 2024-11-10 23:57:45

实际上,Hejlsberg/Hansen 提交的相应美国专利中对原始 CD 二进制格式进行了相当广泛的记录。我必须承认,后来 borland 对它进行了扩展,添加了一些额外的功能(例如嵌套数据集支持),但基本上它仍然是相同的格式,并且几乎没有挖掘 midas 源代码(他们在 d2010 年发布了它),人们可以构建自己的解析器:我做到了

actually original cds binary format IS documented quite extensively in corresponding US patent filed by Hejlsberg/Hansen. I must admit that later borland extended it with few extra features (such as nested datasets support) but basically it is still the very same format and with little digging in midas sources (they released it back in d2010) one can build his own parser as I did

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文