无法在 x64 系统上使用 x86 dsofile.dll 读取 Office 2007 文档属性

发布于 2024-08-15 12:04:22 字数 701 浏览 5 评论 0原文

我们有一个 32 位 .NET 应用程序,它利用 32 位版本的 DSOFile.dll 2.1 来读取 Office 文档中的常见属性。这适用于 32 位版本的 Windows、Office 2003 和 Office 2007 文档。我们现在正在检查我们的应用程序在 64 位环境中的行为,特别是在 64 位 Windows Server 2008 中。

在这个 64 位环境中,DSOFile.dll 可以成功地从 Office 2003 文档(例如 DOC)读取属性,但在对于 Office 2007 文档(例如 DOCX),所有属性仅返回空字符串,否则会生成错误。

以下是我的观察结果:

环境:全新安装
阅读 DOC 道具:好的
读取 DOCX 属性:返回空值

环境:已安装 Office 2007 兼容包
阅读 DOC 道具:好的
读取 DOCX 属性:返回空值

环境:Office 2007 兼容包 SP1
阅读 DOC 道具:好的
读取 DOCX 属性:返回空值

环境:已安装 Office 2007
阅读 DOC 道具:好的
读取 DOCX 属性:错误消息 =“文档不是 OLE 文件”

在 64 位系统上,我使用位于 %SystemRoot%\Syswow64 中的 regsvr32 副本来注册 dsofile.dll。

任何建议将不胜感激。

We have a 32-bit .NET application which makes use of the 32-bit version of DSOFile.dll 2.1 to read common properties from Office documents. This works on 32-bit versions of Windows, for both Office 2003 and Office 2007 documents. We are now examining our application’s behaviour in a 64-bit environment, and specifically in 64-bit Windows Server 2008.

In this 64-bit environment, DSOFile.dll can successfully read properties from Office 2003 documents (eg. DOC), but in the case of Office 2007 documents (eg. DOCX), only empty strings are returned for all properties, or else an error is generated.

Here are my observations:

Environment: clean install
Read DOC props: OK
Read DOCX props: Empty values returned

Environment: Office 2007 Compatibility Pack installed
Read DOC props: OK
Read DOCX props: Empty values returned

Environment: Office 2007 Compatibility Pack SP1
Read DOC props: OK
Read DOCX props: Empty values returned

Environment: Office 2007 installed
Read DOC props: OK
Read DOCX props: Error message = "document is not an OLE file"

On the 64-bit system I used the copy of regsvr32 located in %SystemRoot%\Syswow64 to register dsofile.dll.

Any advice would be greatly appreciated.

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

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

发布评论

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

评论(2

我也只是我 2024-08-22 12:04:22

你可以找到 DSOFIle 源代码(在 google 上查看)并将其编译为 64 位,或者尝试这个链接,有人说他们已经完成了:
http://www.keysolutions.com/blogs/kenyee.nsf/ d6plinks/KKYE-79KRU6

我这里还有一个 x64 版本,如果你需要的话我可以上传它。

它可能与您的问题没有直接关系,但如果您想尝试一下,我使用过 x86 和 x64

You can find the DSOFIle source code (have a look on google) and compile it for 64bit, or try this link which someone says they have already done it:
http://www.keysolutions.com/blogs/kenyee.nsf/d6plinks/KKYE-79KRU6

I've also got a x64 version here if you need it I can upload it.

It may not directly be related to your issue but if you wanted to try it, I've used x86 and x64

素罗衫 2024-08-22 12:04:22

您可以将应用程序编译为 x86 而不是 AnyCPU,然后它就可以在 x64 Windows 上正常工作。

另一种可能的方法是使用 Open XML SDK 2.0 for Microsoft Office。查看它是否支持 x64 应用程序。

http://www.microsoft.com/downloads/details.aspx microsoft.com/downloads/details.aspx?FamilyId=C6E744E5-36E9-45F5-8D8C-331DF206E0D0&displaylang=en

You can compile your application to x86 instead of AnyCPU, then it will work fine on x64 Windows.

Another possible way is to use Open XML SDK 2.0 for Microsoft Office. See if it supports x64 applications.

http://www.microsoft.com/downloads/details.aspx?FamilyId=C6E744E5-36E9-45F5-8D8C-331DF206E0D0&displaylang=en

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