繁体   English   中英

带有 Windows API 代码包的 Windows XP 上的 EntryPointNotFoundException

[英]EntryPointNotFoundException on Windows XP with Windows API Code Pack

我正在尝试在我的应用程序中使用 MS Windows API 代码包。

string docRef = @"adocument.docx";
var shellFile = Microsoft.WindowsAPICodePack.Shell.ShellFile.FromFilePath(docRef);

它在 Windows 7 上运行良好,但在 Windows XP(安装了 .NET 3.5)时引发错误:

“System.EntryPointNotFoundException:无法在 DLL 'shell32.dll' 中找到名为 'SHCreateItemFromParsingName' 的入口点。”

在 Windows XP 上启动 MS WACP 需要做什么?

此方法已在 Windows Vista 中引入,在 Windows XP 中不存在。 请参阅其文档
Windows API 代码包的存在是为了让您可以管理访问 Windows 7 和 - 我认为 - Windows Vista 功能。 这些功能在 Windows XP 中根本不存在,因此您无法使用它们。

API 代码包依赖于 Windows 7 API,因此它们在 Windows XP 上无效。 您需要检查操作系统的版本,如果不是 Windows 7(或者现在可能是 Windows 8),则执行备用代码。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM