/// <summary> /// 获取特殊文件夹的路径 /// </summary> public static string GetSpecialFolderPath(IntPtr hwnd, ShellSpecialFolders nFolder) { StringBuilder sb = new StringBuilder(MAX_PATH); SHGetSpecialFolderPath(hwnd, sb, nFolder, false); return(sb.ToString()); }
private static extern bool SHGetSpecialFolderPath( IntPtr hwndOwner, StringBuilder lpszPath, ShellSpecialFolders nFolder, bool fCreate);