![](/img/trans.png)
[英]ShellExecute to open a special folder (ex: “Libraries\Documents”) without knowing the special folder name
[英]ShellExecute can't open a special folder in windows XP?
我有路徑::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\\\\\\\\\\\?\\\\usb#vid_12d1&pid_1052&mi_00#6&eb604e2&1&0000#{6ac27878-a6fa-4155-ba85-f98f491d4f33}
,我使用ShellExecute
打開像這樣:
//lp is the path above
ShellExecute(NULL, L"open", lp, NULL, NULL, SW_SHOWNORMAL);
我在Windows XP中收到最后一個錯誤ERROR_NO_ASSOCIATION
,但我在win7中使用了它,非常完美。
那么, ShellExecute
為什么不能在XP中工作? 如果我使用Windows XP exeplorer打開路徑,也可以,那么我的代碼有什么問題? 謝謝。
ShellExecute有點陳舊,總是很虛弱。 請嘗試這種方式。
ProcessStartInfo info = new ProcessStartInfo();
info.FileName = "explorer.exe";
info.Arguments = lp;
Process.Start(info);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.