簡體   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