I am trying to use the MS Windows API Code Pack in my application.
string docRef = @"adocument.docx";
var shellFile = Microsoft.WindowsAPICodePack.Shell.ShellFile.FromFilePath(docRef);
It works fine with Windows 7, while it raises an error with Windows XP (with installed .NET 3.5):
"System.EntryPointNotFoundException: Unable to find an entry point named 'SHCreateItemFromParsingName' in DLL 'shell32.dll'."
What do I need to do to launch MS WACP on Windows XP?
This method has been introduced in Windows Vista and doesn't exist in Windows XP. See its documentation.
The Windows API Code pack exists to allow you managed access to Windows 7 and - I think - Windows Vista features. These features simply don't exist in Windows XP, so you can't use them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With