Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 使用Windows API代码包的Windows XP上的EntryPointNotFoundException_C#_.net_Vb.net - Fatal编程技术网

C# 使用Windows API代码包的Windows XP上的EntryPointNotFoundException

C# 使用Windows API代码包的Windows XP上的EntryPointNotFoundException,c#,.net,vb.net,C#,.net,Vb.net,我正在尝试在我的应用程序上使用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

我正在尝试在我的应用程序上使用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),则需要执行其他代码。

您有什么解决方案吗?