使用.NET读取Delphi TClientDataset文件
我需要使用 .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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
“不在 Windows 平台上运行的 dotNet 程序” 对我来说意味着您正在部署 Mono 应用程序。可能在 Linux 上,如果是这种情况,请尝试 WINE 并查看 上面建议的 Delph 应用 按预期工作。如果是,则您离开 dotnet 应用程序机器的问题已解决,因为两者将在同一硬件上运行,无需通过网络进行通信。
编辑:由于OP现在指定他正在使用MonoDroid和Monotouch,因此不能使用Wine - 剩下的选项是:
在四种选择中,第四种可能是最快的 - 最好的一种是第三种。
第一个可能会给你带来麻烦,因为世界各地都有针对工程师的法律(在美国有 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:
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.
您需要使用 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. :-)
实际上,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